home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / vmsnet / sources / 304 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  47.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!network.ucsd.edu!mvb.saic.com!vmsnet-sources
  2. From: munroe@dmc.com (Dick Munroe)
  3. Newsgroups: vmsnet.sources
  4. Subject: UBBS, part 02/12
  5. Message-ID: <7868446@MVB.SAIC.COM>
  6. Date: 21 Aug 92 20:19:00 GMT
  7. Organization: Doyle, Munroe Consultants, Inc., Hudson, MA
  8. Lines: 1462
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: munroe@dmc.com (Dick Munroe)
  12. Posting-number: Volume 3, Issue 110
  13. Archive-name: ubbs/part02
  14. -+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+
  15. X 3010`09zlast_name=qmail_to(ii:30)
  16. X`09zur.user_key=zlast_name//zfirst_name
  17. X`09read(1,key=zur.user_key,iostat=ios)zur
  18. X`09unlock(unit=1)
  19. X`09if(ios.ne.0) mh.mail_person=.false.`09`09!Error on read
  20. X 3030`09write(6,1001)crlf(:cl)//'      Subject: '
  21. X`09dummy=20
  22. X`09call get_uplow_string(mh.mail_subject,dummy)
  23. X`09if(dummy.eq.0) then
  24. X`09    write(6,1001)crlf(:cl)//'Message send aborted'//bell
  25. X`09    go to 200
  26. X`09    end if
  27. X`09if(.not.mh.mail_person) then
  28. X 3031`09    istat=sys$gettim(rdummy)
  29. X`09    if(arklug) then
  30. X`09`09call addquad(rdummy,day_14,right_now)
  31. X`09    else
  32. X`09`09call addquad(rdummy,day_1,right_now)
  33. X`09    end if
  34. X`09    istat=sys$asctim(,dummy_20,right_now,)
  35. X`09    mh.mail_private=.false.
  36. X`09    write(6,1001)crlf(:cl)//
  37. X`091`09'What is the expiration date for this message? `5B'//
  38. X`092`09dummy_20(:11)//'`5D'
  39. X`09    dummy=11
  40. X`09    call get_uplow_string(line,dummy)
  41. X`09    istat=str$upcase(line,line)
  42. X`09    if(dummy.eq.0) then
  43. X`09`09mh.mail_expire=right_now
  44. X`09    else
  45. X`09`09istat=sys$bintim(line(:11)//' 00:00:00',mh.mail_expire)
  46. X`09    end if
  47. X`09    dummy=compquad(mh.mail_expire,right_now)
  48. X`09    if(dummy.eq.-1) then
  49. X`09`09write(6,1001)crlf(:cl)//
  50. X`091`09    'That is not a valid date.  Dates must be of the'//
  51. X`092`09    crlf(:cl)//'form dd-mmm-yyyy (e.g. 01-Jan-1986)'
  52. X`09`09go to 3031
  53. X`09    end if
  54. X`09    call addquad(right_now,day_31,rdummy)
  55. X`09    dummy=compquad(rdummy,mh.mail_expire)
  56. X`09    if(dummy.eq.-1) then
  57. X`09`09write(6,1001)crlf(:cl)//
  58. X`091`09    'Your expiration date may be no more than 1 month in'//
  59. X`092`09    crlf(:cl)//'the future.  Please try again'
  60. X`09`09go to 3031
  61. X`09    end if
  62. X`09    istat=sys$asctim(,line,mh.mail_expire,)
  63. X`09else
  64. X`09    mh.mail_private=.false.
  65. X`09    write(6,1001)crlf(:cl)//'Is this a private message? `5Bno`5D'
  66. X`09    dummy=3
  67. X`09    call get_upcase_string(yesno,dummy)
  68. X`09    if(yesno(1:1).eq.'Y') mh.mail_private=.true.
  69. X`09end if
  70. X`09write(6,1001)crlf(:cl)//crlf(:cl)//
  71. X`091   'Your message is to: '//zmail_to(1:namln)
  72. X`09write(6,1001)crlf(:cl)//'The subject is:     '//mh.mail_subject
  73. X`09if(mh.mail_private) then
  74. X`09    write(6,1001)crlf(:cl)//'** Private message **'
  75. X`09else if(mh.mail_person) then
  76. X`09    write(6,1001)crlf(:cl)//'Non-private message'
  77. X`09else
  78. X`09    write(6,1001)crlf(:cl)//'Expiration: '//line(:11)
  79. X`09end if
  80. X`09write(6,1001)crlf(:cl)//'Is this correct? `5BYes`5D'
  81. X`09dummy=3
  82. X`09call get_upcase_string(yesno,dummy)
  83. X`09if(dummy.gt.0.and.yesno(1:1).ne.'Y') go to 3000
  84. X`09ii=20
  85. X`09call enter_message(ii,*0200,0)
  86. X
  87. X 3080`09write(6,1001)crlf(:cl)//'Section number? `5Blist`5D'
  88. X`09dummy=1
  89. X`09dummyl=.false.
  90. X`09call get_number(string,dummy,dummyl)
  91. X`09if(dummy.eq.0) then
  92. X`09    do kk=0,7
  93. X`09`09call ctrl_o_check(*3080,*3080)
  94. X`09`09write(6,1020)crlf(:cl),kk,secnam(kk+1)
  95. X`09`09end do
  96. X`09    go to 3080
  97. X`09    end if
  98. X`09read(string,1011)sect
  99. X`09if(sect.gt.7) then
  100. X`09    write(6,1001)crlf(:cl)//'Invalid section number'
  101. X`09    go to 3080
  102. X`09    end if
  103. X`09mh.mail_section=sect
  104. X`09mh.mail_to=zmail_to
  105. X`09call modify_mail_info(mh,*0200)
  106. X
  107. X3090`09read(2,rec=1,iostat=ios,err=90600)last_header,last_data,
  108. X`091   first_mnum,last_mnum,busy
  109. X`09if(busy) then
  110. X`09    unlock(unit=2)
  111. X`09    dummy=lib$wait(1.0)
  112. X`09    go to 3090
  113. X`09    end if
  114. X`09last_header=last_header+1
  115. X`09last_mnum=last_mnum+1
  116. X`09write(2,rec=1,iostat=ios,err=90600)last_header,last_data+ii,
  117. X`091   first_mnum,last_mnum,busy
  118. X`09call date(mh.mail_date)
  119. X`09call time(mh.mail_time)
  120. X`09mh.mail_read=.false.
  121. X`09mh.mail_deleted=.false.
  122. X`09mh.mail_to=zmail_to
  123. X`09mh.mail_reply_to=0
  124. X`09do i=1,10
  125. X`09    mh.mail_replys(i)=0
  126. X`09    end do
  127. X`09mh.mail_first=last_data+1
  128. X`09mh.mail_last=last_data+ii
  129. X`09mh.mail_from=mail_name
  130. X`09mh.mail_messnum=last_mnum
  131. X`09write(2,rec=last_header,iostat=ios,err=90600) mh
  132. X
  133. X`09do jj=1,ii
  134. X`09    write(3,rec=last_data+jj)message(jj)
  135. X`09    end do
  136. X`09call comint(last_mnum,lms)
  137. X`09if(sect.ge.0) write(6,1001)crlf(:cl)//crlf(:cl)//
  138. X`091   ' Message number '//lms//' sent.'//bell//bell
  139. X
  140. X`09if(.not.mh.mail_person) go to 200`09`09!cannot flag mailbox
  141. X`09read(1,key=zur.user_key,iostat=ios,err=90500)zur
  142. X`09zur.num_unread=zur.num_unread+1
  143. X`09rewrite(1,iostat=ios,err=90500)zur
  144. X`09unlock(unit=1)
  145. X`09unlock(unit=2)
  146. X`09unlock(unit=3)
  147. X`09go to 200
  148. X
  149. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  150. Vccc
  151. X 4000`09continue`09`09!File transfer
  152. X`09area='file transfer'
  153. X`09call add_elapsed_time(*91000)
  154. X`09read(1,key=ur.user_key,iostat=ios,err=90500)ur
  155. X`09ur.seconds_today = current_units
  156. X`09rewrite(1,iostat=ios,err=90500)ur
  157. X`20
  158. X`09if(arklug) then
  159. X`09    call arklug_files_section
  160. X`09else
  161. X`09    call ubbs_files_section
  162. X`09end if
  163. X
  164. Xc`09Turn the timer back on.
  165. X
  166. X 4900`09continue
  167. X`09call init_timer(user_timer)
  168. X`09initial_units=ur.seconds_today
  169. X`09go to 0200
  170. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  171. Vccc
  172. X 5000`09continue`09`09!Goodbye
  173. X`09area='goodbye'
  174. X`09read(1,key=ur.user_key,iostat=ios,err=90500)ur
  175. X`09ur.seconds_today = current_units
  176. X`09rewrite(1,iostat=ios,err=90500)ur
  177. X`09call type_file('ubbs_data:signoff.txt')
  178. X`09go to 99990
  179. X
  180. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  181. Vccc
  182. X 6000`09continue`09`09!Help
  183. X`09area='help'
  184. X`09controlc_typed = .false.
  185. X`09istat=lbr$output_help(bbs_put_output,,'bbs_help'
  186. X`091   ,'ubbs_data:helplib',,bbs_get_input)
  187. X`09go to 0200
  188. X
  189. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  190. Vccc
  191. X 8000`09continue`09`09!Modify user info
  192. X`09area='modify'
  193. X`09read(1,key=ur.user_key,iostat=ios,err=90500)ur
  194. X`09unlock(unit=1)
  195. X`09istat=str$trim(ur.city,ur.city,dummy1)
  196. X`09istat=str$trim(ur.computer,ur.computer,dummy2)
  197. X`09call out(ffeed(:fl)//'You are calling from '//ur.city(1:dummy1)
  198. X`091    //', '//ur.state,*8050)
  199. X`09call out('And you use a '//ur.computer(1:dummy2),*8050)
  200. X`09call out(crlf(:cl)//'You are currently set to read sections:',*8050)
  201. X`09kk=0
  202. X`09do ii=0,7
  203. X`09    dummyb=0
  204. X`09    dummyb=dummyb.or.(2**ii)
  205. X`09    if((dummyb.and.ur.auth_sections).ne.0) then
  206. X`09`09kk=kk+1
  207. X`09`09idummy(kk)=ii
  208. X`09`09end if
  209. X`09    end do
  210. X`09if (kk.eq.0) then
  211. X`09    call out('None!!',*8050)
  212. X`09else
  213. X`09    write(6,1021)crlf(:cl),(idummy(ll),ll=1,kk)
  214. X`09    call ctrl_o_check(*8050,*8050)
  215. X`09end if
  216. X`09dummy1=cl
  217. X`09call make_readable(ur.user_crlf,dummy1,dummy_20)
  218. X`09call out('Your end-of-line sequence is:'//dummy_20(1:dummy1),*8050)
  219. X`09dummy1=fl
  220. X`09call make_readable(ur.user_ff,dummy1,dummy_20)
  221. X`09call out('Your clear-screen sequence is:'//dummy_20(1:dummy1),*8050)
  222. X`09istat=sys$asctim(,dummy_20,%ref(ur.last_pass_chg),)`09
  223. X`09call out('Your password was last changed on '//
  224. X`091   dummy_20(1:11)//' at '//dummy_20(13:20),*8050)
  225. X`09if ((ur.editor.and.1).eq.1) then
  226. X`09    call out('Your default editor is EDT.',*8050)
  227. X`09else
  228. X`09    call out('Your default is line editing.',*8050)
  229. X`09endif
  230. X`09if((ur.editor.and.7).eq.7) then
  231. X`09    call out('You are set up as a VT100 terminal')
  232. X`09else if((ur.editor.and.7).eq.3) then
  233. X`09    call out('You are set up as a VT52 terminal')
  234. X`09end if
  235. X
  236. X8050`09continue`09!modification menu
  237. X`09call out(crlf(:cl),*8051)
  238. X`09call out('You may change any of the following information',*8051)
  239. X`09call out('(C)ity, state and computer type',*8051)
  240. X`09call out('(E)xit (no more changes)',*8051)
  241. X`09call out('(H)elp',*8051)
  242. X`09call out('(M)essage sections',*8051)
  243. X`09call out('(P)assword',*8051)
  244. X`09call out('(T)erminal and editing characteristics',*8051)
  245. X 8051`09call out(crlf(:cl)//'Item `5BE`5D?',*8051)
  246. X`09dummy=1
  247. X`09call get_upcase_string(cdummy,dummy)
  248. X`09if(dummy.eq.0.or.cdummy.eq.'E') go to 8900
  249. X`09if(cdummy.eq.'C') go to 8100
  250. X`09if(cdummy.eq.'H') go to 8200
  251. X`09if(cdummy.eq.'M') go to 8300
  252. X`09if(cdummy.eq.'P') go to 8400
  253. X`09if(cdummy.eq.'T') go to 8500
  254. X`09write(6,1001)crlf(:cl)//'That is not a valid command'
  255. X`09write(6,1001)crlf(:cl)//'Please try again.'//bell
  256. X`09go to 8050
  257. X
  258. X 8100`09write(6,1001)crlf(:cl)//' The city you are calling from is? `5B'//
  259. X`091    ur.city(1:dummy1)//'`5D '
  260. X`09ctlen=20
  261. X`09call get_uplow_string(zur.city,ctlen)
  262. X`09if(ctlen.eq.0) go to 8110
  263. X`09if(zur.city.eq.' ') go to 8100
  264. X`09ur.city=zur.city
  265. X 8110`09write(6,1001)crlf(:cl)//'The state you are calling from is? `5B'//
  266. X`091   ur.state//'`5D '
  267. X`09dummy=2
  268. X`09call get_upcase_string(zur.state,dummy)
  269. X`09if(dummy.eq.0) go to 8120
  270. X`09if(zur.state.eq.' ') go to 8110
  271. X`09ur.state=zur.state
  272. X 8120`09write(6,1001)crlf(:cl)//'What type of computer do you use? `5B'//
  273. X`091    ur.computer(1:dummy2)//'`5D '
  274. X`09dummy=20
  275. X`09call get_uplow_string(zur.computer,dummy)
  276. X`09if(dummy.eq.0) go to 8130
  277. X`09if(zur.computer.eq.' ') go to 8120
  278. X`09ur.computer=zur.computer
  279. X 8130`09continue
  280. X`09istat=str$trim(ur.city,ur.city,dummy1)
  281. X`09istat=str$trim(ur.computer,ur.computer,dummy2)
  282. X`09write(6,1001)crlf(:cl)//crlf(:cl)//
  283. X`091   'You are calling from ',ur.city(1:dummy1)//', '//ur.state
  284. X`09write(6,1001)crlf(:cl)//'And you use a '//ur.computer(1:dummy2)
  285. X`09write(6,1001)crlf(:cl)//'Is this correct? `5BYes`5D'
  286. X`09dummy=3
  287. X`09call get_upcase_string(yesno,dummy)
  288. X`09if(yesno(1:1).eq.'N') go to 8100
  289. X`09go to 8050
  290. X
  291. X 8200`09continue`09! Help with options
  292. X`09controlc_typed = .false.
  293. X`09istat=lbr$output_help(bbs_put_output,,
  294. X`091   'bbs_help modify','ubbs_data:helplib',,bbs_get_input)
  295. X`09go to 8050
  296. X
  297. X 8300`09continue`09! choose message sections
  298. X`09write(6,1001)crlf(:cl)//'The message sections available are:'
  299. X`09do ii=0,7
  300. X`09    write(6,1020)crlf(:cl),ii,secnam(ii+1)
  301. X`09    end do
  302. X`09write(6,1001)crlf(:cl)//crlf(:cl)
  303. X 8350`09write(6,1001)crlf(:cl)//'Enter the sections you wish to read as a'
  304. X`09write(6,1001)crlf(:cl)//'comma-seperated list, ALL for all sections'
  305. X`09write(6,1001)crlf(:cl)//'or a carriage return for no change.'
  306. X`09write(6,1001)crlf(:cl)//'?'
  307. X`09slen=20
  308. X`09call get_uplow_string(string,slen)
  309. X`09istat=str$upcase(string,string)
  310. X`09if(slen.eq.0) then
  311. X`09    write(6,1001)crlf(:cl)//'No section change made.'
  312. X`09    go to 8050
  313. X`09    end if
  314. X`09if(string.eq.'ALL') then
  315. X`09    ur.auth_sections=255
  316. X`09    write(6,1001)crlf(:cl)//'Set to read all sections.'
  317. X`09    go to 8050
  318. X`09    end if
  319. X`09do ii=1,slen
  320. X`09    i=ichar(string(ii:ii))
  321. X`09    if((i.lt.48.or.i.gt.55).and.i.ne.44) then
  322. X`09`09write(6,1001)crlf(:cl)//'Invalid list, try again.'
  323. X`09`09go to 8350
  324. X`09`09end if
  325. X`09    end do
  326. X`09ur.auth_sections=0
  327. X`09do while(string.ne.' ')
  328. X`09    dummy=index(string,',')-1
  329. X`09    if(dummy.le.0) dummy=slen
  330. X`09    read(string,1011)ii
  331. X`09    dummyb=2**ii
  332. X`09    ur.auth_sections=ur.auth_sections.or.dummyb
  333. X`09    string(1:dummy+1)=' '
  334. X`09    end do
  335. X`09go to 8050
  336. X
  337. X 8400`09continue`09!Change password
  338. X`09write(6,1001)crlf(:cl)//'Enter your old password..'
  339. X`09dummy=10
  340. X`09call get_password(inp_password,dummy)
  341. X`09if(inp_password.ne.ur.password) then
  342. X`09    write(6,1001)crlf(:cl)//'No match.  Password not changed.'
  343. X`09else
  344. X 8401`09    write(6,1001)crlf(:cl)//'Enter your new password..'
  345. X`09    dummy=10
  346. X`09    call get_password(inp_password,dummy)
  347. X`09    if(dummy.lt.4) then
  348. X`09`09write(6,1001)crlf(:cl)//
  349. X`091`09    'That is too short.  Your password must be'//
  350. X`092`09    crlf(:cl)//'at least 4 characters.'
  351. X`09`09go to 8401
  352. X`09    end if
  353. X`09    write(6,1001)crlf(:cl)//'Enter it again...........'
  354. X`09    dummy=10
  355. X`09    call get_password(zur.password,dummy)
  356. X`09    if(zur.password.ne.inp_password) then
  357. X`09`09write(6,1001)crlf(:cl)//'No match.  Password not changed.'
  358. X`09    else if(zur.password.eq.ur.password) then
  359. X`09`09write(6,1001)crlf(:cl)//'Password not changed.'
  360. X`09    else
  361. X`09`09ur.password=inp_password
  362. X`09`09istat=sys$gettim(%ref(ur.last_pass_chg))
  363. X`09    end if
  364. X`09end if
  365. X`09go to 8050
  366. X`09
  367. X 8500`09continue`09!Terminal options
  368. X`09dummy1=cl
  369. X`09call make_readable(ur.user_crlf,dummy1,dummy_20)
  370. X`09write(6,1001)crlf(:cl)//
  371. X`091   ' Your end-of-line sequence is:'//dummy_20(1:dummy1)
  372. X`09dummy1=fl
  373. X`09call make_readable(ur.user_ff,dummy1,dummy_20)
  374. X`09write(6,1001)crlf(:cl)//
  375. X`091   'Your clear-screen sequence is:'//dummy_20(1:dummy1)
  376. X`09write(6,1001)crlf(:cl)//
  377. X`091   'Do you wish to change your end-of-line sequence? `5BNo`5D'
  378. X`09dummy=3
  379. X`09call get_upcase_string(yesno,dummy)
  380. X`09if(yesno(1:1).ne.'Y') go to 8550
  381. X`09write(6,1001)crlf(:cl)//'Available end of line sequences are:'
  382. X`09write(6,1001)crlf(:cl)//crlf(:cl)//'(0)  No change'
  383. X`09write(6,1001)crlf(:cl)//'(1)  Carriage return / line feed'
  384. X`09write(6,1001)crlf(:cl)//'(2)  Carriage return only'
  385. X`09write(6,1001)crlf(:cl)//'(3)  Line feed only'
  386. X`09write(6,1001)crlf(:cl)//crlf(:cl)//
  387. X`091   'Please choose one of the above.  If you need'
  388. X`09call out('a different sequence, please contact the operator.',*8050)
  389. X`09write(6,1001)crlf(:cl)//'Your choice? `5B0`5D'
  390. X`09dummy=1
  391. X`09dummyl=.false.
  392. X`09call get_number(string,dummy,dummyl)
  393. X`09if(dummy.eq.0) go to 8500
  394. X`09read(string,1011)number
  395. X`09if(number.eq.0) then
  396. X`09    go to 8550
  397. X`09else if(number.eq.1) then
  398. X`09    ur.user_crlf=char(13)//char(10)//char(255)
  399. X`09    cl=2
  400. X`09else if(number.eq.2) then
  401. X`09    ur.user_crlf=char(13)//char(255)
  402. X`09    cl=1
  403. X`09else if(number.eq.3) then
  404. X`09    ur.user_crlf=char(10)//char(255)
  405. X`09    cl=1
  406. X`09else
  407. X`09    write(6,1001)crlf(:cl)//bell//
  408. X`091`09'Invalid choice.  Please try again'
  409. X`09    go to 8500
  410. X`09end if
  411. X`09crlf=ur.user_crlf
  412. X
  413. X 8550`09write(6,1001)crlf(:cl)//
  414. X`091   'Do you wish to change your clear-screen sequence? `5BNo`5D'
  415. X`09dummy=3
  416. X`09call get_upcase_string(yesno,dummy)
  417. X`09if(yesno(1:1).ne.'Y') go to 8580
  418. X`09write(6,1001)crlf(:cl)//'Your clear-screen sequence may be 1 to 4'
  419. X`09write(6,1001)crlf(:cl)//'characters.  You will be prompted to enter'
  420. X`09write(6,1001)crlf(:cl)//'each character in decimal.  When you have'
  421. X`09write(6,1001)crlf(:cl)//'entered all characters, just enter <return>.'
  422. X`09dummy1=0
  423. X`09do i=1,4
  424. X 8560`09    write(6,1013)crlf(:cl)//'Character',i
  425. X`09    dummy=3
  426. X`09    dummyl=.false.
  427. X`09    call get_number(string,dummy,dummyl)
  428. X`09    if(dummy.eq.0) then
  429. X`09`09go to 8570
  430. X`09`09end if
  431. X`09    read(string,1011)number
  432. X`09    if(number.le.127) then
  433. X`09`09dummy_20(i:i)=char(number)
  434. X`09`09dummy1=dummy1+1
  435. X`09    else
  436. X`09`09write(6,1001)crlf(:cl)//
  437. X`091`09    'Characters must be less than 128 decimal'
  438. X`09`09go to 8560
  439. X`09    end if
  440. X`09    end do
  441. X 8570`09if(dummy1.eq.0) then
  442. X`09    write(6,1001)crlf(:cl)//'Clear-screen not changed'
  443. X`09else
  444. X`09    ur.user_ff=dummy_20(1:dummy1)//char(255)
  445. X`09    ffeed=ur.user_ff
  446. X`09    fl=dummy1
  447. X`09end if
  448. X`09go to 8050
  449. X
  450. X 8580`09continue`09`09! Change terminal and editor
  451. X`09write(6,1001)crlf(:cl)//
  452. X`091   'Do you wish to change your default editor? `5BNo`5D'
  453. X`09dummy=3
  454. X`09call get_upcase_string(yesno,dummy)
  455. X`09if(yesno(1:1).ne.'Y') go to 8050
  456. X`09write(6,1001)crlf(:cl)//
  457. X`091   'Please enter "E" for EDT or "L" for line mode editing'
  458. X`09dummy=1
  459. X`09call get_upcase_string(cdummy,dummy)
  460. X`09if(cdummy.eq.'E') then
  461. X`09    ur.editor=(ur.editor.and.6)+1
  462. X`09    go to 8585
  463. X`09else if(cdummy.eq.'L') then
  464. X`09    ur.editor=0
  465. X`09    go to 8050
  466. X`09else
  467. X`09    write(6,1001)crlf(:cl)//'Invalid response.'//
  468. X`091`09'  Please choose E or L.'
  469. X`09    go to 8580
  470. X`09end if
  471. X 8585`09write(6,1001)crlf(:cl)//
  472. X`091   'To be able to use the screen editing features of EDT,'//
  473. X`092   ' you must be able'
  474. X`09write(6,1001)crlf(:cl)//
  475. X`091   'to emulate a VT52 or VT100 terminal.  Please enter "1" for'
  476. X`09write(6,1001)crlf(:cl)//
  477. X`091   'VT52, "2" for VT100, or "0" for no terminal emulation'
  478. X`09dummy=1
  479. X`09dummyl=.false.
  480. X`09call get_number(cdummy,dummy,dummyl)
  481. X`09if(cdummy.eq.'0') then
  482. X`09    ur.editor=(ur.editor.and.1)
  483. X`09    go to 8050
  484. X`09else if(cdummy.eq.'1') then
  485. X`09    ur.editor=(ur.editor.or.2)
  486. X`09    go to 8050
  487. X`09else if(cdummy.eq.'2') then
  488. X`09    ur.editor=(ur.editor.or.6)
  489. X`09else
  490. X`09    write(6,1001)crlf(:cl)//'Invalid response.'//
  491. X`091`09'  Please choose 0, 1, or 2.'
  492. X`09    go to 8585
  493. X`09end if
  494. X
  495. X 8900`09continue`09!Re-write his userlog record
  496. X`09write(6,1001)crlf(:cl)//'Changes are now complete.'
  497. X`09read(1,key=ur.user_key,iostat=ios,err=90500)zur
  498. X`09rewrite(1,iostat=ios,err=90500)ur
  499. X`09go to 0200
  500. X
  501. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  502. Vccc
  503. X9000`09continue`09`09!Private message to operator
  504. X`09area='private'
  505. X`09do ii=1,20`09`09! Blank out the message so the send will work
  506. X`09    message(ii)=' '
  507. X`09    end do
  508. X`09ii=20
  509. X`09call enter_message(ii,*0200,0)
  510. X`09ii=ii+1
  511. X`09message(ii) = ' ('//ur.phone_number(1:3)//
  512. X`091   ') '//ur.phone_number(4:6)//'-'//ur.phone_number(7:10)//
  513. X`092   ' '//ur.city//','//ur.state
  514. X`09
  515. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  516. Vcccc
  517. Xc`09The following code will work on a DECNET site, but NOT on non-networked
  518. Xc`09systems.  It is slightly more efficient that the lib$spawn
  519. X
  520. X`09istat=netmail(nodename,
  521. X`091   'bbs%"'//mail_name//'"',
  522. X`092   'SYSOP',
  523. X`093   'BBS Sysop',
  524. X`094   'Comment',
  525. X`095   message)
  526. X
  527. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  528. Vcccc
  529. Xc`09The following code will work on any VAX, but is not as nice as the
  530. Xc`09DECNET code, and does not allow fudging the return address.
  531. Xc
  532. Xc`09Format a message and send to the operator.
  533. Xc`09open(unit=4,file='mail.tmp',status='new',
  534. Xc`091    carriagecontrol='list')
  535. Xc`09write(4,1001)'From:'//mail_name//' ('//ur.phone_number(1:3)//
  536. Xc`091   ') '//ur.phone_number(4:6)//'-'//ur.phone_number(7:10)//
  537. Xc`092   ' '//ur.city//','//ur.state
  538. Xc`09write(4,1001)' '
  539. Xc`09do jj=1,ii
  540. Xc`09    write(4,1001)message(jj)
  541. Xc`09    end do
  542. Xc `09close(unit=4)
  543. Xc
  544. Xc`09istat = lib$spawn('mail/subject="Comment" mail.tmp ubbs_sysop_mail')
  545. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  546. Vcccc
  547. X
  548. Xc`09Also put it in mail section for ease of reply
  549. X`09zmail_to='Sysop'
  550. X`09mh.mail_subject='Comment'
  551. X`09mh.mail_private=.true.
  552. X`09mh.mail_section=0
  553. X`09mh.mail_person=.false.
  554. X`09istat=sys$bintim('31-DEC-2001 00:00:00',mh.mail_expire)
  555. X`09sect=-1
  556. X`09write(6,1001)crlf(:cl)//'Message sent.  Thank you.'
  557. X`09go to 3090
  558. X
  559. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  560. Vccc
  561. X10000`09continue`09`09!Retrieve message
  562. X`09area='retrieve'
  563. X`09if (.not.approved_mail_read) then
  564. X`09    write(6,1001)crlf(:cl)//bell//
  565. X`091`09'You are not yet approved to read messages.'
  566. X`09    write(6,1001)crlf(:cl)//'Sorry.'
  567. X`09    go to 0200
  568. X`09    end if
  569. X
  570. X`09call time(ctime)
  571. X`09call add_elapsed_time(*91000)
  572. X`09write(cminutes,1002)current_units/60
  573. X`09read(2,rec=1,iostat=ios,err=90600)last_header, last_data,
  574. X`091   first_mnum,last_mnum
  575. X`09unlock (unit=2)
  576. X`09call comint(first_mnum,clms)
  577. X`09call comint(last_mnum,lms)
  578. X10001`09write(6,1001)crlf(:cl)//'The message file contains messages'//
  579. X`091   clms//' through'//lms
  580. X`09if((.not.ur.xpert).or.reprint) then
  581. X`09    reprint=.false.
  582. X`09    call out(crlf(:cl)//'    Retrieve Menu',*10010)
  583. X`09    call out('(F)lagged        (I)ndividual',*10010)
  584. X`09    call out('(M)arked         (N)ew',*10010)
  585. X`09    call out('(R)ange          (T)hread',*10010)
  586. X`09    call out('(E)xit to main menu',*10010)
  587. X10010`09    write(6,1001)crlf(:cl)//ctime//'-'//cminutes//' Command? '
  588. X`09else
  589. X`09    write(6,1001)crlf(:cl)//ctime//'-'//
  590. X`091`09cminutes//' Command (E,F,I,M,N,R,T,?)? '
  591. X`09end if
  592. X`09dummy=1
  593. X`09call get_uplow_string(cdummy,dummy)
  594. X`09istat=str$upcase(cdummy,cdummy)
  595. X`09if(cdummy.eq.'E') then
  596. X`09    unlock(unit=2)
  597. X`09    unlock(unit=3)
  598. X`09    go to 0200
  599. X`09    end if
  600. X`09if(cdummy.eq.'F') go to 10100
  601. X`09if(cdummy.eq.'I') go to 10200
  602. X`09if(cdummy.eq.'M') go to 10300
  603. X`09if(cdummy.eq.'N') go to 10400
  604. X`09if(cdummy.eq.'R') go to 10500
  605. X`09if(cdummy.eq.'T') go to 10600
  606. X`09if(cdummy.eq.'?') then
  607. X`09    reprint=.true.
  608. X`09    go to 10001
  609. X`09    end if
  610. X
  611. X`09write(6,1001)crlf(:cl)//bell//
  612. X`091   'That is not a valid retrieve command.'
  613. X`09go to 10001
  614. X
  615. X10100`09continue`09`09!Read flagged
  616. X`09area='flagged'
  617. X`09if(num_flags.eq.0) then
  618. X`09    write(6,1001)crlf(:cl)//'No messages flagged.'
  619. X`09    unlock(unit=2)
  620. X`09    unlock(unit=3)
  621. X`09    go to 0200
  622. X`09    end if
  623. X`09nostop=.false.
  624. X`09irec=1
  625. X`09do ii=1,num_flags
  626. X`09    call read_mail(flags(ii),irec,status,nostop,next_mess)
  627. X`09    if(status.eq.1) go to 90500
  628. X`09    if(status.eq.2) go to 90600
  629. X`09    if(status.eq.3) go to 10000
  630. X`09    end do
  631. X`09go to 10000
  632. X
  633. X10200`09continue`09`09!Read individual
  634. X`09area='individual'
  635. X`09nostop=.false.
  636. X`09write(6,1001)crlf(:cl)//'Message number? `5Bexit`5D'
  637. X`09dummy=7
  638. X`09dummyl=.false.
  639. X`09call get_number(string,dummy,dummyl)
  640. X`09if(dummy.eq.0) go to 10000
  641. X`09read(string,1011)mess
  642. X`09if(mess.lt.first_mnum.or.mess.gt.last_mnum) then
  643. X`09    write(6,1001)crlf(:cl)//'Message number out of range.'
  644. X`09    go to 10200
  645. X`09    end if
  646. X`09irec=1
  647. X`09call read_mail(mess,irec,status,nostop,next_mess)
  648. X`09if(status.eq.1) go to 90500
  649. X`09if(status.eq.2) go to 90600
  650. X`09go to 10200
  651. X
  652. X`09   `20
  653. X10300`09continue`09`09!Read marked
  654. X`09area='marked'
  655. X`09nostop=.false.
  656. X`09do krec=2,last_header
  657. X10310`09read(2,rec=krec,iostat=ios,err=90600) mh
  658. X`09    unlock(unit=2)
  659. X`09    if (.not.mh.mail_read.and..not.mh.mail_deleted
  660. X`091`09.and.mh.mail_person) then
  661. X`09`09istat=str$upcase(qmail_to,mh.mail_to)
  662. X`09`09if(mail_name.eq.qmail_to) then
  663. X`09`09    irec=krec-1
  664. X`09`09    call read_mail(mh.mail_messnum,irec,status,
  665. X`091`09`09nostop,next_mess)
  666. X`09`09    if(status.eq.1) go to 90500
  667. X`09`09    if(status.eq.2) go to 90600
  668. X`09`09    if(status.eq.3) go to 10000`09!User flagged exit
  669. X`09`09    end if
  670. X`09`09end if
  671. X`09    end do
  672. X`09go to 10000
  673. X
  674. X10400`09continue`09`09!Read new
  675. X`09area='new'
  676. X`09nostop=.false.
  677. X`09fmess=ur.last_message+1`09`09!the next message
  678. X`09lmess=last_mnum
  679. X`09go to 10505
  680. X
  681. X
  682. X10500`09continue`09`09!Read range
  683. X`09area='range'
  684. X`09nostop=.false.
  685. X`09write(6,1001)crlf(:cl)//'Starting message number? `5Bexit`5D'
  686. X`09dummy=7
  687. X`09dummyl=.true.
  688. X`09call get_number(string,dummy,dummyl)
  689. X`09if(dummy.eq.0) then
  690. X`09    unlock(unit=2)
  691. X`09    unlock(unit=3)
  692. X`09    go to 0200
  693. X`09    end if
  694. X`09if(string.eq.'*') then
  695. X`09    fmess=ur.last_message+1
  696. X`09else
  697. X`09    read(string,1011)fmess
  698. X`09end if
  699. X`09write(6,1001)crlf(:cl)//'Ending message number? `5Bexit`5D'
  700. X`09dummy=7
  701. X`09dummyl=.true.
  702. X`09call get_number(string,dummy,dummyl)
  703. X`09if(dummy.eq.0) then
  704. X`09    unlock(unit=2)
  705. X`09    unlock(unit=3)
  706. X`09    go to 0200
  707. X`09    end if
  708. X`09if(string.eq.'*') then
  709. X`09    lmess=last_mnum
  710. X`09else
  711. X`09    read(string,1011)lmess
  712. X`09end if
  713. X10505`09if(fmess.lt.first_mnum) fmess=first_mnum
  714. X`09if(lmess.gt.last_mnum) lmess=last_mnum
  715. X`09irec=1
  716. X`09mess=fmess
  717. X`09do while(mess.le.lmess)
  718. X`09    call read_mail(mess,irec,status,nostop,next_mess)
  719. X`09    if(status.eq.1) go to 90500
  720. X`09    if(status.eq.2) go to 90600
  721. X`09    if(status.eq.3) go to 10000
  722. X`09    if((status.eq.0).and.(next_mess.ne.0)) then
  723. X`09`09mess=next_mess
  724. X`09    else
  725. X`09`09mess=mess+1
  726. X`09    end if
  727. X`09    end do
  728. X`09go to 10000
  729. X
  730. X
  731. X10600`09continue`09`09!Read thread
  732. X`09area='thread'
  733. X`09write(6,1001)crlf(:cl)//'Starting message number? `5Bexit`5D'
  734. X`09dummy=7
  735. X`09dummyl=.true.
  736. X`09call get_number(string,dummy,dummyl)
  737. X`09if(dummy.eq.0) then
  738. X`09    unlock(unit=2)
  739. X`09    unlock(unit=3)
  740. X`09    go to 0200
  741. X`09    end if
  742. X`09if(string.eq.'*') then
  743. X`09    fmess=ur.last_message+1
  744. X`09else
  745. X`09    read(string,1011)fmess
  746. X`09end if
  747. X`09found=.false.
  748. Xc`09get within 20 of the first message
  749. X`09i=2
  750. X`09do while (.not.found)
  751. X10610`09read(2,rec=i,iostat=ios,err=90600) mh
  752. X`09    unlock(unit=2)
  753. X`09    if(mh.mail_messnum.ge.fmess) found=.true.
  754. X`09    i=i+20
  755. X`09    end do
  756. X`09i=i-40
  757. X`09if(i.lt.2) i=2
  758. X
  759. X`09stack_ptr=0
  760. X`09do l=i,last_header
  761. X`09    have_read(l)=.false.
  762. X`09    end do
  763. X
  764. X`09do l=i,last_header
  765. X`09read(2,rec=l,iostat=ios,err=90600) mh
  766. X`09    unlock(unit=2)
  767. X
  768. X`09    if(mh.mail_messnum.lt.fmess) go to 10680
  769. X`09    if(have_read(l)) go to 10680
  770. X
  771. X`09    mnum=mh.mail_messnum
  772. X`09    if(mh.mail_messnum.gt.last_mnum) go to 10000
  773. X10650`09    irec=l
  774. X`09    call read_mail(mnum,irec,status,nostop,next_mess)
  775. X`09    if(status.eq.1) go to 90500
  776. X`09    if(status.eq.2) go to 90600
  777. X`09    if(status.eq.3) go to 10000
  778. X
  779. X`09    if(status.eq.0) go to 10680
  780. X`09read(2,rec=irec,iostat=ios,err=90600) mh
  781. X`09    unlock(unit=2)
  782. X
  783. X`09    have_read(irec)=.true.
  784. X`09    do ll=10,1,-1
  785. X`09`09if(mh.mail_replys(ll).ne.0) then
  786. X`09`09    if(stack_ptr.ge.200) go to 10680
  787. X`09`09    stack_ptr=stack_ptr+1
  788. X`09`09    stack(stack_ptr)=mh.mail_replys(ll)
  789. X`09`09    end if
  790. X`09`09end do
  791. X10680`09    if(stack_ptr.gt.0) then
  792. X`09`09mnum=stack(stack_ptr)
  793. X`09`09stack_ptr=stack_ptr-1
  794. X`09`09go to 10650
  795. X`09`09end if
  796. X`09    end do
  797. X`09go to 10000
  798. X
  799. X
  800. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  801. Vccc
  802. X11000`09continue`09`09!Scan messages
  803. X`09area='scan'
  804. X`09if (.not.approved_mail_read) then
  805. X`09    write(6,1001)crlf(:cl)//bell//
  806. X`091`09'You are not yet approved to read messages.'
  807. X`09    write(6,1001)crlf(:cl)//'Sorry.'
  808. X`09    go to 0200
  809. X`09    end if
  810. X
  811. X`09read_deleted = .false.
  812. X`09if(sysop) then
  813. X`09    write(6,1001)crlf(:cl)//'Process deleted messages? `5BNo`5D'
  814. X`09    dummy=1
  815. X`09    call get_upcase_string(cdummy,dummy)
  816. X`09    if(cdummy.eq.'Y') then
  817. X`09`09read_deleted = .true.
  818. X`09`09end if
  819. X`09    end if
  820. X`09
  821. X`09num_flags=0
  822. X`09read(2,rec=1,iostat=ios,err=90600)last_header, last_data,
  823. X`091   first_mnum,last_mnum
  824. X`09unlock (unit=2)
  825. X`09call comint(first_mnum,clms)
  826. X`09call comint(last_mnum,lms)
  827. X`09write(6,1001)crlf(:cl)//'The message file contains messages'//
  828. X`091   clms//' through'//lms
  829. X`09fmess=first_mnum
  830. X`09lmess=last_mnum
  831. X`09call out(crlf(:cl)//'        Scan menu',*11010)
  832. X`09call out(crlf(:cl)//'(L)ist range of messages',*11010)
  833. X`09call out('(F) search on From: field',*11010)
  834. X`09call out('(T) search on To: field',*11010)
  835. X`09call out('(S) search on Subject: field',*11010)
  836. X
  837. X11010`09write(6,1001)crlf(:cl)//'Command `5Bexit`5D?'
  838. X`09dummy=1
  839. X`09call get_upcase_string(cdummy,dummy)
  840. X`09if(dummy.eq.0)  then
  841. X`09    unlock(unit=2)
  842. X`09    unlock(unit=3)
  843. X`09    go to 0200
  844. X`09    end if
  845. X`09if (cdummy.eq.'L') go to 11100
  846. X`09if (cdummy.eq.'F') go to 11200
  847. X`09if (cdummy.eq.'T') go to 11300
  848. X`09if (cdummy.eq.'S') go to 11400
  849. X`09write(6,1001)crlf(:cl)//bell//'That was not a valid scan command'
  850. X`09go to 11000
  851. X
  852. X11100`09continue`09`09!List messages
  853. X`09write(6,1001)crlf(:cl)//'Starting message number? `5Bexit`5D'
  854. X`09dummy=7
  855. X`09dummyl=.true.
  856. X`09call get_number(string,dummy,dummyl)
  857. X`09if(dummy.eq.0)  then
  858. X`09    unlock(unit=2)
  859. X`09    unlock(unit=3)
  860. X`09    go to 0200
  861. X`09    end if
  862. X`09if(string.eq.'*') then
  863. X`09    fmess=ur.last_message+1
  864. X`09else
  865. X`09    read(string,1011)fmess
  866. X`09end if
  867. X`09write(6,1001)crlf(:cl)//'Ending message number? `5Bexit`5D'
  868. X`09dummy=7
  869. X`09dummyl=.true.
  870. X`09call get_number(string,dummy,dummyl)
  871. X`09if(dummy.eq.0)  then
  872. X`09    unlock(unit=2)
  873. X`09    unlock(unit=3)
  874. X`09    go to 0200
  875. X`09    end if
  876. X`09if(string.eq.'*') then
  877. X`09    lmess=last_mnum
  878. X`09else
  879. X`09    read(string,1011)lmess
  880. X`09end if
  881. X`09if(fmess.lt.first_mnum) fmess=first_mnum
  882. X`09if(lmess.gt.last_mnum) lmess=last_mnum
  883. X`09irec=1
  884. X`09do krec=2,last_header
  885. X`09    read(2,rec=krec,iostat=ios,err=90600) mh
  886. X`09    unlock(unit=2)
  887. X`09    if(mh.mail_messnum.lt.fmess) goto 11190
  888. X`09    if(mh.mail_messnum.gt.lmess) goto 11900
  889. X`09    if(mh.mail_deleted.and..not.read_deleted) goto 11190
  890. X`09    istat=str$upcase(zmail_to,mh.mail_to)
  891. X`09    if(mh.mail_private.and..not.((zmail_to.eq.mail_name).or.
  892. X`091`09(mh.mail_from.eq.mail_name).or.sysop)) go to 11190
  893. X`09    if(mh.mail_read) then
  894. X`09`09istat=str$trim(mh.mail_to,mh.mail_to,length)
  895. X`09`09mh.mail_to=mh.mail_to(1:length)//' (X)'
  896. X`09`09end if
  897. X`09    write(6,1022)crlf(:cl),mh.mail_section,mh.mail_messnum,
  898. X`091`09mh.mail_from,mh.mail_to,mh.mail_subject
  899. X11120`09    write(6,1001)crlf(:cl)//'Command? (C,E,F,K,?) `5BC`5D'
  900. X`09    dummy=1
  901. X`09    call get_uplow_string(cdummy,dummy)
  902. X`09    istat=str$upcase(cdummy,cdummy)
  903. X`09    if(dummy.eq.0.or.cdummy.eq.'C') go to 11190
  904. X`09    if(cdummy.eq.'?') then
  905. X`09`09write(6,1001)crlf(:cl)//'(C)ontinue'
  906. X`09`09write(6,1001)crlf(:cl)//'(E)xit'
  907. X`09`09write(6,1001)crlf(:cl)//'(F)lag'
  908. X`09`09write(6,1001)crlf(:cl)//'(K)ill'
  909. X`09`09go to 11120
  910. X`09`09end if
  911. X`09    if(cdummy.eq.'F') then
  912. X`09`09num_flags=num_flags+1
  913. X`09`09flags(num_flags)=mh.mail_messnum
  914. X`09`09if(num_flags.eq.100) then
  915. X`09`09    write(6,1001)crlf(:cl)//'You have set 100 flags.'
  916. X`09`09    write(6,1001)crlf(:cl)//'You must read these before'
  917. X`09`09    write(6,1001)crlf(:cl)//'flagging any more.'
  918. X`09`09    unlock(unit=2)
  919. X`09`09    unlock(unit=3)
  920. X`09`09    go to 0200
  921. X`09`09    end if
  922. X`09`09go to 11190
  923. X`09`09end if
  924. X`09    if(cdummy.eq.'E') go to 11900
  925. X`09    if(cdummy.eq.'K') then
  926. X`09`09call kill_mess(krec,status)
  927. X`09`09if(status.eq.1) go to 90500
  928. X`09`09if(status.eq.2) go to 90600
  929. X`09`09go to 11190
  930. X`09`09end if
  931. X`09    write(6,1001)crlf(:cl)//'That was not a valid command.'
  932. X`09    go to 11120
  933. X
  934. X11190`09    end do
  935. X`09go to 11900
  936. X
  937. X
  938. X11200`09continue`09`09!Scan on from field
  939. X`09field=1
  940. X`09go to 11500
  941. X
  942. X11300`09continue`09`09!Scan on to field
  943. X`09field=2
  944. X`09go to 11500
  945. X
  946. X11400`09continue`09`09!Scan on subject field
  947. X`09field=3
  948. X`09go to 11500
  949. X
  950. X11500`09continue
  951. X`09dummy=-30
  952. X`09write(6,1001)crlf(:cl)//'Search string? `5Bexit`5D'
  953. X`09call get_uplow_string(string,dummy)
  954. X`09istat=str$upcase(string,string)
  955. X`09if(dummy.eq.0)  then
  956. X`09    unlock(unit=2)
  957. X`09    unlock(unit=3)
  958. X`09    go to 0200
  959. X`09    end if
  960. X`09istat=str$trim(string,string,length)
  961. X`09irec=1
  962. X`09do krec=2,last_header
  963. X`09    read(2,rec=krec,iostat=ios,err=90600) mh
  964. X`09    unlock(unit=2)
  965. X`09    if(mh.mail_messnum.gt.last_mnum) go to 11900
  966. X`09    if(mh.mail_deleted) goto 11590
  967. X`09    istat=str$upcase(zmail_to,mh.mail_to)
  968. X`09    if(mh.mail_private.and..not.((zmail_to.eq.mail_name).or.
  969. X`091`09(mh.mail_from.eq.mail_name).or.sysop)) go to 11590
  970. X`09    if(field.eq.1) then
  971. X`09`09count=str$position(mh.mail_from,string(1:length))
  972. X`09    else if(field.eq.2) then
  973. X`09`09count=str$position(zmail_to,string(1:length))
  974. X`09    else if(field.eq.3) then
  975. X`09`09istat=str$upcase(zmail_subject,mh.mail_subject)
  976. X`09`09count=str$position(zmail_subject,string(1:length))
  977. X`09    end if
  978. X`09    if (count.eq.0) go to 11590
  979. X
  980. X`09    if(mh.mail_read) then
  981. X`09`09istat=str$trim(mh.mail_to,mh.mail_to,dummy)
  982. X`09`09mh.mail_to=mh.mail_to(1:dummy)//' (X)'
  983. X`09`09end if
  984. X`09    write(6,1022)crlf(:cl),mh.mail_section,mh.mail_messnum,
  985. X`091`09mh.mail_from,mh.mail_to,mh.mail_subject
  986. X11520`09    write(6,1001)crlf(:cl)//'Command? (C,E,F,K,?) `5BC`5D'
  987. X`09    dummy=1
  988. X`09    call get_uplow_string(cdummy,dummy)
  989. X`09    istat=str$upcase(cdummy,cdummy)
  990. X`09    if(dummy.eq.0.or.cdummy.eq.'C') go to 11590
  991. X`09    if(cdummy.eq.'?') then
  992. X`09`09write(6,1001)crlf(:cl)//'(C)ontinue'
  993. X`09`09write(6,1001)crlf(:cl)//'(E)xit'
  994. X`09`09write(6,1001)crlf(:cl)//'(F)lag'
  995. X`09`09write(6,1001)crlf(:cl)//'(K)ill'
  996. X`09`09go to 11520
  997. X`09`09end if
  998. X`09    if(cdummy.eq.'F') then
  999. X`09`09num_flags=num_flags+1
  1000. X`09`09flags(num_flags)=mh.mail_messnum
  1001. X`09`09if(num_flags.eq.100) then
  1002. X`09`09    write(6,1001)crlf(:cl)//'You have set 100 flags.'
  1003. X`09`09    write(6,1001)crlf(:cl)//'You must read these before'
  1004. X`09`09    write(6,1001)crlf(:cl)//'flagging any more.'
  1005. X`09`09    unlock(unit=2)
  1006. X`09`09    unlock(unit=3)
  1007. X`09`09    go to 0200
  1008. X`09`09    end if
  1009. X`09`09go to 11590
  1010. X`09`09end if
  1011. X`09    if(cdummy.eq.'E') go to 11900
  1012. X`09    if(cdummy.eq.'K') then
  1013. X`09`09call kill_mess(krec,status)
  1014. X`09`09if(status.eq.1) go to 90500
  1015. X`09`09if(status.eq.2) go to 90600
  1016. X`09`09go to 11590
  1017. X`09`09end if
  1018. X`09    write(6,1001)crlf(:cl)//'That was not a valid command.'
  1019. X`09    go to 11520
  1020. X
  1021. X11590`09    end do
  1022. X
  1023. X11900`09if(num_flags.eq.0) then
  1024. X`09    write(6,1001)crlf(:cl)//'No messages flagged.'
  1025. X`09else
  1026. X`09    write(6,1023)crlf(:cl),num_flags
  1027. X`09end if
  1028. X`09unlock(unit=2)
  1029. X`09unlock(unit=3)
  1030. X`09go to 0200
  1031. X
  1032. X
  1033. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1034. Vccc
  1035. X12000`09continue`09`09!User log
  1036. X`09area='user log'
  1037. X`09write(6,1001)crlf(:cl)//'Please enter starting surname'
  1038. X`09write(6,1001)crlf(:cl)//'or <cr> to start at beginning.'
  1039. X`09write(6,1001)crlf(:cl)//'?'
  1040. X`09dummy=20
  1041. X`09call get_uplow_string(zur.user_key,dummy)
  1042. X`09call str$upcase(zur.user_key,zur.user_key)
  1043. X`09if(dummy.eq.0) zur.user_key=zeros
  1044. X`09write(6,1001)crlf(:cl)//'Enter cutoff date for login (users'//
  1045. X`091   ' before this date will not be'//crlf(:cl)//
  1046. X`092   'displayed.)  The date must be dd-mmm-yyyy (e.g. 19-APR-1986)'//
  1047. X`093   crlf(:cl)//'Or enter <cr> for a complete list.'//
  1048. X`094   crlf(:cl)//'?'
  1049. X`09dummy=11
  1050. X`09call get_uplow_string(line,dummy)
  1051. X`09if(dummy.eq.0) line='01-JUL-1985'
  1052. X`09istat=str$upcase(line,line)
  1053. X`09istat = sys$bintim(line(:11)//' 00:00:00',long_ago)
  1054. X`09istat = sys$asctim(,line,long_ago,)
  1055. X`09dummy=0
  1056. X
  1057. X`09call out(crlf(:cl)//'Ctrl-s to pause/Ctrl-q to resume,'//
  1058. X`091   ' Ctrl-o to skip',*12100)
  1059. X`09call out('Users logged on since: '//line(:11)//crlf(:cl),*12100)
  1060. X`09call out('User name                    Last logon'//
  1061. X`091    '         # Times  Calling from',*12100)
  1062. X`09call out('---------------------------------------'//
  1063. X`091    '------------------------------',*12100)
  1064. X12050`09read(1,keygt=zur.user_key,iostat=ios,err=12150)zur
  1065. X`09call ctrl_o_check(*12100,*12100)
  1066. X`09if(.not.zur.approved) go to 12050
  1067. X`09istat = sys$bintim(zur.last_log_date(1:7)//'19'//
  1068. X`091   zur.last_log_date(8:9)//' '//zur.last_log_time,his_login)
  1069. X`09if(hl(2).lt.la(2)) go to 12050
  1070. X`09istat=str$trim(zlast_name,zur.user_key(1:20),dummy1)
  1071. X`09istat=str$trim(zfirst_name,zur.user_key(21:40),dummy2)
  1072. X`09istat=str$trim(zur.city,zur.city,dummy4)
  1073. X`09dummy3=27-dummy1-dummy2
  1074. X`09if(dummy3.lt.1) dummy3=1
  1075. X`09write(6,1008)crlf(:cl),zfirst_name(1:dummy2)//' '//
  1076. X`091    zlast_name(1:dummy1)//space(1:dummy3),
  1077. X`092    zur.last_log_date,zur.last_log_time,zur.num_logon,
  1078. X`093    zur.city(1:dummy4)//','//zur.state
  1079. X`09dummy=dummy+1
  1080. X`09go to 12050
  1081. X
  1082. X12100`09write(6,1001)crlf(:cl)//crlf(:cl)//'Aborted'
  1083. X`09go to 12151
  1084. X
  1085. X12150`09write(6,1001)crlf(:cl)//crlf(:cl)//'End of user log'
  1086. X12151`09write(6,1005)crlf(:cl),dummy
  1087. X`09unlock(unit=1)
  1088. X`09go to 0200
  1089. X
  1090. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1091. Vccc
  1092. X13000`09continue`09`09!Welcome message
  1093. X`09area='welcome reprint'
  1094. X`09call type_file('ubbs_data:welcome.txt')
  1095. X`09go to 0200
  1096. X
  1097. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1098. Vccc
  1099. X14000`09continue`09`09!Xpert user mode
  1100. X`09area='expert'
  1101. X`09read(1,key=ur.user_key,iostat=ios,err=90500)ur
  1102. X`09ur.xpert = .not. ur.xpert
  1103. X`09rewrite(1,err=90500)ur
  1104. X`09go to 0200
  1105. X
  1106. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1107. Vccc
  1108. X15000`09continue`09`09!CB simulator
  1109. X`09if(arklug) then
  1110. X`09    call arklug_cb(*90500)
  1111. X`09else
  1112. X`09    call ubbs_cb(*90500)
  1113. X`09end if
  1114. X`09go to 0200
  1115. X
  1116. X
  1117. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1118. Vccc
  1119. Xc
  1120. Xc`09exception conditions are handled after 90000
  1121. Xc
  1122. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1123. Vccc
  1124. X90000`09call type_file('ubbs_data:badpass.txt')
  1125. X`09go to 99990
  1126. Xc
  1127. X90500`09continue
  1128. X`09write(6,1001)crlf(:cl)//'Internal error -- unable to update userlog.'
  1129. X`09write(6,1001)crlf(:cl)//'The sysop will be notified.'
  1130. X`09error='unable to update user log'
  1131. X`09go to 90900
  1132. Xc
  1133. X90600`09write(6,1001)crlf(:cl)//'Internal error -- unable'//
  1134. X`091   ' to access message file.'
  1135. X`09write(6,1001)crlf(:cl)//'The sysop will be notified.'
  1136. X`09error='unable to access message.hed file'
  1137. X`09go to 90900
  1138. Xc
  1139. X90700`09write(6,1001)crlf(:cl)//'Internal error -- unable'//
  1140. X`091   ' to access message file.'
  1141. X`09write(6,1001)crlf(:cl)//'The sysop will be notified.'
  1142. X`09error='unable to access message.dat file'
  1143. X`09go to 90900
  1144. Xc
  1145. X90900`09continue
  1146. Xc
  1147. Xc`09error message to sysop here
  1148. Xc
  1149. X`09close(unit=1)
  1150. X`09close(unit=2)
  1151. X`09close(unit=3)
  1152. X`09open(unit=4,file='mail.tmp',status='new',
  1153. X`091    carriagecontrol='list')
  1154. X`09write(4,1001)'The BBS has a fatal error'
  1155. X`09write(4,1001)'The user is '//mail_name
  1156. X`09write(4,1001)'The area is '//area
  1157. X`09write(4,1001)'The error is '//error
  1158. X`09write(4,1007)'The iostatus is ',ios
  1159. X`09close(unit=4)
  1160. X`09istat=lib$spawn('mail/subject="abort" mail.tmp sysop')
  1161. X`09go to 99990
  1162. X
  1163. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1164. Vccc
  1165. Xc
  1166. Xc`09User has exceeded his allowable time
  1167. Xc
  1168. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1169. Vccc
  1170. X
  1171. X91000`09write(6,1001)crlf(:cl)//
  1172. X`091   'You have been logged on for 1 hour today.'
  1173. X`09write(6,1001)crlf(:cl)//'You must wait until tomorrow.'
  1174. X`09read(1,key=ur.user_key,iostat=ios,err=90500)ur
  1175. X`09ur.seconds_today = current_units
  1176. X`09rewrite(1,iostat=ios,err=90500)ur
  1177. X`09go to 99990
  1178. X
  1179. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1180. Vccc
  1181. Xc
  1182. Xc`09exit from the BBS the right way
  1183. Xc
  1184. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1185. Vccc
  1186. X99990`09continue
  1187. X`09close(unit=1)
  1188. X`09close(unit=2)
  1189. X`09close(unit=3)
  1190. X`09interactive=.false.`09`09!reset before exiting
  1191. X`09call setup_local(interactive)
  1192. X`09write(6,1001)crlf(:cl)
  1193. X`09call exit
  1194. X`09end
  1195. $ CALL UNPACK BBS.FOR;165 1934534152
  1196. $ create 'f'
  1197. X`09subroutine arklug_cb(*)
  1198. X`09include 'bbs_inc.for'
  1199. X`09call out('The CB is not currently implemented on the BBS.',*0200)
  1200. X`09call out('If the CB becomes available a bulletin will be,',*0200)
  1201. X`09call out('placed on the BBS.',*0200)
  1202. X`09call out('                    Thank You',*0200)
  1203. X`09call out('                    Sysop',*0200)
  1204. X 0200`09return
  1205. X`09end
  1206. X`0C
  1207. X`09subroutine ubbs_cb(*)
  1208. Xc`09This is a version of cb for the bulletin board
  1209. Xc++
  1210. Xc
  1211. Xc`09>>>>>  CB/Vax Version 3.1  <<<<<
  1212. Xc
  1213. Xc`09The Citizens' Band radio simulator for VAX/VMS.  (This is such
  1214. Xc`09an incredible simulation, you'll think it's the real thing!)
  1215. Xc
  1216. Xc`09Written by:`09Dale Miller
  1217. Xc`09`09`09University of Arkansas at Little Rock
  1218. Xc`09`09`092801 S. University
  1219. Xc`09`09`09Little Rock, AR  72204
  1220. Xc`09`09`09(501) 569-3220
  1221. Xc
  1222. Xc`09Based on RATFIV coding by Chris Thomas - whereabouts currently unknown.
  1223. Xc`09Version 3.0 is a complete re-write of the RATFIV code distributed on
  1224. Xc`09the DECUS symposia tapes.
  1225. X`09
  1226. Xc
  1227. Xc`09While all of the coding is certainly original, the idea isn't....
  1228. Xc`09This looks very, very much like the CB simulator program that runs
  1229. Xc`09on the CompuServe Information Service.
  1230. Xc
  1231. Xc
  1232. Xc`09`09`09****  Important Notes  ****
  1233. Xc
  1234. Xc`09Starting with V2.0, CB/Vax is distributed in two parts:
  1235. Xc`091)  CBMGR.FOR is the CB Manager.  It runs detached and performs
  1236. Xc`09    all of CB/Vax's really important functions.
  1237. Xc`092)  CB.FOR, this program, is the user interface to CB/Vax.
  1238. Xc`09You need -both- of these to run CB/Vax!!!
  1239. Xc
  1240. Xc`09CB.EXE needs to be INSTALLed with the following privileges:
  1241. Xc`09`09DETACH, WORLD, OPER, SYSNAM, PRMMBX, ALTPRI.
  1242. Xc
  1243. Xc
  1244. Xc`09Modification History:
  1245. Xc
  1246. Xc`0924-Apr-1986`09V3.1`09o  Attempt is now made to start cb_manager
  1247. Xc`09`09`09`09   without any logical name checking.
  1248. Xc
  1249. Xc`0925-Jan-86/DOM`09V3.0`09o  Complete re-write in Fortran-77
  1250. Xc`09`09`09`09   Addition of scrambling, /time, /squelch.
  1251. Xc`09`09`09`09   Provisions for running on a VAXcluster.
  1252. Xc
  1253. Xc`0927-Apr-83/JCT`09V2.3`09o  Trap `5EZ's and, if just waiting for a
  1254. Xc`09`09`09`09   message, behave like /EXIT.
  1255. Xc`09`09`09`09o  Check for /NOBROADCAST at startup and, if
  1256. Xc`09`09`09`09   so, tell the user that this won't work.
  1257. Xc`09`09`09`09o  Display the current time on a summons.
  1258. Xc`09`09`09`09o  Check the MAXPEOPLE limit in the manager.
  1259. Xc`09`09`09`09o  Check against batch access, since that's
  1260. Xc`09`09`09`09   real nasty.
  1261. Xc`09`09`09`09o  In Manager, before every send we check to
  1262. Xc`09`09`09`09   make sure the destination terminal is
  1263. Xc`09`09`09`09   still owned by the original PID.  This is
  1264. Xc`09`09`09`09   to handle line drops and operator STOPs.
  1265. Xc`09`09`09`09   Otherwise, messages would continue to be
  1266. Xc`09`09`09`09   sent to these terminals.
  1267. Xc
  1268. Xc`0916-Apr-83/JCT`09V2.2`09o  The terminal name is now obtained by
  1269. Xc`09`09`09`09   looking at SYS$COMMAND instead of SYS$INPUT.
  1270. Xc`09`09`09`09   When we were run from a command procedure,
  1271. Xc`09`09`09`09   this caused many problems.
  1272. Xc`09`09`09`09o  Commands need only be typed to uniqueness
  1273. Xc`09`09`09`09   now, also they may be fully typed out,
  1274. Xc`09`09`09`09   instead of the old 3-character limit.
  1275. Xc`09`09`09`09o  The /SUMMON command has been added.
  1276. Xc`09`09`09`09o  Users can't have null handles anymore.
  1277. Xc
  1278. Xc`0927-Mar-83/JCT`09V2.1`09Substantial enhancements from V2.0:
  1279. Xc`09`09`09`09o  40-channel capability
  1280. Xc`09`09`09`09o  /STA, /UST, /HAN, /TUN, /HEL commands
  1281. Xc`09`09`09`09o  The symbol CB_HANDLE is checked for a
  1282. Xc`09`09`09`09   predefined handle.
  1283. Xc`09`09`09`09o  Commands can be in mixed case, and only
  1284. Xc`09`09`09`09   the first three letters matter.
  1285. Xc`09`09`09`09o  Duplicate handles are prohibited.
  1286. Xc`09`09`09`09o  The CB Manager is automatically created
  1287. Xc`09`09`09`09   if it's not present at startup.
  1288. Xc`09`09`09`09o  The CB Manager is automatically deleted
  1289. Xc`09`09`09`09   if there's nobody running CB.
  1290. Xc
  1291. Xc`0925-Mar-83/JCT`09V2.0`09Almost total rewrite of V1.0:
  1292. Xc`09`09`09`09o  Introduced the "CB Manager" concept.
  1293. Xc`09`09`09`09o  Changed default channel to 1.
  1294. Xc
  1295. Xc--
  1296. X`09implicit integer*4 (a-z)
  1297. X`09parameter PCB$V_BATCH = '0E'x`09 ! either of these.
  1298. X`09include '($jpidef)'
  1299. X`09include '($prvdef)'
  1300. X`09include '($ttdef)'
  1301. X`09include '($libclidef)'
  1302. X`09include '($dvidef)'
  1303. X`09include 'bbs_inc.for'
  1304. Xc***************************************************************************
  1305. V***
  1306. Xc                                                                        `20
  1307. V    *
  1308. Xc`09****  CB/Vax Site-Specific Things  ****                               *
  1309. Xc`09(Change at your own discretion - and risk)                            *
  1310. Xc                                                                        `20
  1311. V    *
  1312. Xc***************************************************************************
  1313. V***
  1314. X`09character*(*)cbmgr_location, cb_mailbox_name, cb_handle,
  1315. X`091   cbmgr_procname
  1316. X`09parameter(cbmgr_location = 'sys$common:`5Bsysmgr.ualr.cb`5Dcbmgr.exe',
  1317. X`091   cb_mailbox_name = 'CB_MBX', cb_handle = 'CB_HANDLE',
  1318. X`092   cbmgr_procname = 'CB_Manager', cbmgr_grp = 1, cbmgr_mem = 4,
  1319. X`093   cbmgr_priority = 5)
  1320. Xc`09****  end OF SITE-SPECIFIC THINGS  ****
  1321. X
  1322. X`09character*20 tran, our_term, pterminal, nodename
  1323. X`09character*12 my_username
  1324. X`09character*132 text,otext
  1325. X`09character*16 handle
  1326. X`09character*32 mbname, arg
  1327. X`09character*255 msg, ucased
  1328. X`09character*4 command
  1329. X`09character*1 space
  1330. X`09character currtim*8,ctime*8,cdate*9
  1331. X`09character*9 dow(7)/'Monday','Tuesday','Wednesday','Thursday',
  1332. X`091   'Friday','Saturday','Sunday'/
  1333. X`09integer*4 privs(2), items(13), dvi_items(4)
  1334. X`09logical*1 wait, bad_handle,bbs
  1335. X`09integer*4 write_code,ctrl_mask
  1336. X`09structure /status_block/
  1337. X`09    integer*2 iostat,
  1338. X`091`09      msg_len
  1339. X`09    integer*4 reader_pid
  1340. X`09    end structure
  1341. X`09record /status_block/ iostatus
  1342. X`09integer sys$crembx,sys$ascefc,sys$waitfr,sys$qio
  1343. X
  1344. X
  1345. Xc`09Message code definitions for the CB Manager.  The first byte of every
  1346. Xc`09message sent to him contains the action to be taken, as defined here:
  1347. X
  1348. X`09parameter(new_person = 1, chatter = 2, leaving = 3, ustat = 4,
  1349. X`091   status = 5, tune = 6, chg_handle = 7, scramble = 8,`20
  1350. X`092   squelch = 9, summon = 10)
  1351. X
  1352. X2000`09format(a)
  1353. X2001`09format(' You are monitoring channels ',i2,' and ',i2)
  1354. X
  1355. X`09if (.not.approved_cb) then
  1356. X`09    write(6,2000)crlf(:cl)//'You are not yet approved to'//
  1357. X`091`09' use CB.'//bell
  1358. X`09    write(6,2000)crlf(:cl)//'Sorry.'
  1359. X`09    return
  1360. X`09    end if
  1361. X`09write(6,2000)crlf(:cl)//'Starting CB simulator.'
  1362. X`09write(6,2000)crlf(:cl)//'For help, type /HELP'
  1363. X`09write(6,2000)crlf(:cl)//'to exit, type /EXIT'
  1364. X
  1365. X
  1366. X`09write_code=io$_writevblk .or. io$m_now
  1367. X`09len = 255
  1368. X`09command_index = 0
  1369. X
  1370. X`09items(1) = (65536*jpi$_grp) + 4
  1371. X`09items(2) = %loc(grp)
  1372. X`09items(3) = 0
  1373. X`09items(4) = (65536*jpi$_mem) + 4
  1374. X`09items(5) = %loc(mem)
  1375. X`09items(6) = 0
  1376. X`09items(7) = (65536*jpi$_username) + 12
  1377. X`09items(8) = %loc(my_username)
  1378. X`09items(9) = 0
  1379. X`09items(10) = (65536*jpi$_sts) + 4
  1380. X`09items(11) = %loc(proc_status)
  1381. X`09items(12) = 0
  1382. X`09items(13) = 0
  1383. X`09call sys$getjpi(, , , items, , , )
  1384. X
  1385. X`09sta = sys$setrwm(%val(1))
  1386. X
  1387. Xc`09Disable control-Y's while we run.  If we don't, the CB Manager
  1388. Xc`09won't know when we're done, and he'll continue to send messages,
  1389. Xc`09making the user somewhat unhappy.
  1390. X
  1391. X`09call lib$disable_ctrl(lib$m_cli_ctrly,ctrl_mask)
  1392. X
  1393. Xc`09Check our status bits to make sure we're interactive.  Batch access
  1394. Xc`09to CB/Vax is not the least bit friendly!
  1395. X
  1396. X`09if ((proc_status .and. (2**'0e'x)) .ne. 0) then
  1397. X`09    write(6,2000)crlf(:cl)//'%You can''t run CB/Vax from batch.'
  1398. X`09    go to 99000
  1399. X`09    end if
  1400. X
  1401. Xc`09Check to make sure our terminal is /BROADCAST.  If it's not, then
  1402. Xc`09nothing else here will work.
  1403. X
  1404. X`09dvi_items(1) = (65536*'0a'x) + 4
  1405. X`09dvi_items(2) = %loc(devdepend)
  1406. X`09dvi_items(3) = 0
  1407. X`09dvi_items(4) = 0
  1408. X`09call sys$getdvi(, , 'SYS$COMMAND', dvi_items, , , , )
  1409. X`09if ((devdepend .and. tt$m_nobrdcst) .ne. 0) then
  1410. X`09    write(6,2000)crlf(:cl)//
  1411. X`091`09'%Your terminal is set /NOBROADCAST.'
  1412. X`09    write(6,2000)crlf(:cl)//
  1413. X`091`09'%CB/Vax will not work with your terminal '//
  1414. X`091`09'set this way.'
  1415. X`09    go to 99000
  1416. X`09    end if
  1417. X
  1418. X
  1419. X`09write(6,2000)crlf(:cl)//'Welcome to CB/Vax V3.1'
  1420. X`09if(my_username.eq.'BBS') then
  1421. X`09    bbs=.true.
  1422. X`09else
  1423. X`09    bbs=.false.
  1424. X`09endif
  1425. X
  1426. Xc`09Decide if we need to start up the CB Manager.  Attempt to translate
  1427. Xc`09the mailbox's logical name.  If we fail, then we assume the manager
  1428. Xc`09doesn't exist, so we start him up with appropriate privileges.
  1429. X
  1430. X`09sta = sys$trnlog(cb_mailbox_name,,mbname,,,)
  1431. X
  1432. Xc`09if (sta .ne. 1) then
  1433. X`09    privs(1) = prv$m_oper + prv$m_prmmbx + prv$m_setpri +`20
  1434. X`091`09prv$m_sysnam + prv$m_world
  1435. X`09    privs(2) = 0
  1436. X`09    sta2 = sys$creprc(,cbmgr_location,,,,%ref(privs(1)),,
  1437. X`091`09cbmgr_procname,%val(cbmgr_priority),%val((65536*cbmgr_grp)
  1438. X`092`09+ cbmgr_mem),,)
  1439. X`09    if (sta2 .ne. ss$_normal .and. sta2 .ne. ss$_duplnam) then
  1440. X`09`09write(6,2000)crlf(:cl)//
  1441. X`091`09    '??Can''t start CB Manager.'
  1442. X`09`09write(6,2000)crlf(:cl)//
  1443. X`091`09    'Please contact the system manager.'
  1444. X`09`09go to 99000
  1445. X`09`09end if
  1446. Xc`09     end if
  1447. Xc`09Turn off privs for this process.
  1448. X
  1449. X`09privs(1) = privs(1) + prv$m_detach
  1450. Xc`09sta = sys$setprv(%val(0),%ref(privs(1)),%val(0),)
  1451. X
  1452. X
  1453. Xc`09Try to read the global symbol CB_HANDLE from our process tables.
  1454. Xc`09If it's there, then we'll use that as our initial handle.  (You
  1455. Xc`09see, having simple entry into CB is important to get people to
  1456. Xc`09use it a lot.)
  1457. X
  1458. X`09space = ' '
  1459. X2060`09continue
  1460. X`09bad_handle = .false.
  1461. X`09sta = lib$get_symbol(cb_handle, handle)
  1462. X`09if (.not.(sta .and. 1)) then
  1463. X`09    write(6,2000)crlf(:cl)//'What''s your handle? '
  1464. X`09    read(5,2000, end=2060, err=2060) handle
  1465. X`09    call lib$set_symbol(cb_handle, handle)
  1466. X`09    end if
  1467. X`09    ista=str$trim(handle,handle,i)
  1468. X`09if (i .eq. 0) then
  1469. X`09    write(6,2000)crlf(:cl)//'You can''t have a null handle!'
  1470. X`09    bad_handle = .true.
  1471. X`09    call lib$delete_symbol(cb_handle)
  1472. +-+-+-+-+-+-+-+-  END  OF PART 2 +-+-+-+-+-+-+-+-
  1473.