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

  1. Path: sparky!uunet!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 03/12
  5. Message-ID: <7868452@MVB.SAIC.COM>
  6. Date: Fri, 21 Aug 1992 20:19:19 GMT
  7. Organization: Doyle, Munroe Consultants, Inc., Hudson, MA
  8. Lines: 1438
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: munroe@dmc.com (Dick Munroe)
  12. Posting-number: Volume 3, Issue 111
  13. Archive-name: ubbs/part03
  14. -+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+
  15. X`09    end if
  16. X`09do k=1,i
  17. X`09    if(ichar(handle(k:k)).lt.32.or.ichar(handle(k:k)).gt.126) then
  18. X`09`09write(6,2000)crlf(:cl)//'Invalid character in handle'
  19. X`09`09bad_handle=.true.
  20. X`09`09call lib$delete_symbol(cb_handle)
  21. X`09`09endif
  22. X`09    enddo
  23. X`09if (bad_handle) goto 2060
  24. X`09length=11
  25. X`09tran='SYS$COMMAND'
  26. X`09sta = sys$trnlog(tran(1:length),length,tran,,,)
  27. X`09our_term = tran(5:20)
  28. X`09sta = str$trim(our_term, our_term, length)
  29. X`09if (our_term(length:length) .ne. ':') then
  30. X`09    our_term(length + 1:length + 1) = ':'
  31. X`09    end if
  32. X`09is = index(our_term, '$')
  33. X`09nodename = our_term(1:is)
  34. X`09our_term = our_term(is + 1:20)
  35. X`09istat = lib$getdvi(dvi$_tt_phydevnam, , our_term, , pterminal, )
  36. X`09our_term = nodename(1:is)//pterminal(2:20)
  37. X`09nodename=nodename(3:is-1)
  38. X`09new_chan = 1
  39. X
  40. X
  41. XC`09Build a "new user" string to send to the manager, and send it through
  42. XC`09the mailbox.
  43. X`09msg(1:1)   = char(new_person)
  44. X`09msg(2:17)  = our_term
  45. X`09msg(18:18) = char(new_chan)
  46. X`09msg(19:19) = null
  47. X`09msg(20:20) = null
  48. X`09msg(21:36) = handle
  49. X`09msg(37:42) = nodename
  50. X`09msg(43:50) = ' '`09`09!Scramble key
  51. X`09msg(51:51) = null`09`09!Scramble type
  52. X`09msg(52:)   = my_username
  53. X
  54. XC`09Open up the mailbox.  This is trickier than it appears...  If we've
  55. XC`09just created the Manager, the mailbox logical may not be defined by
  56. XC`09the time we reach here, especially if we're on a fast system.
  57. XC`09If we have trouble opening the mailbox, then we keep trying every`20
  58. XC`09two seconds until it's open (max 20 seconds).
  59. X`09trys=0
  60. X
  61. X`09sta = .false.
  62. X`09do while(.not.sta)
  63. X`09    sta = sys$assign(cb_mailbox_name,mbx_chan,,,)
  64. X`09    if (.not. sta) then
  65. X`09`09trys=trys+1
  66. X`09`09if(trys.gt.10) then
  67. X`09`09    write(6,2000)crlf(:cl)//
  68. X`091`09`09'CB internal error.  exiting CB-Vax.'
  69. X`09`09    go to 99000
  70. X`09`09else
  71. X`09`09    call bas$sleep(%val(2))
  72. X`09`09end if
  73. X`09    endif
  74. X`09    end do
  75. X`09go to 30000`09`09!Start the whole thing off
  76. X
  77. X
  78. XC`09Long loop.  Repeat until we get an /EXIT command or `5EZ from the user.
  79. XC`09If it's a command, go execute it.  Otherwise, we build a message
  80. XC`09and send it off to the Manager.
  81. X
  82. X2180`09continue
  83. X`09if (command_index.eq.1) then
  84. X`09    go to 99000
  85. X`09    end if
  86. Xc***************************************************************************
  87. V**
  88. Xc`09the following is necessary for the user timer
  89. Xc***************************************************************************
  90. V**
  91. X`09call add_elapsed_time(*4000)
  92. Xc`09****** end of timer *****
  93. Xc`09read(5, 2000, end=4000, err=4000) text
  94. X`09write(6,2000)crlf(:cl)
  95. X`09txtlen=-132`09`09`09!allow for ctrl-z
  96. X`09call get_uplow_string(text,txtlen)
  97. X`09if(txtlen.lt.0) go to 4000
  98. X`09call parse_cmd(text, command_index, arg)
  99. X`09istat = str$trim(arg,arg,alen)
  100. X`09goto (3000,4000,5000,6000,7000,8000,9000,10000,11000,
  101. X`091   12000,13000,14000,15000,16000,17000,18000), command_index + 1
  102. X`09goto 2180
  103. X
  104. X3000    continue`09!message (what it's all about)
  105. X`09if((text.eq.' ').or.(text.eq.otext)) go to 2180
  106. X`09msg(1:1)   = char(chatter)
  107. X`09msg(52:)   = text
  108. X`09otext=text
  109. X`09go to 30000
  110. X
  111. X4000    continue`09!user leaving
  112. X`09msg(1:1)   = char(leaving)
  113. X`09command_index=1
  114. X`09go to 30000
  115. X
  116. X5000    continue`09!change handle
  117. X`09if(bbs) go to 2180
  118. X`09bad_handle = .false.
  119. X`09if(arg(:alen).eq.' ') then
  120. X`09    write(6,2000)crlf(:cl)//'What''s your handle? '
  121. X`09    read(5,2000, end=2060, err=2060) handle
  122. X`09else
  123. X`09    handle=arg(:alen)
  124. X`09endif
  125. X`09ista=str$trim(handle,handle,i)
  126. X`09if (i .eq. 0) then
  127. X`09    write(6,2000)crlf(:cl)//'Your handle was not changed.'
  128. X`09    go to 2180
  129. X`09    end if
  130. X`09do k=1,i
  131. X`09    if(ichar(handle(k:k)).lt.32.or.ichar(handle(k:k)).gt.126) then
  132. X`09`09write(6,2000)crlf(:cl)//'Invalid character in handle'
  133. X`09`09bad_handle=.true.
  134. X`09`09call lib$delete_symbol(cb_handle)
  135. X`09`09endif
  136. X`09    enddo
  137. X`09if (bad_handle) goto 5000
  138. X`09call lib$set_symbol(cb_handle, handle)
  139. X`09msg(1:1)   = char(chg_handle)
  140. X`09msg(21:36) = handle
  141. X`09go to 30000
  142. X
  143. X6000    continue`09!help
  144. X`09write(6,2000)crlf(:cl)//
  145. X`091   'Quick summary of CB/Vax commands:'
  146. X`09write(6,2000)crlf(:cl)//
  147. X`091   '/EXIT or `5EZ   Exits from CB/Vax'
  148. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  149. X`091   '/HANDLE       Changes your handle'
  150. X`09write(6,2000)crlf(:cl)//
  151. X`091   '/HELP         Print this help text'
  152. X`09write(6,2000)crlf(:cl)//
  153. X`091   '/MONITOR n    Monitor a channel (Max of 2)'
  154. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  155. X`091   '/SCRAMBLE xyz Scramble on key "xyz" (xmit & recieve)'
  156. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  157. X`091   '/SMC xyz      Scramble xmit/recieve scrambled & clear'
  158. X`09write(6,2000)crlf(:cl)//
  159. X`091   '/SQUELCH abc  Squelch handle "abc"'
  160. X`09write(6,2000)crlf(:cl)//
  161. X`091   '/STATUS       Report number of people on each channel'
  162. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  163. X`091   '/SUMMON user  Summon'//
  164. X`091   ' username ''user'' to CB/Vax.'
  165. X`09write(6,2000)crlf(:cl)//
  166. X`091   '/TIME         Report time, day, and date'
  167. X`09write(6,2000)crlf(:cl)//
  168. X`091   '/TUNE n       Switch to channel ''n''.  '//
  169. X`091   'Channels 1-5 available.'
  170. X`09write(6,2000)crlf(:cl)//
  171. X`091   '/UNMONITOR n  Stop monitoring a channel'
  172. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  173. X`091   '/UNSCRAMBLE   Do not xmit or recieve scrambled.'
  174. X`09write(6,2000)crlf(:cl)//
  175. X`091   '/USTAT        Detailed list of current CB/Vax users'
  176. X`09if(.not.bbs)write(6,2000)crlf(:cl)//
  177. X`091   '/XCL xyz      Xmit clear/ recieve scrambled & clear'
  178. X`09write(6,2000)crlf(:cl)//' '
  179. X`09write(6,2000)crlf(:cl)//'Commands may be in upper or lower case'
  180. X`09write(6,2000)crlf(:cl)//'and may be abbreviated to 3 characters.'
  181. X`09goto 2180
  182. X
  183. X7000`09continue`09!Monitor
  184. X`09call ots$cvt_ti_l(arg(:alen), mon_chan)
  185. X`09if ((mon_chan .lt. 1) .or. (mon_chan .gt. 5)) then
  186. X`09    write(6, 2000)crlf(:cl)//'That channel doesn''t exist!'
  187. X`09    goto 2180
  188. X`09    end if
  189. Xc`09if we are monitoring it already, ignore this request
  190. X`09if( (mon_chan.eq.ichar(msg(19:19))).or.
  191. X`091   (mon_chan.eq.ichar(msg(20:20)))) go to 2180
  192. X
  193. X`09msg(1:1)   = char(tune)
  194. X`09if(msg(19:19).eq.null) then
  195. X`09    msg(19:19) = char(mon_chan)
  196. X`09else if(msg(20:20).eq.null) then
  197. X`09    msg(20:20) = char(mon_chan)
  198. X`09else
  199. X`09    write(6,2000)crlf(:cl)//
  200. X`091`09'You can only monitor 2 channels at a time'
  201. X`09    write(6,2001)crlf(:cl),ichar(msg(19:19)),ichar(msg(20:20))
  202. X`09    go to 2180
  203. X`09endif
  204. X`09go to 30000
  205. X
  206. X8000`09continue`09!Scramble
  207. X`09if(bbs) go to 2180
  208. X`09if(alen.eq.0) then
  209. X`09    write(6,2000)crlf(:cl)//'You must provide a scramble key'
  210. X`09    go to 2180
  211. X`09    endif
  212. X`09ist=str$upcase(arg(:alen),arg(:alen))
  213. X`09msg(1:1) = char(scramble)
  214. X`09msg(43:50) = arg(:alen)
  215. X`09msg(51:51) = char(1)
  216. X`09go to 30000
  217. X
  218. X9000`09continue`09!Scramble and monitor clear
  219. X`09if(bbs) go to 2180
  220. X`09if(alen.eq.0) then
  221. X`09    write(6,2000)crlf(:cl)//'You must provide a scramble key'
  222. X`09    go to 2180
  223. X`09    endif
  224. X`09ist=str$upcase(arg(:alen),arg(:alen))
  225. X`09msg(1:1) = char(scramble)
  226. X`09msg(43:50) = arg(:alen)
  227. X`09msg(51:51) = char(2)
  228. X`09go to 30000
  229. X
  230. X10000`09continue`09!Squelch
  231. X`09msg(1:1) = char(squelch)
  232. X`09msg(52:) = arg(:alen)
  233. X`09go to 30000
  234. X
  235. X11000`09continue`09!status
  236. X`09msg(1:1)   = char(status)
  237. X`09go to 30000
  238. X
  239. X12000`09continue`09!summon
  240. X`09if(bbs) go to 2180
  241. X`09msg(1:1) = char(summon)
  242. X`09msg(52:) = arg(:alen)
  243. X`09write(6,2000)crlf(:cl)//'Summon complete.'
  244. X`09go to 30000
  245. X
  246. X13000`09continue`09!Time
  247. X`09call date(cdate)
  248. X`09call time(ctime)
  249. X`09is=lib$day_of_week(,daynum)
  250. X`09is=str$trim(dow(daynum),dow(daynum),daylen)
  251. X`09write(6,2000)crlf(:cl)//
  252. X`091   'It is '//dow(daynum)(1:daylen)//', '//cdate//
  253. X`092   ' and it is now '//ctime
  254. X`09go to 2180
  255. X
  256. X14000`09continue`09!tune
  257. X`09call ots$cvt_ti_l(arg(:alen), new_chan)
  258. X`09if(new_chan.eq.99.and.my_username.eq.'DOMILLER') then
  259. X`09    msg(1:1) = char(tune)
  260. X`09    msg(18:18)=char(new_chan)
  261. X`09    go to 30000
  262. X`09    endif
  263. X`09if ((new_chan .lt. 1) .or. (new_chan .gt. 5)) then
  264. X`09    write(6, 2000)crlf(:cl)//'That channel doesn''t exist!'
  265. X`09    goto 2180
  266. X`09    end if
  267. X`09msg(1:1)   = char(tune)
  268. X`09msg(18:18) = char(new_chan)
  269. X`09go to 30000
  270. X
  271. X15000`09continue`09!Unmonitor
  272. X`09call ots$cvt_ti_l(arg(:alen), mon_chan)
  273. X`09if ((mon_chan .lt. 1) .or. (mon_chan .gt. 40)) then
  274. X`09    write(6, 2000)crlf(:cl)//'That channel doesn''t exist!'
  275. X`09    goto 2180
  276. X`09    end if
  277. X
  278. X`09msg(1:1)   = char(tune)
  279. X`09if(msg(19:19).eq.char(mon_chan)) then
  280. X`09    msg(19:19) = null
  281. X`09else if(msg(20:20).eq.char(mon_chan)) then
  282. X`09    msg(20:20) = null
  283. X`09else
  284. X`09    write(6,2000)crlf(:cl)//'You are not monitoring that channel'
  285. X`09    go to 2180
  286. X`09endif
  287. X`09go to 30000
  288. X
  289. X16000`09continue`09!Unscramble
  290. X`09if(bbs) go to 2180
  291. X`09msg(1:1) = char(scramble)
  292. X`09msg(43:50) = ' '
  293. X`09msg(51:51) = char(0)
  294. X`09go to 30000
  295. X
  296. X17000`09continue`09!ustat
  297. X`09msg(1:1)   = char(ustat)
  298. X`09go to 30000
  299. X
  300. X18000`09continue`09!Xmit clear, unscramble recieve.
  301. X`09if(bbs) go to 2180
  302. X`09if(alen.eq.0) then
  303. X`09    write(6,2000)crlf(:cl)//'You must provide a scramble key'
  304. X`09    go to 2180
  305. X`09    endif
  306. X`09ist=str$upcase(arg(:alen),arg(:alen))
  307. X`09msg(1:1) = char(scramble)
  308. X`09msg(43:50) = arg(:alen)
  309. X`09msg(51:51) = char(3)
  310. X`09go to 30000
  311. X
  312. X30000`09continue`09`09!send a message to the CB manager
  313. X`09sta = sys$qio(,%val(mbx_chan),%val(write_code),iostatus,,,
  314. X`091    %ref(msg),%val(len),,,,)
  315. X`09if(sta.eq.2264) then
  316. X`09    wait=wait+1
  317. X`09    if(wait.gt.10) go to 90000
  318. X`09    stat=lib$wait(2.0)
  319. X`09    go to 30000
  320. X`09else
  321. X`09    wait=0
  322. X`09endif
  323. X`09if (.not. sta) call lib$signal (%val(sta))
  324. X`09if (.not. iostatus.iostat) call lib$signal(%val(iostatus.iostat))
  325. X`09go to 2180
  326. Xc
  327. X90000`09continue`09`09!unable to fit a message into the mailbox
  328. X`09write(6,2000)crlf(:cl)//'CB internal error.  exiting CB-Vax.'
  329. X`09privs(1) = (2**prv$v_oper) + (2**prv$v_prmmbx) +
  330. X`091   (2**prv$v_setpri) + (2**prv$v_sysnam)
  331. X`09privs(2) = 0
  332. X`09sta2 = sys$creprc(,cbmgr_location,,,,%ref(privs(1)),,
  333. X`091   cbmgr_procname,%val(cbmgr_priority),%val((65536*cbmgr_grp)
  334. X`092   + cbmgr_mem),,)
  335. X`09if (sta2 .ne. 1) then
  336. X`09    write(6,2000)crlf(:cl)//'??Can''t start CB Manager.'
  337. X`09    write(6,2000)crlf(:cl)//'Please contact the system manager.'
  338. X`09    end if
  339. X99000`09call lib$enable_ctrl(ctrl_mask)
  340. X`09sta = sys$setrwm(%val(0))
  341. Xc`09call exit
  342. X`09return
  343. X90500`09return 1
  344. X`09end
  345. X`0C
  346. X`09subroutine parse_cmd(cmdline, command_index, arg)
  347. X`09implicit integer*4(a - z)
  348. X`09include 'bbs_inc.for'
  349. X`09parameter(maxcmd = 15)
  350. X`09character*(*)cmdline
  351. X`09character*32 arg
  352. X`09character*16 cmdlist(maxcmd), command
  353. X`09integer*2 cmdlen(maxcmd)
  354. X`09character*1 space
  355. X`09data cmdlist/'EXIT', 'HANDLE', 'HELP', 'MONITOR', 'SCRAMBLE',
  356. X`091   'SMC', 'SQUELCH', 'STATUS', 'SUMMON', 'TIME', 'TUNE',
  357. X`091   'UNMONITOR', 'UNSCRAMBLE', 'USTAT', 'XCL'/
  358. X`09data cmdlen/1,2,2,1,2,2,2,2,2,2,2,3,3,2,1/
  359. X
  360. XC`09Quick case.  If no slash in column 1, this is nothing.
  361. X`09if (cmdline(1:1) .ne. '/') then
  362. X`09    command_index = 0
  363. X`09    return
  364. X`09    end if
  365. X
  366. X`09cmdline = cmdline(2:)
  367. X`09istat = str$trim(cmdline,cmdline,len)
  368. X`09clen = str$position(cmdline,' ')
  369. X`09clen=clen-1
  370. X`09command = cmdline(1:clen)
  371. X`09call str$upcase(command, command)
  372. X`09arg = cmdline(clen+2:)
  373. X`09do i = 1, maxcmd
  374. X`09    if (command(:clen) .eq. cmdlist(i)(:clen)) go to 2600
  375. X`09    end do
  376. X2600`09continue
  377. X`09if (i .gt. maxcmd) then
  378. X`09    write(6,2000)crlf(:cl)//
  379. X`091`09'%CB-W Invalid CB command; type /HELP for help.'
  380. X`09else if (cmdlen(i).gt.clen) then
  381. X`09    write(6,2000)crlf(:cl)//
  382. X`091`09'%CB-W Ambiguous CB command; supply more characters.'
  383. X`09    i = maxcmd + 1
  384. X`09end if
  385. X`09command_index = i
  386. X`09return
  387. X 2000`09format(a)
  388. X`09end
  389. $ CALL UNPACK BBSCB.FOR;20 2119707942
  390. $ create 'f'
  391. X$ DEFINE/SYSTEM UBBS_STATUS "DOWN"
  392. $ CALL UNPACK BBSDOWN.COM;3 370442197
  393. $ create 'f'
  394. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  395. Vcccc
  396. Xc
  397. Xc`09Include file for use with UBBS program.
  398. Xc
  399. Xc`09Rev. 3.5  19-Jun-1986
  400. Xc`09Rev. 3.6  25-Jun-1986
  401. Xc`09Rev. 4.8  05-Feb-1987
  402. Xc`09Rev. 4.9  10-Feb-1987
  403. Xc`09Rev. 4.14 12-Sep-1987
  404. Xc`09Rev. 5.5  04-Jan-1988
  405. Xc`09Rev. 5.6  03-Mar-1988
  406. Xc`09Rev. 6.0  06-Jun-1988
  407. Xc`09Rev. 7.0  29-Aug-1988
  408. Xc
  409. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  410. Vcccc
  411. X
  412. X`09include '($ssdef)'
  413. X`09include '($iodef)'
  414. X`09include '($dscdef)'
  415. XC
  416. XC`09Define I/O status blocks and some descriptors.
  417. XC
  418. X`09integer*2 liosb(4), xiosb(4), ltypeahead_count(4)
  419. X
  420. X`09integer*4 local_status, local_char(3), noterm(2)
  421. X`09integer*4 tptr(2), ttbl(8)
  422. X
  423. X`09data noterm  /0,0/`09`09! Don't terminate on anything.
  424. X`09data ttbl    /0,0,0,0,0,0,0,0/`09! Long terminator table
  425. X
  426. X`09record/dscdef1/ ldesc,rdesc,xdesc
  427. X
  428. X`09common /status/ local_status, liosb, xiosb, local_char,
  429. X`091`09noterm, ttbl, tptr, ldesc, rdesc, xdesc
  430. XC
  431. XC`09Define counters, etc.
  432. XC
  433. X`09integer*4 byte_count, record_count, rbyte_count,
  434. X`091`09timeouts, parity_errors, naks_received, naks_xmitted,
  435. X`091`09enqs_received, enqs_xmitted, timeout_count,
  436. X`091`09flow, mode, dump_timeout, overrun_errors,
  437. X`091`09error_count, error_record, retry_count,
  438. X`091`09display_record, file_count, block_count, retry_limit,
  439. X`091`09block_received, block_xmitted
  440. X
  441. X`09common /counts/ byte_count, record_count, rbyte_count,
  442. X`091`09timeouts, parity_errors, naks_received, naks_xmitted,
  443. X`091`09enqs_received, enqs_xmitted, timeout_count,
  444. X`091`09ltypeahead_count, local_asts, lmax_typeahead,
  445. X`091`09dump_timeout, overrun_errors, error_count,
  446. X`091`09error_record, retry_count, display_record, file_count,
  447. X`091`09block_count, retry_limit, block_received, block_xmitted
  448. Xc
  449. Xc`09Define storage for channels and event flags.
  450. Xc
  451. X`09integer*4 lchan_in, lchan_out,
  452. X`091`09local_asts, lefn_in, lefn_out
  453. X
  454. X`09common /channels/ lchan_in, lchan_out,
  455. X`091`09lefn_in, lefn_out
  456. Xc
  457. Xc`09Define integers to contains character sizes.
  458. Xc
  459. X`09integer*4 lmax_typeahead, vsize, protocol, bitmask, file_type
  460. X
  461. X`09common /sizes/ vsize, protocol, bitmask, file_type
  462. Xc
  463. Xc`09Parameters.
  464. Xc
  465. X`09character*(*) null, bell, ss
  466. X`09parameter (ss = char(13)//char(10))`09! Single space.
  467. X`09parameter (bell = char(7))`09! Bell
  468. X`09parameter (null = char(0))`09! Null
  469. X`09parameter soh = 1`09`09! Start of header`09`09CTRL/A
  470. X`09parameter stx = 2`09`09! Start of text`09`09`09CTRL/B
  471. X`09parameter etx = 3`09`09! End of text`09`09`09CTRL/C
  472. X`09parameter eot = 4`09`09! End of transmission`09`09CTRL/D
  473. X`09parameter enq = 5`09`09! Enquire`09`09`09CTRL/E
  474. X`09parameter ack = 6`09`09! Acknowlegment`09`09`09CTRL/F
  475. X`09parameter bel = 7`09`09! Bell`09`09`09`09CTRL/G
  476. X`09parameter bs  = 8`09`09! Backspace`09`09`09CTRL/H
  477. X`09parameter ht  = 9`09`09! Horizontal tab`09`09CTRL/I
  478. X`09parameter lf  = 10`09`09! Line feed`09`09`09CTRL/J
  479. X`09parameter vt  = 11`09`09! Vertical tab`09`09`09CTRL/K
  480. X`09parameter ff  = 12`09`09! Form feed`09`09`09CTRL/L
  481. X`09parameter cr  = 13`09`09! Carriage return`09`09CTRL/M
  482. X`09parameter so  = 14`09`09! Shift out`09`09`09CTRL/N
  483. X`09parameter si  = 15`09`09! Shift in`09`09`09CTRL/O
  484. X`09parameter dle = 16`09`09! Data link escape`09`09CTRL/P
  485. X`09parameter dc1 = 17`09`09! Resume output to terminal`09CTRL/Q
  486. X`09parameter dc2 = 18`09`09! Device control 2`09`09CTRL/R
  487. X`09parameter dc3 = 19`09`09! Stop output to the terminal`09CTRL/S
  488. X`09parameter dc4 = 20`09`09! Device control 4`09`09CTRL/T
  489. X`09parameter nak = 21`09`09! Negative Acknowlegment`09CTRL/U
  490. X`09parameter syn = 22`09`09! Synchronize byte`09`09CTRL/V
  491. X`09parameter etb = 23`09`09! End of transmission block`09CTRL/W
  492. X`09parameter can = 24`09`09! Cancel transmission`09`09CTRL/X
  493. X`09parameter em  = 25`09`09! End of medium`09`09`09CTRL/Y
  494. X`09parameter sub = 26`09`09! End of file`09`09`09CTRL/Z
  495. X`09parameter esc = 27`09`09! Escape`09`09`09CTRL/`5B
  496. X`09parameter fs  = 28`09`09! File separator`09`09CTRL/\
  497. X`09parameter gs  = 29`09`09! Group separator`09`09CTRL/`5D
  498. X`09parameter rs  = 30`09`09! Record Separator`09`09CTRL/`5E
  499. X`09parameter us  = 31`09`09! Unit separator`09`09CTRL/_
  500. X`09parameter sp  = 32`09`09! Space
  501. X`09parameter rub = 127`09`09! Rubout
  502. X`09parameter file_unit = 10`09! Unit # for VAX file.
  503. X`09parameter out_size = 512`09! Size of SYS$OUTPUT records.
  504. X`09parameter buffer_size = 1040`09! Buffer size.
  505. X`09parameter timer_efn = 10`09! Event flag used with set timer.
  506. X`09parameter sevenbit_mask = "177`09! Seven bit mask.
  507. X`09parameter eightbit_mask = "377`09! Eight bit mask.
  508. XC
  509. XC`09Flags for LIB$SPAWN:
  510. XC
  511. X`09parameter nowait = 1`09`09!(0) If set, don't wait for command.
  512. X`09parameter noclisym = 2`09`09!(1) If set, don't copy CLI symbols.
  513. X`09parameter nolognam = 4`09`09!(2) If set, don't copy logical names.
  514. XC
  515. XC`09Buffer allocation:
  516. XC
  517. X`09logical*1 rbuffer(buffer_size)`09! Receive buffer.
  518. X`09logical*1 xbuffer(buffer_size)`09! Transmit buffer.
  519. X`09logical*1 lbuffer(buffer_size)`09! Local buffer.
  520. X`09character lbufferc*(buffer_size) ! Local buffer as a character string
  521. X`09character rbufferc*(buffer_size) ! Receive buffer as a character string
  522. X`09equivalence (lbuffer, lbufferc)
  523. X`09equivalence (rbuffer, rbufferc)
  524. X
  525. XC
  526. XC`09Flags.
  527. XC
  528. X`09logical`09controlc_typed
  529. X
  530. X`09common /flags/ controlc_typed
  531. Xc
  532. Xc`09Character strings for filenames, system type, baud rate, etc.
  533. Xc
  534. X`09character*80 local_device
  535. X`09character*128 vax_file
  536. X`09character*256 scratch
  537. X`09character*256 remote_file
  538. X
  539. X`09common /buffers/ rbuffer, xbuffer, lbuffer, vax_file,
  540. X`091 `09local_device, mode, flow, scratch, remote_file
  541. XC
  542. XC`09Direction for GET/SEND.
  543. XC
  544. X`09parameter to_vax = 1`09`09! Get a file from the remote.
  545. X`09parameter to_remote = 2`09`09! Send a file to the remote.
  546. XC
  547. XC`09Type of protocol:
  548. XC
  549. X`09parameter unknown = 0`09`09! Unknown protocol.
  550. X`09parameter xmodem = 1`09`09! CPM XMODEM protocol`20
  551. X`09parameter kermit = 2`09`09! Kermit protocol.
  552. X`09parameter asciid = 3`09`09! Ascii dump protocol
  553. X`09parameter ymodem = 4`09`09! Ymodem variation`20
  554. Xc
  555. Xc`09Type of file being transfered.
  556. Xc
  557. X`09parameter ascii = 0`09`09! Type of file is ASCII.
  558. X`09parameter binary = 1`09`09! Type of file is BINARY.
  559. X`09parameter block = 2`09`09! Use 512 byte blocks.
  560. X
  561. X`09structure /userlog_structure/
  562. X`09    character*40 user_key`09!positions   1: 40   key 0
  563. X`09    character*10 password`09!positions  41: 50
  564. X`09    character*20 city`09`09!positions  51: 70
  565. X`09    character*2  state`09`09!positions  71: 72
  566. X`09    character*20 computer`09!positions  73: 92
  567. X`09    character*9  last_log_date  !positions  93:101
  568. X`09    character*8  last_log_time`09!positions 102:109
  569. X`09    logical*1    xpert          !positions 110:110
  570. X`09    integer*4    num_logon      !positions 111:114
  571. X`09    integer*4    last_message   !positions 115:118
  572. X`09    integer*4    num_unread     !positions 119:122
  573. X`09    byte         auth_sections  !positions 123:123
  574. X`09    logical*1    approved`09!positions 124:124
  575. X`09    character*10 phone_number`09!positions 125:134
  576. X`09    character*4  user_crlf`09!positions 135:138
  577. X`09    character*4  user_ff`09!positions 139:142
  578. X`09    real*8       last_pass_chg`09!positions 143:150
  579. X`09    character*9  current_day`09!positions 151:159
  580. X`09    integer*2    seconds_today`09!positions 160:163
  581. X`09    integer*4    decus_number`09!positions 164:167
  582. X`09    character*20 company_name`09!positions 168:187
  583. X`09    byte         term_line_len  !positions 188:188
  584. X`09    byte         editor`09`09!positions 189:189
  585. X`09    integer*2    up_files       !positions 190:191
  586. X`09    integer*2    down_files     !positions 192:193
  587. X`09    end structure
  588. X
  589. X`09structure/mail_header_structure/
  590. X`09    character*30 mail_to`09!positions   1:30
  591. X`09    character*30 mail_from`09!positions  31:60
  592. X`09    character*30 mail_subject`09!positions  61:80
  593. X`09    character*9  mail_date`09!positions  81:89
  594. X`09    character*8  mail_time`09!positions  90:97
  595. X`09    byte         mail_section`09!positions  98:98
  596. X`09    integer*4    mail_first`09!positions  99:102
  597. X`09    integer*4    mail_last`09!positions 103:106
  598. X`09    integer*4    mail_messnum`09!positions 107:110
  599. X`09    logical*1    mail_private`09!positions 111:111
  600. X`09    logical*1    mail_read`09!positions 112:112
  601. X`09    logical*1    mail_deleted`09!positions 113:113
  602. X`09    logical*1    mail_person`09!positions 114:114
  603. X`09    integer*4    mail_reply_to`09!postiions 115:118
  604. X`09    integer*4    mail_replys(10)!positions 119:158
  605. X`09    real*8       mail_expire`09!positions 159:166
  606. X`09    end structure
  607. X
  608. X`09structure/file_description/
  609. X`09    character*18  file_name`09!Positions   1:18    Primary key
  610. X`09    integer*2     file_size`09!Positions  19:20
  611. X`09    real*8        upload_date`09!Positions  21:28
  612. X`09    integer*4     times_down`09!Positions  29:32
  613. X`09    character*1   file_type`09!Positions  33:33
  614. X`09    character*30  upload_name`09!Positions  34:63
  615. X`09    character*400 upload_text`09!Positions  64:463
  616. X`09    character*79  keywords`09!Positions 464:542
  617. X`09    real*8        download_date !Positions 543:550
  618. X`09    logical*1     archived      !Positions 551:551
  619. X`09    end structure
  620. X
  621. X`09character*20 secnam(8)
  622. X`09character mail_name*30,area*60
  623. X`09character*80 message(20)
  624. X`09logical*1 sysop,sysop2
  625. X`09integer last_header,last_data,first_mnum,last_mnum
  626. X`09integer user_number,ios
  627. X
  628. X`09logical*1 approved_mail_read,approved_mail_send,approved_cb
  629. X`09logical*1 approved_file_down,approved_file_up
  630. X
  631. X`09record /userlog_structure/ ur
  632. X
  633. X`09common/for_mail/ur, last_header, last_data,
  634. X`091   first_mnum, last_mnum, mail_name, sysop, sysop2,
  635. X`092   area, user_number, secnam, ios, message,
  636. X`093   approved_mail_read,approved_mail_send,approved_cb,
  637. X`094   approved_file_down,approved_file_up
  638. X
  639. Xc
  640. Xc`09Local typeahead implementation
  641. Xc
  642. X`09logical*1 tbuffer(buffer_size)`09! Local typeahead buffer
  643. X`09character cbuffer*(buffer_size)`09! Also local typeahead buffer
  644. X`09integer tnext
  645. X`09equivalence(tbuffer,cbuffer)
  646. X
  647. X`09common/typeah/tbuffer,tnext
  648. Xc
  649. Xc`09screen formatting characters
  650. Xc
  651. X`09character*4 crlf,ffeed
  652. X`09integer cl,fl
  653. X
  654. X`09common/screen_controls/crlf,ffeed,cl,fl
  655. X
  656. Xc`09Timer pointers
  657. X
  658. X`09integer*4 file_timer,user_timer,initial_units,current_units,
  659. X`091   allowable_units
  660. X
  661. X`09common/timers/file_timer,user_timer,initial_units,current_units,
  662. X`091   allowable_units
  663. X
  664. Xc`09EDT definitions (since they aren't in the library)
  665. X
  666. XC`09Integer*4 EDT$M_RECOVER,EDT$M_COMMAND,EDT$M_NOJOURNAL
  667. XC`09Integer*4 EDT$M_NOOUTPUT,EDT$M_NOCOMMAND,EDT$M_NOCREATE
  668. X`09Parameter`09EDT$M_RECOVER = `091`09! recover this edit
  669. X`09Parameter`09EDT$M_COMMAND =`09`092`09! read command file
  670. X`09Parameter`09EDT$M_NOJOURNAL =`094`09! do not open journal
  671. X`09Parameter`09EDT$M_NOOUTPUT = `098`09! do not write output
  672. X`09Parameter`09EDT$M_NOCOMMAND = `0916`09! do not read cmd file
  673. X`09Parameter`09EDT$M_NOCREATE =`0932`09! do not create
  674. X
  675. XC`09Integer*4`09EDT$_INPFILNEX,EDT$_NONSTDFIL
  676. X`09Parameter`09EDT$_INPFILNEX =`098749384`09! input file non-exis
  677. X`09Parameter`09EDT$_NONSTDFIL = `098749395`09! non standard file
  678. X
  679. XC`09Integer*4 EDT$K_OPEN_INPUT, EDT$K_OPEN_OUTPUT_SEQ
  680. XC`09Integer*4 EDT$K_OPEN_OUTPUT_NOSEQ,EDT$K_OPEN_IN_OUT,EDT$K_GET
  681. XC`09Integer*4 EDT$K_PUT,EDT$K_CLOSE_DEL,EDT$K_CLOSE
  682. X`09Parameter`09EDT$K_OPEN_INPUT = `091`09! open file for read
  683. X`09Parameter`09EDT$K_OPEN_OUTPUT_SEQ =`092`09! open sequenced/write
  684. X`09Parameter`09EDT$K_OPEN_OUTPUT_NOSEQ = 3`09! open nosequenc/write
  685. X`09Parameter`09EDT$K_OPEN_IN_OUT =`094`09! open for read/write
  686. X`09Parameter`09EDT$K_GET =`09`095`09! read a record
  687. X`09Parameter`09EDT$K_PUT = `09`096`09! write a record
  688. X`09Parameter`09EDT$K_CLOSE_DEL =`097`09! close and delete
  689. X`09Parameter`09EDT$K_CLOSE =`09`098`09! close
  690. X
  691. XC`09Integer*4 EDT$K_COMMAND_FILE,EDT$K_INPUT_FILE,EDT$K_INCLUDE_FILE
  692. XC`09Integer*4 EDT$K_JOURNAL_FILE,EDT$K_OUTPUT_FILE,EDT$K_WRITE_FILE
  693. X`09Parameter`09EDT$K_COMMAND_FILE =`091`09! stream /command
  694. X`09Parameter`09EDT$K_INPUT_FILE =`092`09! stream for read
  695. X`09Parameter`09EDT$K_INCLUDE_FILE =`093`09! stream on "include"
  696. X`09Parameter`09EDT$K_JOURNAL_FILE =`094`09! stream of journal
  697. X`09Parameter`09EDT$K_OUTPUT_FILE =`095`09! stream of output
  698. X`09Parameter`09EDT$K_WRITE_FILE =`096`09! stream on "write"
  699. Xc
  700. Xc`09End of BBS_INC.FOR.
  701. Xc
  702. $ CALL UNPACK BBS_INC.FOR;28 894427919
  703. $ create 'f'
  704. X$ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  705. X$ !!`09                  PACKAGE: UBBS Build command`09`09`09!!!
  706. X$ !!`09             PROGRAM NAME: BUILD.COM`09`09`09`09!!!
  707. X$ !!`09                   AUTHOR: Dale Miller`09`09`09`09!!!
  708. X$ !!`09         OPERATING SYSTEM: VAX/VMS version 4.3`09`09`09!!!
  709. X$ !!`09                 LANGUAGE: Digital Command Language`09`09!!!
  710. X$ !!`09                     DATE: April, 1986`09`09`09`09!!!
  711. X$ !!`09`09`09`09`09`09`09`09`09!!!
  712. X$ !!`09This program will build UBBS from the source files.`09`09!!!
  713. X$ !!`09`09`09`09`09`09`09`09`09!!!
  714. X$ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  715. X$ ! First, compile and link all the utilities
  716. X$ inquire/nopunct choice "Are you ready to build UBBS? `5BYes`5D"
  717. X$ if f$extract(1,1,choice) .eqs. "N" then exit
  718. X$ write sys$output "Compiling and linking utilities."
  719. X$ fortran `5B.utility`5DINIT_IDX
  720. X$ fortran `5B.utility`5DINIT_MESS
  721. X$ fortran `5B.utility`5DINIT_USERLOG
  722. X$ link INIT_IDX
  723. X$ link INIT_MESS
  724. X$ link INIT_USERLOG
  725. X$ delete *.obj;*
  726. X$ rename init*.exe `5B.utility`5D
  727. X$ write sys$output "Setting up the help library"
  728. X$ library/help/create `5B.DATA`5Dhelplib `5B.DATA`5Dhelplib
  729. X$ !
  730. X$ ! Now, do the actual compiles for UBBS
  731. X$ !
  732. X$ write sys$output "Now compiling UBBS.  This may take a little while."
  733. X$ fortran/check=nooverflow BBS
  734. X$ fortran/check=nooverflow BBSCB
  735. X$ fortran/check=nooverflow UBBS_SUBS
  736. X$ fortran/check=nooverflow SYSOP
  737. X$ macro COMINT
  738. X$ macro QUADMATH
  739. X$ library/object/create ubbs *.obj
  740. X$ link/notrace/EXEC=BBS UBBS/INCLUDE=(BBS_MAIN)/LIBRARY
  741. X$ link/exec=sysop ubbs/include=(sysop)/library
  742. X$ copy bbs.exe ubbs.exe
  743. X$ SET DEFAULT `5B.DATA`5D
  744. X$ run `5B-.utility`5Dinit_mess
  745. X$ run `5B-.utility`5Dinit_userlog
  746. X$ create cities.dat
  747. X$ SET DEFAULT `5B-`5D
  748. X$ run sysop
  749. Xub
  750. X7
  751. X13-Sep-1986
  752. X$ inquire/nopunctuation choice "Do you want to build the directories for dow
  753. Vnloads?"
  754. X$ if f$extract(1,1,choice) .eqs. "N" then goto nocreate
  755. X$ create/dir `5B.files`5D
  756. X$ create/dir `5B.files.100`5D
  757. X$ create/dir `5B.files.128`5D
  758. X$ create/dir `5B.files.ami`5D
  759. X$ create/dir `5B.files.app`5D
  760. X$ create/dir `5B.files.ast`5D
  761. X$ create/dir `5B.files.ata`5D
  762. X$ create/dir `5B.files.com`5D
  763. X$ create/dir `5B.files.cpm`5D
  764. X$ create/dir `5B.files.ibm`5D
  765. X$ create/dir `5B.files.mac`5D
  766. X$ create/dir `5B.files.mis`5D
  767. X$ create/dir `5B.files.pcs`5D
  768. X$ create/dir `5B.files.trs`5D
  769. X$ create/dir `5B.files.100.asc`5D
  770. X$ create/dir `5B.files.128.asc`5D
  771. X$ create/dir `5B.files.ami.asc`5D
  772. X$ create/dir `5B.files.app.asc`5D
  773. X$ create/dir `5B.files.ast.asc`5D
  774. X$ create/dir `5B.files.ata.asc`5D
  775. X$ create/dir `5B.files.com.asc`5D
  776. X$ create/dir `5B.files.cpm.asc`5D
  777. X$ create/dir `5B.files.ibm.asc`5D
  778. X$ create/dir `5B.files.mac.asc`5D
  779. X$ create/dir `5B.files.mis.asc`5D
  780. X$ create/dir `5B.files.pcs.asc`5D
  781. X$ create/dir `5B.files.trs.asc`5D
  782. X$ create/dir `5B.files.100.bin`5D
  783. X$ create/dir `5B.files.128.bin`5D
  784. X$ create/dir `5B.files.ami.bin`5D
  785. X$ create/dir `5B.files.app.bin`5D
  786. X$ create/dir `5B.files.ast.bin`5D
  787. X$ create/dir `5B.files.ata.bin`5D
  788. X$ create/dir `5B.files.com.bin`5D
  789. X$ create/dir `5B.files.cpm.bin`5D
  790. X$ create/dir `5B.files.ibm.bin`5D
  791. X$ create/dir `5B.files.mac.bin`5D
  792. X$ create/dir `5B.files.mis.bin`5D
  793. X$ create/dir `5B.files.pcs.bin`5D
  794. X$ create/dir `5B.files.trs.bin`5D
  795. X$ set def `5B.files`5D
  796. X$ create download.areas
  797. XThe following download areas are available:
  798. X
  799. X    100 - Radio shack MOD100 & MOD200
  800. X    128 - Commodore 128
  801. X    AMI - Amiga
  802. X    APP - Apple
  803. X    AST - Atari ST
  804. X    ATA - Atari
  805. X    COM - Commodore 64
  806. X    CPM - CP/M & CP/M 86
  807. X    IBM - IBM-PC & MS/DOS
  808. X    MAC - Apple Macintosh
  809. X    MIS - Miscellaneous files
  810. X    PCS - PC/SIG Diskette library
  811. X    TRS - Radio Shack Model II,III,4,COCO,Etc.
  812. X$ copy download.areas upload.areas
  813. X$ set def `5B-`5D
  814. X$ set def `5B.files.100`5D
  815. X$ create allow.up
  816. X$ create allow.down
  817. X$ run `5B--`5Dinit_idx
  818. X$ set def `5B--.files.128`5D
  819. X$ create allow.up
  820. X$ create allow.down
  821. X$ run `5B--`5Dinit_idx
  822. X$ set def `5B--.files.ami`5D
  823. X$ create allow.up
  824. X$ create allow.down
  825. X$ run `5B--`5Dinit_idx
  826. X$ set def `5B--.files.app`5D
  827. X$ create allow.up
  828. X$ create allow.down
  829. X$ run `5B--`5Dinit_idx
  830. X$ set def `5B--.files.ast`5D
  831. X$ create allow.up
  832. X$ create allow.down
  833. X$ run `5B--`5Dinit_idx
  834. X$ set def `5B--.files.ata`5D
  835. X$ create allow.up
  836. X$ create allow.down
  837. X$ run `5B--`5Dinit_idx
  838. X$ set def `5B--.files.com`5D
  839. X$ create allow.up
  840. X$ create allow.down
  841. X$ run `5B--`5Dinit_idx
  842. X$ set def `5B--.files.cpm`5D
  843. X$ create allow.up
  844. X$ create allow.down
  845. X$ run `5B--`5Dinit_idx
  846. X$ set def `5B--.files.ibm`5D
  847. X$ create allow.up
  848. X$ create allow.down
  849. X$ run `5B--`5Dinit_idx
  850. X$ set def `5B--.files.mac`5D
  851. X$ create allow.up
  852. X$ create allow.down
  853. X$ run `5B--`5Dinit_idx
  854. X$ set def `5B--.files.mis`5D
  855. X$ create allow.up
  856. X$ create allow.down
  857. X$ run `5B--`5Dinit_idx
  858. X$ set def `5B--.files.pcs`5D
  859. X$ create allow.up
  860. X$ create allow.down
  861. X$ run `5B--`5Dinit_idx
  862. X$ set def `5B--.files.trs`5D
  863. X$ create allow.up
  864. X$ create allow.down
  865. X$ run `5B--`5Dinit_idx
  866. X$ set def `5B--`5D
  867. X$ nocreate:
  868. X$ write sys$output "UBBS has been built.  To try it out, use @DISTLOGIN"
  869. X$ exit
  870. $ CALL UNPACK BUILD.COM;13 1817593606
  871. $ create 'f'
  872. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  873. Vcccc
  874. Xc
  875. Xc`09UBBS utilities - CHECK_MODEMS.FOR
  876. Xc`09This program checks an incoming user to determine what line he/she
  877. Xc`09is on, and whether to allow access based on current modem line usage.
  878. Xc
  879. Xc`09Dale Miller - UALR
  880. Xc`0923-Apr-1987
  881. Xc
  882. Xc`09Rev. 1.0  23-Apr-1987
  883. Xc`09Rev. 1.1  05-Jan-1988
  884. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  885. Vcccc
  886. X`09implicit none
  887. X`09include '($dvidef)'
  888. X`09include '($syidef)'
  889. X`09include '($lnmdef)'
  890. X
  891. X`09character*6 nodename
  892. X`09character*32 terminal_name,pterminal
  893. X`09integer istat,count,status
  894. X`09integer lib$getdvi,lib$getsyi,sys$trnlnm,lib$set_symbol
  895. X`09integer d1,d2,d3,str$trim
  896. X`09
  897. X`09! Define item list structure
  898. X`09structure`09/itmlst/
  899. X`09    union
  900. X`09`09map
  901. X`09`09    integer*2`09buflen, itmcod
  902. X`09`09    integer*4 bufadr, retadr
  903. X`09`09    end map
  904. X`09`09map
  905. X`09`09    integer*4`09end_list
  906. X`09`09    end map
  907. X`09`09end union
  908. X`09    end structure
  909. X
  910. X`09record /itmlst/`09trnlnm_list(2)
  911. X
  912. Xc`09First, determine if he is even a candidate for checking
  913. X`09istat=lib$getsyi(syi$_nodename,,nodename,,,)
  914. X
  915. X`09trnlnm_list(1).itmcod = lnm$_string
  916. X`09trnlnm_list(1).bufadr = %loc(terminal_name)
  917. X`09trnlnm_list(1).buflen = 32
  918. X`09trnlnm_list(1).retadr = 0
  919. X`09trnlnm_list(2).end_list = 0
  920. X
  921. X`09istat = lib$set_symbol('MODEM_STATUS','OKAY')
  922. X
  923. X`09istat = sys$trnlnm(,'LNM$PROCESS_TABLE','TT',,trnlnm_list)
  924. X`09istat = lib$getdvi(dvi$_tt_phydevnam,,terminal_name,,pterminal,)
  925. X`09istat = str$trim(nodename,nodename,d1)
  926. X`09istat = str$trim(pterminal,pterminal,d3)
  927. X`09if(index(pterminal,'_').ne.0) d2=index(pterminal,'_')+1
  928. X`09if(index(pterminal,':').ne.0) d3=index(pterminal,':')-1
  929. X`09print*,'Port='//nodename(:d1)//'::'//pterminal(d2:d3)
  930. X`09print*,' '
  931. X`09print*,' '
  932. X`09if(nodename.eq.'GAMMA') call exit
  933. X`09if(terminal_name(1:3).ne.'VTA') call exit
  934. Xc`09if(nodename.eq.'ALPHA'.and.(pterminal(2:5).eq.'TXJ6'.or.
  935. Xc`091   pterminal(2:5).eq.'TXJ7')) then
  936. Xc`09    call exit
  937. Xc`09    end if
  938. X
  939. X`09count=0
  940. X`09istat = lib$getdvi(dvi$_refcnt,,'txj0:',status,,)
  941. X`09if(status.ne.0) count=count+1
  942. X`09istat = lib$getdvi(dvi$_refcnt,,'txj1:',status,,)
  943. X`09if(status.ne.0) count=count+1
  944. X`09istat = lib$getdvi(dvi$_refcnt,,'txj2:',status,,)
  945. X`09if(status.ne.0) count=count+1
  946. X`09istat = lib$getdvi(dvi$_refcnt,,'txj3:',status,,)
  947. X`09if(status.ne.0) count=count+1
  948. X`09istat = lib$getdvi(dvi$_refcnt,,'txj4:',status,,)
  949. X`09if(status.ne.0) count=count+1
  950. X`09istat = lib$getdvi(dvi$_refcnt,,'txj5:',status,,)
  951. X`09if(status.ne.0) count=count+1
  952. X`09istat = lib$getdvi(dvi$_refcnt,,'txj6:',status,,)
  953. X`09if(status.ne.0) count=count+1
  954. X`09istat = lib$getdvi(dvi$_refcnt,,'txj7:',status,,)
  955. X`09if(status.ne.0) count=count+1
  956. X`09if(count.ge.5) then
  957. X`09    istat = lib$set_symbol('MODEM_STATUS','FULL')
  958. X`09else
  959. X`09    istat = lib$set_symbol('MODEM_STATUS','OKAY')
  960. X`09end if
  961. X`09if(nodename.eq.'ALPHA'.and.count.ge.3) then
  962. X`09    istat = lib$set_symbol('MODEM_STATUS','FULL')
  963. X`09    end if
  964. X`09call exit
  965. X`09end
  966. $ CALL UNPACK CHECK_MODEMS.FOR;11 1328507111
  967. $ create 'f'
  968. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  969. X;`09`09`09`09`09`09`09`09`09;
  970. X;`09UBBS subroutines`09`09`09`09`09`09;
  971. X;`09This routine will convert a binary integer to an edited`09`09;
  972. X;`09Z,ZZZ,ZZ9 string.`09`09`09`09`09`09;
  973. X;`09`09`09`09`09`09`09`09`09;
  974. X;`09Dale Miller - UALR`09`09`09`09`09`09;
  975. X;`09Rev. 4.3  26-Jul-1986`09`09`09`09`09`09;
  976. X;`09`09`09`09`09`09`09`09`09;
  977. X;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  978. X`09.PSECT`09STRING,PIC,CON,REL,LCL,NOSHR,NOEXE,RD,WRT,LONG
  979. X;`09A character string descriptor to keep FORTRAN happy
  980. XSTRING:`09.LONG`09`5EX010E0009
  981. X`09.LONG`09`5EX00000000
  982. X;
  983. X`09.PSECT`09$CODE,PIC,CON,REL,LCL,SHR,EXE,RD,NOWRT,LONG
  984. X`09.ENTRY`09COMINT,`5EM<R2,R3,R4,R5>
  985. X`09MOVQ`09@B`5E08(AP), R0
  986. X`09MOVL`09R1, STRING+4
  987. X`09CLRQ`09-(SP)
  988. X`09SUBL2`09#`5EX04, SP
  989. X`09CVTLP`09@4(AP), #`5EX07, (SP)
  990. X`09EDITPC`09#`5EX07, (R3), EOPAT, @STRING+4
  991. X`09MOVL`09#`5EX01, R0
  992. X`09RET
  993. X;
  994. XEOPAT:`09.BYTE`09`5EX47`09`09;EO$ADJUST_INPUT
  995. X`09.BYTE`09`5EX07`09`09`09;LENGTH
  996. X`09.BYTE`09`5EX02`09`09;EO$CLEAR_SIGNIF
  997. X`09.BYTE`09`5EX91`09`09;EO$MOVE (1 DIGIT)
  998. X`09.BYTE`09`5EX44`09`09;EO$INSERT
  999. X`09.BYTE`09`5EX2C`09`09`09; ','
  1000. X`09.BYTE`09`5EX93`09`09;EO$MOVE (3 DIGITS)
  1001. X`09.BYTE`09`5EX44`09`09;EO$INSERT
  1002. X`09.BYTE`09`5EX2C`09`09`09; ','
  1003. X`09.BYTE`09`5EX92`09`09;EO$MOVE (2 DIGITS)
  1004. X`09.BYTE`09`5EX03`09`09;EO$SET$SIGNIF
  1005. X`09.BYTE`09`5EX91`09`09;EO$MOVE (1 DIGIT)
  1006. X`09.BYTE`09`5EX00`09`09;EO$END
  1007. X`09.END
  1008. $ CALL UNPACK COMINT.MAR;4 1946442527
  1009. $ create 'f'
  1010. X$ here = f$logical("SYS$DISK") + f$directory()
  1011. X$ data = here - "`5D" + ".data`5D"
  1012. X$ fileplace = here - "`5D" + ".files.`5D"
  1013. X$ define ubbs_data 'data'`09`09!these symbols will need to be changed
  1014. X$ define ubbs_files 'fileplace'`09`09!if you use UBBS from another directory
  1015. X$ define ubbs_sysop_1 "DALE MILLER"`09! Change these symbols as appropriate
  1016. X$ define ubbs_sysop_2 "MICHAEL SMITH"
  1017. X$ define ubbs_sysop_mail "DOMILLER"
  1018. X$! approved_mail_read = 01`09`09!UBBS_FLAGS is a bit mask to allow
  1019. X$! approved_mail_send = 02`09`09!unapproved users access to certain
  1020. X$! approved_cb        = 04`09`09!UBBS features.  Set the bits to 1 to
  1021. X$! approved_file_down = 08`09`09!allow access.
  1022. X$! approved_file_up   = 16
  1023. X$ define ubbs_flags 25`09`09`09!Everything but MAIL_SEND & CB
  1024. X$ restart:
  1025. X$ on error then goto send_mail
  1026. X$ on warning then goto send_mail
  1027. X$ set message/nofacility/noident/noseverity/notext
  1028. X$ assign sys$command sys$input
  1029. X$ node = f$getsyi("nodename")
  1030. X$ term = f$getdvi(f$getjpi("","terminal"),"tt_phydevnam") - ":" - "_"
  1031. X$ termin == node + "_" + term - " "
  1032. X$ assign failure.'termin' sys$error
  1033. X$ assign failure.'termin' sys$output
  1034. X$ sho symbol termin
  1035. X$ deassign sys$output
  1036. X$ set message/facility/ident/severity/text
  1037. X$ run ubbs
  1038. X$ goto finish
  1039. X$ !
  1040. X$ ! we had an error
  1041. X$ !
  1042. X$ send_mail:
  1043. X$ deassign sys$error
  1044. X$ mail/subject="bbs aborted" failure.'termin' UBBS_SYSOP_MAIL
  1045. X$ set message/nofacility/noident/noseverity/notext
  1046. X$ delete failure.'termin';*
  1047. X$ write sys$output "A fatal error has occurred.  UBBS is restarting."
  1048. X$ goto restart
  1049. X$ !
  1050. X$ ! normal way out
  1051. X$ !
  1052. X$ finish:
  1053. X$ deassign sys$error
  1054. X$ delete failure.'termin';*
  1055. X$ logoutnow
  1056. $ CALL UNPACK DISTLOGIN.COM;5 105178331
  1057. $ create 'f'
  1058. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1059. Vcccc
  1060. Xc
  1061. Xc`09UBBS utilities - Compress.for
  1062. Xc`09This program compresses the message data base eliminating deleted and
  1063. Xc`09expired messages as well as private messages which have already been
  1064. Xc`09read.
  1065. Xc`09Dale Miller - UALR
  1066. Xc`0914-Nov-1985
  1067. Xc
  1068. Xc`09Rev. 3.5  24-Jun-1986
  1069. Xc`09Rev. 4.3  26-Jul-1986
  1070. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1071. Vcccc
  1072. $ CALL UNPACK HEADER.FOR;1 1075586781
  1073. $ create 'f'
  1074. XC
  1075. XC`09Include file for KERMIT.
  1076. XC
  1077. X`09PARAMETER POVER      =`093`09! Packet overhead count:
  1078. X`09`09`09`09`09!    LEN, SEQ, & TYPE.
  1079. X`09PARAMETER TOVER      =`096`09! Total packet overhead:
  1080. X`09`09`09`09`09! MARK, LEN, SEQ, TYPE, CHECK, EOL.
  1081. X`09PARAMETER MAXDATASIZ =`0991`09! Maximum data size field.
  1082. X`09PARAMETER MAXPACKSIZ =`0994`09! Maximum packet size (-MARK & CHECK)
  1083. X`09PARAMETER PACKBUFSIZ =`0998`09! The packet buffer size:
  1084. X`09`09`09`09`09! MARK, CHECK1, `5BCHECK2,`5D & EOL.
  1085. X`09PARAMETER TO_CHECK   =`092`09! This size + PLEN = check field.
  1086. X`09PARAMETER PACKET_LENGTH = 80
  1087. XC
  1088. XC`09Define my init characteristics.
  1089. XC
  1090. X`09PARAMETER DEFMAXL    =`0980`09! Maximum packet length.
  1091. X`09PARAMETER DEFTIME    =`0910`09! Timeout value to use.
  1092. X`09PARAMETER DEFNPAD    =`090`09! Number of padding characters.
  1093. X`09PARAMETER DEFPADC    =`090`09! Padding character to send.
  1094. X`09PARAMETER DEFEOLC    =`0913`09! End-Of-Line character.
  1095. X`09PARAMETER DEFQCTL    =`09'#'`09! Control quote character.
  1096. X`09PARAMETER DEFQBIN    =  'N'`09! No eight bit quoting.
  1097. X`09PARAMETER DEFCHKT    =  '1'`09! Check type (1=checksum).
  1098. X`09PARAMETER DEFREPT    =`09' '`09! No repeat char processing.
  1099. X`09PARAMETER DEFCAPAS   =`090`09! No extended capabilities.
  1100. XC
  1101. XC`09Define my init characteristics.
  1102. XC
  1103. X`09PARAMETER MYMAXL     =`0980`09! Maximum packet length.
  1104. X`09PARAMETER MYTIME     =`0910`09! Timeout value to use.
  1105. X`09PARAMETER MYNPAD     =`090`09! Number of padding characters.
  1106. X`09PARAMETER MYPADC     =`090`09! Padding character to send.
  1107. X`09PARAMETER MYEOLC     =`0913`09! End-Of-Line character.
  1108. X`09PARAMETER MYQCTL     =`09'#'`09! Control quote character.
  1109. X`09PARAMETER MYQBIN     =  'N'`09! No eight bit quoting.
  1110. X`09PARAMETER MYCHKT     =  '1'`09! Check type (1=checksum).
  1111. X`09PARAMETER MYREPT     =`09' '`09! No repeat char processing.
  1112. X`09PARAMETER MYCAPAS    =`090`09! No extended capabilities.
  1113. XC
  1114. XC`09Define the packet offsets:
  1115. XC
  1116. XC`09I'd like to define a structure here, but since the packets can
  1117. XC`09vary in size I'm unable to use a structure declaration.
  1118. XC
  1119. X`09PARAMETER PMARK`09= 1`09`09! Start of packet character.
  1120. X`09PARAMETER PLEN`09= 2`09`09! The packet length field.
  1121. X`09PARAMETER PSEQ`09= 3`09`09! The packet sequence field.
  1122. X`09PARAMETER PTYPE`09= 4`09`09! The packet type field.
  1123. X`09PARAMETER PDATA`09= 5`09`09! The packet data field.
  1124. XC
  1125. XC`09Define init packet offsets:
  1126. XC
  1127. X`09PARAMETER IMAXL`09= 1`09`09! Maximum packet length.
  1128. X`09PARAMETER ITIME`09= 2`09`09! Timeout limit to use.
  1129. X`09PARAMETER INPAD`09= 3`09`09! Number of pad characters.
  1130. X`09PARAMETER IPAD`09= 4`09`09! Pad character to use.
  1131. X`09PARAMETER IEOLC`09= 5`09`09! End of line character.
  1132. X`09PARAMETER IQCTL`09= 6`09`09! Control quote character.
  1133. XC
  1134. XC`09The next init packet fields are optional.
  1135. XC
  1136. X`09PARAMETER IQBIN`09= 7`09`09! 8-bit quote character.
  1137. X`09PARAMETER ICHKT`09= 8`09`09! Check type to use.
  1138. X`09PARAMETER IREPT`09= 9`09`09! Repeat character to use.
  1139. X`09PARAMETER ICAPAS = 10`09`09! Capabilities mask.
  1140. X
  1141. X`09PARAMETER ISIZE = ICAPAS`09! Set the init packet size.
  1142. XC
  1143. XC`09Define Variables:
  1144. XC
  1145. X`09INTEGER`09`09cpsiz,`09`09! The current packet size.
  1146. X`091`09`09rbytes,`09`09! The record byte count.
  1147. X`092`09`09rpsiz,`09`09! Maximum receive packet size.
  1148. X`093`09`09spsiz,`09`09! Maximum send packet size.
  1149. X`094`09`09pad,`09`09! How much padding to send.
  1150. X`095`09`09paknum,`09`09! The packet number.
  1151. X`096`09`09prepak,`09`09! The previous packet number.
  1152. X`097`09`09maxtry,`09`09! The maximum retry count.
  1153. X`098`09`09numtry,`09`09! Times this packet retried.
  1154. X`099`09`09oldtry,`09`09! Times previous packet retried.
  1155. X`091`09`09timout,`09`09! Timeout for foreign host on sends.
  1156. X`092`09`09packet_count,
  1157. X`093`09`09total_packets,
  1158. X`094`09`09total_bytes,
  1159. X`095`09`09total_records
  1160. X
  1161. X`09LOGICAL`09`09image,`09`09! 8-bit mode for file data.
  1162. X`091`09`09filnamcnv,`09! Do file name case conversions.
  1163. X`092`09`09qbin,`09`09! Do 8-bit character quoting.
  1164. X`093`09`09repeat,`09`09! Do repeat character compression.
  1165. X`094`09`09turn,`09`09! Look for turnaround char (XON).
  1166. X`095`09`09end_of_file
  1167. X
  1168. X`09BYTE`09`09state,`09`09! Present state of the automaton.
  1169. X`091`09`09cchksum,`09! Our (computed) checksum.
  1170. X`092`09`09padc,`09`09! Padding character to send.
  1171. X`093`09`09eolc,`09`09! End-Of-Line character to send.
  1172. X`094`09`09qctlc,`09`09! Control quote character.
  1173. X`095`09`09qbinc,`09`09! Binary quote character.
  1174. X`095`09`09markc,`09`09! Character to use for MARK.
  1175. X`096`09`09bquote,`09`09! The binary quote character.
  1176. X`097`09`09chktyp,`09`09! The check type to use.
  1177. X`098`09`09reptc,`09`09! Character to use for repeats.
  1178. X`099`09`09capas`09`09! The capabilities bit mask.
  1179. X
  1180. X`09BYTE`09packet(PACKBUFSIZ)`09! Allocate packet for send/receive.
  1181. X
  1182. X`09COMMON /KERCOM/`09cpsiz, rpsiz, spsiz, pad, timout, paknum, prepak,
  1183. X`091`09`09maxtry, numtry, oldtry, image, turn, filnamcnv,
  1184. X`092`09`09state, cchksum, padc, eolc, qctlc, markc, packet,
  1185. X`093`09`09qbin, qbinc, chktyp, repeat, reptc, capas, rbytes,
  1186. X`094`09`09packet_count,total_packets,end_of_file,
  1187. X`095`09`09total_bytes,total_records
  1188. X
  1189. XC
  1190. XC`09End of KERMIT include file.
  1191. XC
  1192. $ CALL UNPACK KERMIT_INC.FOR;2 1933455111
  1193. $ create 'f'
  1194. X$IF F$MODE() .EQS. "BATCH" THEN GOTO BATCH
  1195. X$ SET TERM/NODISC
  1196. X$ ON ERROR THEN GOTO SEND_MAIL
  1197. X$ RESTART:
  1198. X$ ON ERROR THEN GOTO SEND_MAIL
  1199. X$ ON WARNING THEN GOTO SEND_MAIL
  1200. X$ STATUS=F$LOGICAL("UBBS_STATUS")
  1201. X$ IF STATUS.NES."DOWN" THEN GOTO ITSUP
  1202. X$ WRITE SYS$OUTPUT "UBBS is temporarily out of service."
  1203. X$ WRITE SYS$OUTPUT "Please try again later."
  1204. X$ LOGOUTNOW
  1205. X$ ITSUP:
  1206. X$ DEFINE/USER UBBS_EXE DISK$USER:`5BUALR_BBS`5D
  1207. X$ RUN UBBS_EXE:CHECK_MODEMS
  1208. X$ IF MODEM_STATUS.EQS."OKAY" THEN GOTO LINEOK
  1209. X$ WRITE SYS$OUTPUT "UBBS may not be accessed on this line at this"
  1210. X$ WRITE SYS$OUTPUT "time.  Please try (501) 568-9464."
  1211. X$ LOGOUTNOW
  1212. X$ LINEOK:
  1213. X$ SET MESSAGE/NOFACILITY/NOIDENT/NOSEVERITY/NOTEXT
  1214. X$ ASSIGN SYS$COMMAND SYS$INPUT
  1215. X$ !
  1216. X$ NODE = F$GETSYI("NODENAME")
  1217. X$ TERM = F$GETDVI(F$GETJPI("","TERMINAL"),"TT_PHYDEVNAM") - ":" - "_"
  1218. X$ TERMIN == NODE + "_" + TERM - " "
  1219. X$ ASSIGN FAILURE.'TERMIN' SYS$ERROR
  1220. X$ ASSIGN FAILURE.'TERMIN' SYS$OUTPUT
  1221. X$ SHO SYMBOL TERMIN
  1222. X$ DEASSIGN SYS$OUTPUT
  1223. X$ SET MESSAGE/FACILITY/IDENT/SEVERITY/TEXT
  1224. X$ DEFINE/USER UBBS_SYSOP_1 "DALE MILLER"
  1225. X$ DEFINE/USER UBBS_SYSOP_2 "MICHAEL SMITH"
  1226. X$ DEFINE/USER UBBS_SYSOP_MAIL "DOMILLER"
  1227. X$ DEFINE/USER UBBS_FLAGS 25
  1228. X$ DEFINE/USER UBBS_DATA DISK$USER:`5BUALR_BBS.DATA`5D
  1229. X$ DEFINE/USER UBBS_FILES DUA10:`5BBBS_FILES.`5D
  1230. X$ RUN SYS$SYSTEM:UBBS
  1231. X$ GOTO FINISH
  1232. X$ !
  1233. X$ ! WE HAD AN ERROR
  1234. X$ !
  1235. X$ SEND_MAIL:
  1236. X$ ON ERROR THEN GOTO OFFNOW
  1237. X$ DEASSIGN SYS$ERROR
  1238. X$ MAIL/SUBJECT="BBS ABORTED" FAILURE.'TERMIN' SYSOP
  1239. X$ SET MESSAGE/NOFACILITY/NOIDENT/NOSEVERITY/NOTEXT
  1240. X$ DELETE FAILURE.'TERMIN';*
  1241. X$ WRITE SYS$OUTPUT "A fatal error has occurred.  UBBS is restarting."
  1242. X$ GOTO RESTART
  1243. X$ !
  1244. X$ ! NORMAL WAY OUT
  1245. X$ !
  1246. X$ FINISH:
  1247. X$ ON ERROR THEN GOTO OFFNOW
  1248. X$ DEASSIGN SYS$ERROR
  1249. X$ DELETE FAILURE.'TERMIN';*
  1250. X$ OFFNOW:
  1251. X$ LOGOUTNOW
  1252. X$!
  1253. X$BATCH:
  1254. X$DEFINE UBBS_SYSOP_1 "DALE MILLER"
  1255. X$DEFINE UBBS_SYSOP_2 "MICHAEL SMITH"
  1256. X$DEFINE UBBS_FLAGS 25
  1257. X$DEFINE UBBS_DATA DISK$USER:`5BUALR_BBS.DATA`5D
  1258. X$DEFINE UBBS_FILES DUA10:`5BBBS_FILES.`5D
  1259. $ CALL UNPACK LOGIN.COM;23 2104324526
  1260. $ create 'f'
  1261. X`09.TITLE`09ICR_QUAD_MATH
  1262. X;
  1263. X;`09CALL SUBQUAD(A,B,C)
  1264. X;
  1265. X;`09RETURNS: A - B -> C
  1266. X;
  1267. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1268. X`09.ENTRY`09SUBQUAD`09`5EM<R2>
  1269. X;
  1270. X;
  1271. XA=4
  1272. XB=8
  1273. XC=12
  1274. X`09MOVQ`09@A(AP),R0
  1275. X`09MOVAQ`09@B(AP),R2
  1276. X`09SUBL`09(R2)+,R0
  1277. X`09SBWC`09(R2),R1
  1278. X`09MOVQ`09R0,@C(AP)
  1279. X`09RET
  1280. X;
  1281. X;
  1282. X;
  1283. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1284. X`09.ENTRY`09COMPQUAD`09`5EM<R2>
  1285. X;
  1286. X;`09ival = COMPQUAD(a,b)
  1287. X;
  1288. X;`09if a > b`09 1 --> ival
  1289. X;`09   a = b`09 0 --> ival
  1290. X;`09   a < b`09-1 --> ival
  1291. X;
  1292. X;
  1293. X`09MOVQ`09@A(AP),R0
  1294. X`09MOVAQ`09@B(AP),R2
  1295. X`09SUBL`09(R2)+,R0
  1296. X`09SBWC`09(R2),R1
  1297. X`09MOVQ`09R0,R0`09`09`09;"TEST" QUADWORD
  1298. X`09BEQL`0910$
  1299. X`09BGTR`0920$
  1300. X`09MOVL`09#-1,R0
  1301. X`09BRB`0930$
  1302. X10$:
  1303. X`09CLRL`09R0
  1304. X`09BRB`0930$
  1305. X20$:
  1306. X`09MOVL`09#1,R0
  1307. X30$:
  1308. X`09RET
  1309. X;
  1310. X;
  1311. X;
  1312. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1313. X`09.ENTRY`09EDIV`09`5EM<R2>
  1314. X;
  1315. X;`09CALL EDIV (A,B,C)
  1316. X;`09RETURNS A/B->C
  1317. X;
  1318. X`09MOVQ`09@A(AP),R0
  1319. X`09MOVAL`09@B(AP),R2
  1320. X`09EDIV`09(R2),R0,R0,R1
  1321. X`09MOVL`09R0,@C(AP)
  1322. X`09RET
  1323. X;
  1324. X;
  1325. X;
  1326. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1327. X`09.ENTRY`09EMUL`09`5EM<R2>
  1328. X;
  1329. X;`09CALL EMUL (A,B,C)
  1330. X;`09RETURNS A*B->C
  1331. X;
  1332. X`09MOVAL`09@A(AP),R1
  1333. X`09MOVAL`09@B(AP),R2
  1334. X`09EMUL`09(R1),(R2),#0,R0
  1335. X`09MOVQ`09R0,@C(AP)
  1336. X`09RET
  1337. X;
  1338. X;
  1339. X;`09CALL ADDQUAD(A,B,C)
  1340. X;
  1341. X;`09RETURNS: A + B -> C
  1342. X;
  1343. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1344. X`09.ENTRY`09ADDQUAD`09`5EM<R2>
  1345. X;
  1346. X;
  1347. XA=4
  1348. XB=8
  1349. XC=12
  1350. X`09MOVQ`09@A(AP),R0
  1351. X`09MOVAQ`09@B(AP),R2
  1352. X`09ADDL`09(R2)+,R0
  1353. X`09ADWC`09(R2),R1
  1354. X`09MOVQ`09R0,@C(AP)
  1355. X`09RET
  1356. X;
  1357. X;
  1358. X;`09RESULT = QUAD_TO_D,F(A)
  1359. X;
  1360. X;`09RETURNS: A -> CONVERT TO DOUBLE,FLOATING -> RESULT
  1361. X;
  1362. X`09.psect`09code,pic,usr,con,rel,lcl,shr,exe,rd,nowrt,novec,long
  1363. XQUAD_TO_F::
  1364. X`09.ENTRY`09QUAD_TO_D `5EM<R2,R3>
  1365. X;
  1366. X;
  1367. XA=4
  1368. X`09MOVQ`09@A(AP),R0
  1369. X`09CVTLD`09R1,R2
  1370. X`09TSTL`09R2
  1371. X`09BEQL`095$
  1372. X`09EXTV`09#7,#8,R2,R1
  1373. X`09ADDL`09#32,R1
  1374. X`09INSV`09R1,#7,#8,R2
  1375. X5$:
  1376. X`09BBCC`09#31,R0,10$
  1377. X`09ADDD`09#`5EF2147483648,R2
  1378. X10$:
  1379. X`09CVTLD`09R0,R0
  1380. X`09ADDD`09R2,R0
  1381. X`09RET
  1382. X`09.END
  1383. $ CALL UNPACK QUADMATH.MAR;2 859685145
  1384. $ create 'f'
  1385. X`09program sysop
  1386. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1387. Vcccc
  1388. Xc
  1389. Xc`09UBBS utilities - Sysop.for
  1390. Xc`09This program combines all of the UBBS utility functions.
  1391. Xc`09Dale Miller - UALR
  1392. Xc`0907-Jul-1986
  1393. Xc
  1394. Xc`09Rev. 4.10 11-Feb-1987
  1395. Xc`09Rev. 7.1  19-Sep-1988
  1396. Xc
  1397. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1398. Vcccc
  1399. X
  1400. X`09implicit none
  1401. X`09character choice*2
  1402. X`09integer str$upcase,istat
  1403. X
  1404. X 0010`09write(6,*)'Choice?'
  1405. X`09read(5,1001,end=900)choice
  1406. X 1001`09format(a)
  1407. X`09istat=str$upcase(choice,choice)
  1408. X`09if(choice.eq.' '.or.choice.eq.'E') then
  1409. X`09    call exit
  1410. X`09else if(choice.eq.'A') then
  1411. X`09    call aging
  1412. X`09else if(choice.eq.'AF') then
  1413. X`09    call archive_files
  1414. X`09else if (choice.eq.'C') then
  1415. X`09    call compress(.false.)
  1416. X`09else if (choice.eq.'CA') then
  1417. X`09    call compress(.true.)
  1418. X`09else if (choice.eq.'F') then
  1419. X`09    call fixcounts
  1420. X`09else if (choice.eq.'UL') then
  1421. X`09    call ulist
  1422. X`09else if (choice.eq.'UB') then
  1423. X`09    call upbull
  1424. X`09else if (choice.eq.'UF') then
  1425. X`09    call update_files
  1426. X`09else if (choice.eq.'US') then
  1427. X`09    call update_sysops
  1428. X`09else if (choice.eq.'UU') then
  1429. X`09    call upuser
  1430. X`09else if (choice.eq.'CF') then
  1431. X`09    call check_files
  1432. X`09else if (choice.eq.'CI') then
  1433. X`09    call check_indices
  1434. X`09else
  1435. X`09    write(6,*)'Programs available'
  1436. X`09    write(6,*)'A  - Aging'
  1437. X`09    write(6,*)'AF - Archive files'
  1438. X`09    write(6,*)'C  - Compress message file'
  1439. X`09    write(6,*)'CA - Compress m.f. eliminating ALL read messages'
  1440. X`09    write(6,*)'CF - Check files'
  1441. X`09    write(6,*)'CI - Check indices'
  1442. X`09    write(6,*)'F  - Fixcounts'
  1443. X`09    write(6,*)'UB - Update bulletin number & date'
  1444. X`09    write(6,*)'UF - Update files'
  1445. X`09    write(6,*)'UL - User list'
  1446. X`09    write(6,*)'US - Update sysops on file sections'
  1447. X`09    write(6,*)'UU - Update userlog'
  1448. +-+-+-+-+-+-+-+-  END  OF PART 3 +-+-+-+-+-+-+-+-
  1449.