home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / vmsnet / sources / 308 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  46.7 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 06/12
  5. Message-ID: <7868475@MVB.SAIC.COM>
  6. Date: Fri, 21 Aug 1992 20:20:39 GMT
  7. Organization: Doyle, Munroe Consultants, Inc., Hudson, MA
  8. Lines: 1625
  9. Approved: Mark.Berryman@Mvb.Saic.Com
  10.  
  11. Submitted-by: munroe@dmc.com (Dick Munroe)
  12. Posting-number: Volume 3, Issue 114
  13. Archive-name: ubbs/part06
  14. -+-+-+-+-+-+-+-+ START OF PART 6 -+-+-+-+-+-+-+-+
  15. X`09    flow=to_vax
  16. X`09    call clear_counts()
  17. X`09    call default_parameters()
  18. X`09    timeout_count=10
  19. X`09    retry_limit=5
  20. X`09    write(6,1001)crlf(:cl)//
  21. X`091`09'Beginning Kermit upload.'
  22. X`09    call waitabit('2')
  23. X`09    call init_timer(file_timer)
  24. X`09    dummyl=get_vaxfile(filnam)
  25. X`09    dummyl = kermit_receive(ldesc, rbuffer, xbuffer)
  26. X`09    call waitabit('10')
  27. X`09    call elapsed_time(file_timer)`09!Display elapsed time
  28. X`09    call report_totals()`09`09!Report final stats
  29. X`09    if(dummyl) then
  30. X`09`09write(6,1001)crlf(:cl)//'Successful transfer'
  31. X`09`09go to 4800
  32. X`09    else
  33. X`09`09write(6,1001)crlf(:cl)//'Transfer failed.'//bell
  34. X`09`09istat=lib$delete_file(filnam//';*')
  35. X`09    end if
  36. X`09else`09`09`09!ascii upload
  37. X`09    flow=to_vax
  38. X`09    dummyl=get_vaxfile(filnam)
  39. X`09    call out('Ascii files must not contain any non-printable',*4739)
  40. X`09    call out('characters, and must not have any lines over',*4739)
  41. X`09    call out('200 characters in length.',*4739)
  42. X`09    call out('Each line must be terminated by a carriage',*4739)
  43. X`09    call out('return.  The BBS will add a line feed for each',*4739)
  44. X`09    call out('line you send.',*4739)
  45. X`09    call out('Control-z to end, Control-c to abort.',*4739)
  46. X 4739`09    write(6,1001)crlf(:cl)//crlf(:cl)//bell//
  47. X`091`09'Start your file send now.'
  48. X`09    write(6,1001)crlf(:cl)
  49. X 4740`09    length=-200
  50. X`09    call get_uplow_string(line,length)
  51. X`09    if(length.lt.0) go to 4750
  52. X`09    call send_cr()
  53. X`09    call send_lf()
  54. X`09    if(length.eq.0) then
  55. X`09`09write(file_unit,1001)' '
  56. X`09    else
  57. X`09`09write(file_unit,1001)line(1:length)
  58. X`09    end if
  59. X`09    go to 4740
  60. X
  61. X 4750`09    if(length.eq.-1) then
  62. X`09`09close(unit=file_unit)
  63. X`09`09write(6,1001)crlf(:cl)//'Successful upload!'
  64. X`09`09go to 4800
  65. X`09    else
  66. X`09`09close(unit=file_unit,disp='delete')
  67. X`09`09write(6,1001)crlf(:cl)//bell//'Upload aborted'
  68. X`09    end if
  69. X`09end if
  70. X`09go to 4900
  71. X
  72. X 4800`09continue`09! get file description
  73. X`09write(6,1001)crlf(:cl)//'Please give a 1-line description of the'
  74. X`09write(6,1001)crlf(:cl)//'file for the download directory.'
  75. X`09write(6,1001)crlf(:cl)//'?'
  76. X`09dummy=40
  77. X`09call get_uplow_string(line,dummy)
  78. X`09if(dummy.eq.0.or.line.eq.' ') go to 4800
  79. X
  80. Xc`09find out how big the file is.  This useropen will put the file
  81. Xc`09size into fsize.
  82. X`09open(unit=4,file=filnam,status='old',readonly,
  83. X`091   useropen=getsize)
  84. X`09close(unit=4)
  85. X
  86. Xc`09Format a message and send to the operator.
  87. X`09open(unit=4,file='mail.tmp',status='new',
  88. X`091    carriagecontrol='list')
  89. X`09istat=str$trim(filnam,filnam,dummy)
  90. X`09write(4,1001)'File name='//filename
  91. X`09write(4,1001)'From:'//mail_name//' Stored as:'//zfilnam
  92. X`09write(4,1001)'$rename '//filnam(1:dummy)//
  93. X`091   ' ubbs_files:`5B'//darea//binasc//'`5D'//filename(1:flen)
  94. X`09write(4,1004)darea,filename(1:18),fsize,ftyp//cdate//
  95. X`091   ' '//line(1:dummy)
  96. X `09close(unit=4)
  97. X`09istat = lib$spawn('mail/subject="upload" mail.tmp sysop')
  98. X`09go to 4900`09!finished
  99. X`20
  100. X 4900`09continue
  101. X`09return
  102. X`09end
  103. X`0C
  104. X`09subroutine listcat(darea)
  105. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  106. Vcccc
  107. Xc
  108. Xc`09UBBS subroutines
  109. Xc`09This routine will give the directory of files for a download area
  110. Xc`09Dale Miller - UALR
  111. Xc
  112. Xc
  113. Xc`09Rev. 4.0  27-Jun-1986
  114. Xc`09Rev. 4.5  24-Sep-1986
  115. Xc`09Rev. 6.0  06-Jun-1988
  116. Xc
  117. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  118. Vcccc
  119. X`09implicit none
  120. X`09include 'bbs_inc.for'
  121. X`09character*(*) darea
  122. X`09character cdate*11,filtyp*6,startoff*18
  123. X`09integer length,dummy
  124. X`09real*8 long_ago
  125. X`09logical short
  126. X
  127. X`09integer istat,keyln
  128. X`09integer compquad
  129. X`09integer sys$asctim,sys$bintim,str$upcase,str$trim
  130. X`09external uopen
  131. X
  132. X`09record/file_description/ fd
  133. X
  134. X`09short=.true.
  135. X`09write(6,1001)crlf(:cl)//'Do you want a short or a long listing?'//
  136. X`091   ' `5BShort`5D'
  137. X`09dummy=5
  138. X`09call get_upcase_string(startoff,dummy)
  139. X`09if(startoff(1:1).eq.'L') short=.false.
  140. X
  141. X`09write(6,1001)crlf(:cl)//'Enter earliest date of files you'//
  142. X`091   ' wish to see.'//crlf(:cl)//
  143. X`092   'The date must be dd-mmm-yyyy (e.g. 19-APR-1986)'//
  144. X`093   crlf(:cl)//'Or enter <cr> for a all dates.'//
  145. X`094   crlf(:cl)//'?'
  146. X`09dummy=11
  147. X`09call get_uplow_string(cdate,dummy)
  148. X`09if(dummy.eq.0) cdate='01-JUL-1985'
  149. X`09istat=str$upcase(cdate,cdate)
  150. X`09istat = sys$bintim(cdate(:11)//' 00:00:00.00',long_ago)
  151. X`09write(6,1001)crlf(:cl)//
  152. X`091   'Enter the starting file name or <cr> for beginning :'
  153. X`09dummy=18
  154. X`09startoff=char(0)
  155. X`09call get_filnam_string(startoff,dummy)
  156. X`09if(startoff.eq.' ') startoff='.'
  157. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  158. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  159. X`09write(6,1001)crlf(:cl)//'    Files since: '//cdate(:11)
  160. X`09call ctrl_o_check(*10,*10)
  161. X
  162. Xc`09Open the indexed file for reading.
  163. X`09open(unit=4,`09`09shared,
  164. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  165. X`092   status='old',`09organization='indexed',
  166. X`093   access='keyed',`09form='unformatted',
  167. X`094   recl=192,`09`09recordtype='variable',
  168. X`095   readonly,`09`09key=(1:18:character),
  169. X`096   useropen=uopen)
  170. X
  171. X`09fd.file_name='$Header'
  172. X`09read(4,key=fd.file_name,err=100)fd
  173. X`09istat = sys$asctim(,cdate,fd.upload_date,)
  174. X
  175. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  176. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  177. X`09write(6,1001)crlf(:cl)//'Last file added: '//cdate(:11)
  178. X`09call ctrl_o_check(*10,*10)
  179. X
  180. X 0100`09fd.file_name=startoff
  181. X`09read(4,keygt=fd.file_name,iostat=ios)fd
  182. X`09do while (ios.eq.0)
  183. X`09    call ctrl_o_check(*10,*10)
  184. X`09    if(fd.file_type.eq.'A') then
  185. X`09`09filtyp='Ascii '
  186. X`09    else if(fd.file_type.eq.'B') then
  187. X`09`09filtyp='Binary'
  188. X`09    else
  189. X`09`09go to 110
  190. X`09    end if
  191. X`09    istat=compquad(fd.upload_date,long_ago)
  192. X`09    if(istat.ne.-1 .and. (.not.short)) then
  193. X`09`09write(6,1001)crlf(:cl)//
  194. X`091`09    '************************************************'//
  195. X`092`09    '***********************'//crlf(:cl)
  196. X`09`09istat = sys$asctim(,cdate,fd.upload_date,)
  197. X`09`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  198. X`09`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  199. X`09`09istat=str$trim(fd.keywords,fd.keywords,keyln)
  200. X
  201. X`09    `09write(6,1002)crlf(:cl),fd.file_name,cdate(:11),
  202. X`091`09    (fd.file_size+1)/2,filtyp,fd.times_down,
  203. X`092`09    crlf(:cl)//crlf(:cl),
  204. X`093`09    fd.keywords(:keyln),fd.upload_name//crlf(:cl)
  205. X
  206. X`09`09istat=index(fd.upload_text,char(cr))
  207. X`09`09do while(istat.ne.0)
  208. X`09`09    write(6,1001)crlf(:cl)//fd.upload_text(:istat-1)
  209. X`09`09    call ctrl_o_check(*10,*10)
  210. X`09`09    fd.upload_text=fd.upload_text(istat+1:)
  211. X`09`09    istat=index(fd.upload_text,char(cr))
  212. X`09`09    end do
  213. X`09        end if
  214. X`09    if(istat.ne.-1 .and. short) then
  215. X`09`09istat = sys$asctim(,cdate,fd.upload_date,)
  216. X`09`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  217. X`09`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  218. X`09`09istat=str$trim(fd.keywords,fd.keywords,keyln)
  219. X
  220. X`09    `09write(6,1003)crlf(:cl),fd.file_name,cdate(:11),
  221. X`091`09    (fd.file_size+1)/2,filtyp,fd.keywords(:keyln)
  222. X
  223. X`09        end if
  224. X 0110`09    read(4,keygt=fd.file_name,iostat=ios)fd
  225. X`09    end do
  226. X 0010`09close(unit=4)
  227. X`09return
  228. X 1001`09format(a)
  229. X 1002`09format(a,a18,5x,a11,1x,i5,'K bytes',2x,a6,4x,'Accesses:',i5,a,5x,
  230. X`091   'Keywords: ',a,' By:',a)
  231. X 1003`09format(a,a18,1x,a11,i4,'K ',a6,1x,a)
  232. X`09end
  233. X`0C
  234. X`09subroutine enter_message(length,*,size)
  235. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  236. Vcccc
  237. Xc
  238. Xc`09UBBS subroutines
  239. Xc`09This routine handles the entering of messages.
  240. Xc`09Dale Miller - UALR
  241. Xc
  242. Xc
  243. Xc`09Rev. 3.5  19-Jun-1986
  244. Xc`09Rev. 4.8  05-Feb-1987
  245. Xc
  246. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  247. Vcccc
  248. X`09implicit none
  249. X`09include 'bbs_inc.for/nolist'
  250. X`09include 'sys$library:foriosdef/nolist'
  251. X
  252. X`09character cdummy*1,string*80,term*5
  253. X`09logical flag
  254. X`09integer*4 i,length,dummy,istat,number,size,current
  255. X`09integer array_edit
  256. Xc`09system routines
  257. X`09integer str$trim
  258. X
  259. X 1001`09format(a)
  260. X 1011`09format(i<dummy>)
  261. X 1013`09format(a,i2,'>')
  262. X 1015`09format(a,i2,1x,a)
  263. X 1024`09format(i5.5)
  264. X
  265. X`09write(term,1024)mod(user_number,100000)
  266. X`09current=0
  267. X`09if(size.eq.0) write(6,1001)crlf(:cl)//crlf(:cl)//
  268. X`091   'Your message may be 1 to 20 80-character lines.'
  269. X`09if((ur.editor.and.1).eq.1) then
  270. X`09    length=0
  271. X`09    call setup_local(.false.)
  272. X`09    call array_edit(message,length,80,20)
  273. X`09    call setup_local(.true.)
  274. X`09    if(length.gt.20) then
  275. X`09`09write(6,1001)crlf(:cl)//'Truncated to 20 lines'
  276. X`09`09length=20
  277. X`09`09end if
  278. X`09    if(length.eq.0) then
  279. X`09`09write(6,1001)crlf(:cl)//'Message aborted.'//bell
  280. X`09`09return 1
  281. X`09`09end if
  282. X`09    go to 3060
  283. X`09    end if
  284. X
  285. X`09write(6,1001)crlf(:cl)//'End your entry with a blank line.'
  286. X`09i=1
  287. X 3040`09do length=i,20
  288. X`09    dummy=80
  289. X`09    if((size.ne.0).and.(size-current.lt.79)) dummy=size-current-1
  290. X`09    write(6,1013)crlf(:cl),length
  291. X`09    call get_uplow_string(message(length),dummy)
  292. X`09    if(dummy.eq.0) go to 3050
  293. X`09    current=current+dummy+1
  294. X`09    if((size.ne.0).and.(current.ge.size)) go to 3050
  295. X`09    end do
  296. X`09length=21
  297. X 3050`09length=length-1`09`09`09!message length
  298. X`09if(length.eq.0) then
  299. X`09    write(6,1001)crlf(:cl)//'Message aborted.'//bell
  300. X`09    return 1
  301. X`09    end if
  302. Xc`09send menu goes here
  303. X 3060`09write(6,1001)crlf(:cl)//crlf(:cl)//'(S)end, (C)ontinue,'//
  304. X`091   ' (A)bort, (L)ine-edit, (F)ull-edit or (E)dit? `5BS`5D '
  305. X`09dummy=1
  306. X`09call get_upcase_string(cdummy,dummy)
  307. X`09if(dummy.eq.0) return
  308. X`09if(cdummy.eq.'A') then`09`09`09! Abort message send
  309. X`09    write(6,1001)crlf(:cl)//'Entry aborted.'//bell`09
  310. X`09    return 1
  311. X`09    endif
  312. X`09if(cdummy.eq.'C') then`09`09`09! Continue entering
  313. X`09    i=length+1
  314. X`09    go to 3040
  315. X`09    endif
  316. X`09if(cdummy.eq.'E'.or.cdummy.eq.'F'.or.cdummy.eq.'L') then ! Edit message
  317. X`09  if((((ur.editor.and.1).eq.1).and.cdummy.ne.'L')
  318. X`091    .or. cdummy.eq.'E') then
  319. X`09    call setup_local(.false.)
  320. X`09    istat=array_edit(message,length,80,20)
  321. X`09    call setup_local(.true.)
  322. X`09    if(length.gt.20) then
  323. X`09`09write(6,1001)crlf(:cl)//'Truncated to 20 lines'
  324. X`09`09length=20
  325. X`09`09end if
  326. X`09    if(length.eq.0) then
  327. X`09`09write(6,1001)crlf(:cl)//'Message aborted.'//bell
  328. X`09`09return 1
  329. X`09`09end if
  330. X`09    go to 3060
  331. X`09  else
  332. X 3069`09    write(6,1001)crlf(:cl)//'Your entry now reads:'
  333. X`09    do i=1,length
  334. X`09`09istat=str$trim(message(i),message(i),dummy)
  335. X`09`09write(6,1015)crlf(:cl),i,message(i)(1:dummy)
  336. X`09`09end do
  337. X`09    write(6,1001)crlf(:cl)
  338. X 3070`09    write(6,1001)crlf(:cl)//
  339. X`091`09'Which line do you wish to change? `5Bexit`5D '
  340. X`09    dummy=2
  341. X`09    flag=.false.
  342. X`09    call get_number(string,dummy,flag)
  343. X`09    if(dummy.eq.0) go to 3060
  344. X`09    read(string,1011)number
  345. X`09    if(number.eq.0) go to 3060
  346. X`09    if(number.gt.length) then
  347. X`09`09write(6,1001)crlf(:cl)//'Invalid line number'
  348. X`09`09go to 3070
  349. X`09`09end if
  350. X`09    write(6,1001)crlf(:cl)//'Line editor activated'
  351. X`09    write(6,1013)crlf(:cl),number
  352. X`09    dummy=80
  353. X`09    call get_edit_string(message(number),dummy)
  354. X`09    go to 3070
  355. X`09  end if
  356. X`09    end if
  357. X`09if(cdummy.eq.'S') then`09`09`09! Save message
  358. X`09    return
  359. X`09    end if
  360. X
  361. Xc`09Otherwise, error.
  362. X`09write(6,1001)crlf(:cl)//bell//'Invalid response..try again.'//bell
  363. X`09go to 3060`20
  364. X
  365. X`09end
  366. X`0C
  367. X`09subroutine get_edit_string (string,len)
  368. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  369. Vcccc
  370. Xc
  371. Xc`09UBBS subroutines
  372. Xc`09This routine will perform MS-BASIC type line editing on a string.
  373. Xc`09Dale Miller - UALR
  374. Xc
  375. Xc
  376. Xc`09Rev. 4.8  05-Feb-1987
  377. Xc
  378. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  379. Vcccc
  380. X`09implicit none
  381. X`09include 'bbs_inc.for/nolist'
  382. X`09character string*(*),temp3*200
  383. X`09logical*1 back_up(3)/bs,' ',bs/
  384. X`09logical*1 del_stg(3)/'\',' ','\'/
  385. X`09logical*1 to_send(1)
  386. X`09integer tempi,j,i
  387. X`09integer max,len,current,istat
  388. X`09integer str$trim
  389. X`09integer read_byte
  390. X
  391. X 1001`09format(a)
  392. Xc`09Find out current length
  393. X`09istat=str$trim(string,string,current)
  394. X`09max=len
  395. X`09len=0
  396. X`09timeouts=0
  397. X`09temp3=' '
  398. X
  399. Xc`09Initial mode -- no controls entered
  400. X 0010`09continue
  401. X`09tempi=read_byte(60)
  402. X`09if(timeouts.gt.4) call finish_timeout
  403. X`09if(tempi.eq.cr. or. tempi.eq.69 .or.
  404. X`091   tempi.eq.101) then
  405. X`09    go to 50`09`09`09`09!carriage return or 'E'
  406. X`09else if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rubout
  407. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  408. X`09    len=len-1
  409. X`09    call raw_write(back_up,3)
  410. X`09else if(tempi.eq.dc2) then`09`09!Control-r
  411. X`09    call out(temp3(1:len),*10)
  412. X`09else if(tempi.eq.nak .or. tempi.eq.can) then`09! Ctrl-u or ctrl-x
  413. X`09    do j=1,len
  414. X`09`09call raw_write(back_up,3)
  415. X`09`09end do
  416. X`09    len=0
  417. X`09else if(tempi.eq.32) then`09`09! Space - take next char
  418. X`09    if(len.ge.current) go to 10
  419. X`09    len=len+1
  420. X`09    temp3(len:len)=string(len:len)
  421. X`09    to_send(1)=ichar(string(len:len))
  422. X`09    call send_byte(to_send)
  423. X`09else if(tempi.eq.68 .or. tempi.eq.100) then`09! 'D' - delete next char
  424. X`09    if(len.ge.current) go to 10
  425. X`09    del_stg(2)=ichar(string(len+1:len+1))
  426. X`09    call raw_write(del_stg,3)
  427. X`09    string(len+1:)=string(len+2:)
  428. X`09    current=current-1
  429. X`09else if(tempi.eq.63 .or. tempi.eq.105) then`09! 'I' - Insert mode
  430. X`09    go to 0100`09`09`09`09! too involved for inline
  431. X`09else if(tempi.eq.88 .or. tempi.eq.120) then`09! 'X' - extend
  432. Xc`09     Actually, EOL plus I.
  433. X`09    if(current.gt.len) then
  434. X`09`09temp3(len+1:current)=string(len+1:current)
  435. X`09`09write(6,1001)temp3(len+1:current)
  436. X`09`09len=current
  437. X`09`09end if
  438. X`09    go to 0100
  439. X`09else if(tempi.eq.72 .or. tempi.eq.104) then`09! 'H' - Hack
  440. X`09    current=len
  441. X`09    temp3(len+1:)=' '
  442. X`09    string(len+1:)=' '
  443. X`09    go to 0100
  444. X`09end if
  445. X
  446. X`09go to 10
  447. X
  448. X 0050`09continue
  449. X`09if(current.gt.len) then
  450. X`09    temp3(len+1:current)=string(len+1:current)
  451. X`09    write(6,1001)temp3(len+1:current)
  452. X`09    len=current
  453. X`09    end if
  454. X`09string=temp3
  455. X`09return
  456. X
  457. X 0100`09continue`09! Insert mode.  Only allowed control is BS.
  458. X`09tempi=read_byte(60)
  459. X`09if(timeouts.gt.4) call finish_timeout
  460. X`09if(tempi.eq.cr) go to 50`09`09!carriage return
  461. X`09if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rubout
  462. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  463. X`09    len=len-1
  464. X`09    call raw_write(back_up,3)
  465. X`09else if(tempi.eq.dc2) then`09`09!Control-r
  466. X`09    call out(temp3(1:len),*10)
  467. X`09else if(tempi.le.us) then`09`09! Other control
  468. X`09    go to 10
  469. X`09else`09`09`09`09`09! Valid input character
  470. X`09    if(len.ge.max) go to 10
  471. X`09    len=len+1
  472. X`09    temp3(len:len)=char(tempi)
  473. X`09    to_send(1)=tempi
  474. X`09    call send_byte(to_send)
  475. X`09    string(len:)=char(tempi)//string(len:)
  476. X`09    current=current+1
  477. X`09end if
  478. X
  479. X`09go to 100
  480. X
  481. X`09end
  482. X`0C
  483. X`09integer function array_edit(passed_data,passed_length,row,col)
  484. XC+++
  485. XC MODULE NAME:`09array_edit`09FILE NAME: array_edit.for
  486. XC MODULE OVERVIEW:
  487. XC`09This subroutine invokes the EDT editor on an array of
  488. XC`09character data.`20
  489. XC`09Given an array of data (up to max_col lines long), this
  490. XC`09routine will send it to EDT and, upon termination of
  491. XC`09EDT, return the data in a standard FORTRAN character
  492. XC`09array.  Users may use all features of EDT except journal
  493. XC`09files.
  494. XC
  495. XC FORMAL PARAMETERS:
  496. XC`09passed_data : the address of a fixed string descriptor for
  497. XC`09`09`09a FORTRAN character data array. READ/WRITE
  498. XC`09passed_length : the current number of lines filled in the
  499. XC`09`09`09array. READ/WRITE
  500. XC`09row : the width of the array, in bytes (ie, the line length) READ
  501. XC`09col : the length of the array, up to max_col (defined as 100)
  502. XC`09`09 lines long READ
  503. XC
  504. XC CALLS:
  505. XC`09EDT$EDIT : to edit the data.
  506. XC
  507. XC IMPLICIT INPUTS:
  508. XC`09none
  509. XC
  510. XC IMPLICIT OUTPUTS:
  511. XC`09none
  512. XC
  513. XC SIDE EFFECTS:
  514. XC`09any side effects possible with EDT (including "write")
  515. XC
  516. XC COMPLETION CODES:
  517. XC`09SS$_NORMAL -- for normal return
  518. XC`09SS$_BADPARAM -- for illegal parameters
  519. XC`09SS$_INSFMEM -- unable to allocate sufficient virtual memory
  520. XC
  521. XC AUTHOR: jms `09`09CREATION DATE: May 21, 1985
  522. XC MAINTENANCE RECORD: (edit increment number, description, date, initials)
  523. XC`09V1.00-00`09jms`09Original version
  524. XC
  525. XC---
  526. Xc`09Rev. 5.2  17-Oct-1987
  527. Xc
  528. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  529. Vccc
  530. X
  531. X
  532. X`09implicit none
  533. X
  534. XC`09arguments
  535. X
  536. X`09character*(*) passed_data(*)`09`09! the passed data block
  537. X`09integer passed_length`09`09`09! how many lines are filled
  538. X`09integer row`09`09`09`09! number of rows in input
  539. X`09integer col`09`09`09`09! number of columns in input
  540. X
  541. XC`09include files
  542. X
  543. XC`09integer*4 max_col`09`09`09! maximum number of columns
  544. X`09parameter max_col = 100`09`09`09! SEE ALSO ARRAY_EDIT
  545. X`09integer*4 length`09`09`09! length of data
  546. X`09integer*4 data(2,max_col)`09`09! DSD for up to 100 records
  547. X`09common /array_edit_common/ length,data`09! common block definition
  548. X`09include '($SSDEF)'
  549. X
  550. XC`09local variables
  551. X
  552. X`09integer`09`09com_data(2,max_col)`09! pointers to string data
  553. X`09integer`09`09null_string(2)`09`09! a null string, for length
  554. X`09integer`09`09cur_len`09`09`09! length of a string
  555. X`09integer`09`09index`09`09`09! do loop index variable
  556. X`09integer`09`09index2`09`09`09! do loop index variable
  557. X`09character*1 `09null_character`09`09! the null character
  558. X`09character*32    ctrl_chrs
  559. X`09integer `09afileio_bpv(2)`09`09! BPV data type for EDT$EDIT
  560. X`09integer`09`09afileio`09`09`09! subroutine to handle I/O
  561. X`09external `09afileio
  562. X
  563. XC`09RTL functions
  564. X
  565. X`09integer`09`09str$left`09`09! extract substring of a string
  566. X`09integer`09`09str$copy_dx`09`09! copy by descriptor src->dst
  567. X`09integer`09`09lib$sget1_dd`09`09! get 1 dynamic string
  568. X`09integer`09`09str$find_first_in_set`09! find 1st char in set of chars
  569. X`09integer`09`09edt$edit`09`09! callable EDT editor`20
  570. X`09integer`09`09str$trim`09`09! remove trailing spaces
  571. X
  572. X`09ctrl_chrs  =  char(00)//char(01)//char(02)//char(03)//char(04)//
  573. X`091   char(05)//char(06)//char(07)//char(08)//char(09)//char(10)//
  574. X`092   char(11)//char(12)//char(13)//char(14)//char(15)//char(16)//
  575. X`093   char(17)//char(18)//char(19)//char(20)//char(21)//char(22)//
  576. X`094   char(23)//char(24)//char(25)//char(26)//char(27)//char(28)//
  577. X`095   char(29)//char(30)//char(31)
  578. X
  579. X`09array_edit = SS$_NORMAL`09`09`09! set default return status
  580. X`09length=passed_length`09`09`09! fill in common block
  581. X`09afileio_bpv(1) = %loc(afileio)`09`09! and create the descriptor
  582. X`09afileio_bpv(2) = 1`09`09`09! for the BPV.
  583. X
  584. XC`09parameter bounds checking.`20
  585. X`09if (col.gt.max_col .or. col.lt.0 .or. row.lt.0 .or.`20
  586. X`091`09passed_length.lt.0) then
  587. X`09`09array_edit = SS$_BADPARAM
  588. X`09`09return
  589. X`09endif
  590. X
  591. XC+++
  592. XC Witness a major kludge -- getting FORTRAN fixed string descriptors
  593. XC to convert to VMS dynamic string descriptors.  For each row in the
  594. XC array, get a dynamic string of length row.  Copy the FORTRAN entry
  595. XC at row I into the dynamic string descriptor, and then shorten
  596. XC the dynamic string to the correct length.
  597. XC---
  598. X`09do index=1,col
  599. X`09`09if (lib$sget1_dd(row,data(1,index)) .ne. SS$_NORMAL) then
  600. X`09`09`09array_edit = SS$_INSFMEM
  601. X`09`09`09return
  602. X`09`09endif
  603. X`09`09call str$trim(data(1,index),
  604. X`091`09    passed_data(index)(1:row),cur_len)
  605. X`09end do
  606. X
  607. XC+++
  608. XC Now, call the editor.
  609. XC---
  610. X`09call edt$edit ( 'an input file',! input file
  611. X`091`09`09'You have entered', ! output file
  612. X`092`09`09'ubbs_data:wordwrap.edt',`09! command file
  613. X`093`09`09,`09`09! journal file
  614. X`094`09`09"44,`09`09! bits 1B5,1B2
  615. X`095`09`09afileio_bpv,`09! fileio routine
  616. X`096`09`09,`09`09! workio routine
  617. X`097`09`09,)`09`09! xlate routine
  618. X
  619. X
  620. XC+++
  621. XC copy the data back into the FORTRAN array, and
  622. XC update the length. Since str$copy_dx signals all
  623. XC errors (except STR$_TRU, which we don't care about
  624. XC anyway), no need to check status. Return from whence we came.
  625. XC---
  626. X`09do index=1,col
  627. X`09    call str$copy_dx( passed_data(index) , data(1,index) )
  628. X`09    end do
  629. X`09do index=1,min(length,col)
  630. X`09    index2=str$find_first_in_set(passed_data(index),ctrl_chrs)
  631. X`09    do while(index2.ne.0)
  632. X`09`09if(index2.eq.1) then
  633. X`09`09    passed_data(index)=passed_data(index)(2:)
  634. X`09`09else
  635. X`09`09    passed_data(index)=passed_data(index)(1:index2-1)//
  636. X`091`09`09passed_data(index)(index2+1:)
  637. X`09`09end if
  638. X`09`09index2=str$find_first_in_set(passed_data(index),ctrl_chrs)
  639. X`09`09end do
  640. X`09    end do
  641. X`09passed_length=length
  642. X`09return
  643. X
  644. X`09end
  645. X`0C
  646. X`09integer function afileio(code, stream, record, rhb)
  647. X
  648. XC+++
  649. XC MODULE NAME:`09afileio`09`09FILE NAME:`09array_edit.for
  650. XC MODULE OVERVIEW:
  651. XC`09This subroutine is passed to the EDT$EDIT subroutine
  652. XC`09to simulate disk i/o. In this way, arrays of data
  653. XC`09can be edited with the EDT editor.
  654. XC
  655. XC FORMAL PARAMETERS:
  656. XC`09code : the action desired (defined by EDTSHR.EXE)
  657. XC`09stream : the file for which "code" action is desired
  658. XC`09record : the record to read/write OR the filename to open
  659. XC`09rhb : the record header block (not VMS) OR the related filename to open
  660. XC
  661. XC IMPLICIT INPUTS:
  662. XC`09from common block /ARRAY_EDIT_COMMON/
  663. XC`09`09length : the length of the data (read/write)
  664. XC`09`09data : the original data (not updated until EDT exits)
  665. XC
  666. XC IMPLICIT OUTPUTS:
  667. XC`09none
  668. XC
  669. XC SIDE EFFECTS:
  670. XC`09none
  671. XC
  672. XC COMPLETION CODES:
  673. XC`09SS$_NORMAL : all normal errors
  674. XC`09RMS$_EOF : for end of file on read
  675. XC`09all other errors are signaled.
  676. XC
  677. XC AUTHOR: jms`09`09CREATION DATE:`09May 21, 1985
  678. XC MAINTENANCE RECORD:
  679. XC`09V1.00-0`09`09Original Version`09JMS
  680. XC
  681. XC---
  682. X
  683. X`09implicit none
  684. X
  685. XC passed arguments
  686. X
  687. X`09integer*4 code`09`09`09`09! code passed in from EDT
  688. X`09integer*4 stream`09`09`09! stream to act upon
  689. X`09integer*4 record(2)`09`09`09! DSD for record
  690. X`09integer*4 rhb(2)`09`09`09! DSD for record header block
  691. X
  692. XC common block definitions
  693. X
  694. XC`09integer*4 max_col`09`09`09! maximum number of columns
  695. X`09parameter max_col = 100`09`09`09! SEE ALSO ARRAY_EDIT
  696. X`09integer*4 length`09`09`09! length of data
  697. X`09integer*4 data(2,max_col)`09`09! DSD for up to 100 records
  698. X`09common /array_edit_common/ length,data`09! common block definition
  699. X`09include 'bbs_inc.for'
  700. XC included libraries and constant files
  701. X
  702. Xc`09include '($ssdef)'
  703. X`09include '($rmsdef)'
  704. X
  705. XC RTL routines
  706. X`09
  707. X`09integer`09`09edt$fileio
  708. X
  709. XC local variables
  710. X
  711. X`09integer`09`09in_ptr`09`09`09!input file pointer
  712. X`09integer`09`09out_ptr`09`09`09!output file pointer
  713. X
  714. X
  715. XC set status initially to be normal
  716. X
  717. X`09afileio = SS$_NORMAL
  718. X
  719. XC+++
  720. XC Determine what to do based on what file is being requested.
  721. XC For most files (all except input and output), we pass the I/O
  722. XC request on to the system EDT$FILEIO routine.  For input and
  723. XC output files, handle the I/O to/from an array. This is particularily
  724. XC easy since the input file is opened and read once, and the output
  725. XC file is opened and written once.
  726. XC---
  727. X
  728. X`09if (stream .eq. edt$k_input_file) then
  729. XC+++
  730. XC Handle case of input file. Check request. Normal requests
  731. XC are to open_input and get.  edt$k_close is also a legal
  732. XC request, which is ignored.  All othe requests are illegal,
  733. XC but we ignore them without returning error conditions.
  734. XC---
  735. X`09`09if (code .eq. edt$k_get) then
  736. XC+++
  737. XC Read data until length lines have been reached.
  738. XC When done, return RMS$_EOF and do not copy.
  739. XC---
  740. X`09`09`09if (in_ptr .gt. length) then
  741. X`09`09`09`09afileio = RMS$_EOF
  742. X`09`09`09else
  743. X`09`09`09`09call str$copy_dx ( record, data(1,in_ptr) )
  744. X`09`09`09`09in_ptr=in_ptr+1
  745. X`09`09`09`09rhb(1)='020E0000'X`09! fix numbers
  746. X`09`09`09endif
  747. X
  748. X`09`09else if (code .eq. edt$k_open_input) then
  749. XC+++
  750. XC Reset input pointer to 1 when opening input file
  751. XC---
  752. X`09`09`09in_ptr=1
  753. X
  754. X`09`09else if (code .eq. edt$k_open_output_seq) then
  755. X
  756. X`09`09`09continue`09`09`09`09! error
  757. X
  758. X`09`09else if (code .eq. edt$k_open_output_noseq) then
  759. X
  760. X`09`09`09continue`09`09`09`09! error
  761. X
  762. X`09`09else if (code .eq. edt$k_open_in_out) then
  763. X
  764. X`09`09`09continue`09`09`09`09! error
  765. X
  766. X`09`09else if (code .eq. edt$k_put) then
  767. X
  768. X`09`09`09continue`09`09`09`09! error
  769. X
  770. X`09`09else if (code .eq. edt$k_close_del) then
  771. X
  772. X`09`09`09continue`09`09`09`09! no action
  773. X
  774. X`09`09else if (code .eq. edt$k_close) then
  775. X
  776. X`09`09`09continue`09`09`09`09! no action
  777. X
  778. X`09`09endif
  779. X
  780. X`09else if (stream .eq. edt$k_output_file) then
  781. XC+++
  782. XC Handle case of output file. Legal actions are open_output_noseq,
  783. XC put, and close.  Close is used to reset the length to the
  784. XC length of the file. Open resets pointers, and put is used to
  785. XC write the data out. All other possible codes are checked for,
  786. XC but none are handled.
  787. XC---
  788. X`09`09if (code .eq. edt$k_put) then
  789. X
  790. X`09`09`09if (out_ptr .le. max_col) then
  791. X`09`09`09`09call str$copy_dx ( data(1,out_ptr), record )
  792. X`09`09`09`09out_ptr = out_ptr+1
  793. X`09`09`09endif
  794. X
  795. X`09`09else if (code .eq. edt$k_open_output_noseq) then
  796. X
  797. X`09`09`09length=0
  798. X`09`09`09out_ptr=1
  799. X
  800. X`09`09else if (code .eq. edt$k_close) then
  801. X
  802. X`09`09`09length=out_ptr-1
  803. X
  804. X`09`09else if (code .eq. edt$k_get) then
  805. X
  806. X`09`09`09continue`09`09`09! error
  807. X
  808. X`09`09else if (code .eq. edt$k_open_input) then
  809. X
  810. X`09`09`09continue`09`09`09! error
  811. X
  812. X`09`09else if (code .eq. edt$k_open_output_seq) then
  813. X
  814. X`09`09`09continue`09`09`09! error
  815. X
  816. X`09`09else if (code .eq. edt$k_open_in_out) then
  817. X
  818. X`09`09`09continue`09`09`09! error
  819. X
  820. X`09`09else if (code .eq. edt$k_put) then
  821. X
  822. X`09`09`09continue`09`09`09! error
  823. X
  824. X`09`09else if (code .eq. edt$k_close_del) then
  825. X
  826. X`09`09`09continue`09`09`09! no action
  827. X
  828. X`09`09endif
  829. X
  830. X`09else if (stream .eq. edt$k_write_file) then
  831. X
  832. Xc`09`09Allow if operator, otherwise ignore.
  833. X`09`09if(sysop2) afileio = edt$fileio(code,stream,record,rhb)
  834. X
  835. X`09else if (stream .eq. edt$k_command_file) then
  836. X
  837. X`09`09afileio = edt$fileio(code,stream,record,rhb)
  838. X
  839. X`09else if (stream .eq. edt$k_include_file) then
  840. X
  841. X`09`09if(sysop2) then
  842. X`09`09`09afileio = edt$fileio(code,stream,record,rhb)
  843. X`09`09else if (code .eq. edt$k_get) then
  844. X`09`09`09afileio = RMS$_EOF
  845. X`09`09`09end if
  846. X
  847. X`09else if (stream .eq. edt$k_journal_file) then
  848. X
  849. X`09`09afileio = edt$fileio(code,stream,record,rhb)
  850. X
  851. X`09endif
  852. X
  853. X`09return
  854. X
  855. X`09end
  856. X`0C
  857. X`09integer function netmail(
  858. X`091   node,`09`09`09! Node to send to
  859. X`092   from_name,`09`09`09! FROM name
  860. X`093   to_name,`09`09`09! TO name @ node
  861. X`094   to_show,`09`09`09! What to show in TO field
  862. X`095   subject,`09`09`09! Subject
  863. X`096   text)`09`09`09! Text array
  864. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  865. Vcccc
  866. Xc
  867. Xc`09NETMAIL.FOR
  868. Xc`09This program will send a message to a user using the VAX/VMS
  869. Xc`09"handle" via DECnet.  Based on a BASIC program from "VAX Professional"
  870. Xc
  871. Xc`09Dale Miller - UALR
  872. Xc
  873. Xc`09Rev. 1.0  26-Jan-1987
  874. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  875. Vcccc
  876. X
  877. X
  878. X`09implicit none`20
  879. X`20
  880. X`09character*(*)  node
  881. X`09character*(*) from_name
  882. X`09character*(*) to_name
  883. X`09character*(*) to_show
  884. X`09character*(*) subject
  885. X`09character*80 text(20)
  886. X`09character*80 work
  887. X
  888. X`09integer istat,len,mlen,i
  889. X`09integer str$trim,str$upcase
  890. X
  891. X`09logical errchk
  892. X
  893. X 1001`09format(a)
  894. X
  895. X
  896. Xc`09Open the link to the mail task, and handle errors
  897. X
  898. X`09istat=str$upcase(work,node)
  899. X`09istat=str$trim(work,work(1:6),len)
  900. X
  901. X`09open(unit=11,`09`09`09`09! Open channel to MAIL server
  902. X`091   file=work(1:len)//'::"27="',
  903. X`092   access='sequential',
  904. X`093   form='formatted',
  905. X`094   carriagecontrol='none',
  906. X`095   status='new')
  907. X
  908. Xc`09Send the FROM information
  909. X
  910. X`09istat=str$trim(from_name,from_name,len)
  911. X`09write(11,1001,err=9999) from_name(1:len)
  912. Xc`09Send each message which states who should receive the text on the
  913. Xc`09other side. ALWAYS CHECK what status the MAIL server gives back.
  914. X
  915. X`09istat=str$upcase(work,to_name)
  916. X`09istat=str$trim(work,work(1:32),len)
  917. X`09write(11,1001,err=9999)work(1:len)
  918. X
  919. X`09if (errchk(0)) go to 9999`09`09! Check if MAIL server accepted
  920. Xc`09Terminate the list of receivers with a one byte null record
  921. X
  922. X`09write(11,1001,err=9999) char(0)
  923. Xc`09Send the text that shows up in the TO: field of mail
  924. X
  925. X`09istat=str$trim(work,to_show,len)
  926. X`09write(11,1001,err=9999) work(1:len)
  927. Xc`09Write the subject line to the DECnet link.
  928. X
  929. X`09istat=str$trim(work,subject,len)
  930. X`09write(11,1001,err=9999) work(1:len)`09! Put the text
  931. Xc`09Read in each line of text and send it across line by line.
  932. Xc`09This can be optimized to send one long chunk.
  933. X
  934. X`09mlen=20
  935. X`09do while (text(mlen).eq.' ')
  936. X`09    mlen=mlen-1
  937. X`09    end do
  938. X`09do i=1,mlen
  939. X`09    istat=str$trim(work,text(i),len)
  940. X`09    write(11,1001,err=9999) work(1:len)`09! Put the text
  941. X`09    end do`20
  942. X
  943. Xc`09Write end of text message.
  944. X
  945. X`09write(11,1001,err=9999) char(0)`09`09! Put null byte
  946. Xc`09Loop through and receive the status code for all users
  947. Xc`09the mail was sent to.
  948. X
  949. X`09if(errchk(0)) go to 9999`09`09! Go check error, print msgs
  950. Xc`09Finished, go close up shop
  951. X
  952. X`09close(unit=11)
  953. X`09netmail=0
  954. X`09return
  955. X
  956. X 9999`09Continue`09`09`09`09! Error return
  957. X`09close(unit=11)
  958. X`09netmail=1
  959. X`09return
  960. X`09end
  961. X`0C`20
  962. X`09logical function errchk(x)
  963. Xc`09Check to see if the message just sent was received ok; or, check
  964. Xc`09what the incoming message from the MAIL server says.
  965. Xc`09This routine will dump error text to the terminal
  966. X`09implicit none
  967. X`09character*255 mess
  968. X`09integer len
  969. X`09integer x,dummy
  970. X
  971. X 1002`09format(q,a)
  972. X`09read(11,1002,err=2000)len,mess
  973. X`09dummy=ichar(mess(1:1))
  974. X`09if((dummy.and.1).eq.1) then`09`09! Success?
  975. X`09    errchk=.false.
  976. X`09    return
  977. X`09    end if
  978. X
  979. Xc`09Come here if an error was received
  980. X
  981. X
  982. X 0020`09continue
  983. X`09read(11,1002,err=2000)len,mess(1:len)`09! Get text/terminator indication
  984. X
  985. X`09if(len.ne.1) then`09`09`09! If len <> 1, must be text
  986. X`09    print*,mess(1:len)`09`09`09! so print it
  987. X`09    go to 0020`09`09`09`09! and loop for possibly more
  988. X`09    end if
  989. X`09if(ichar(mess(1:1)).ne.0) go to 20`09! 0 byte means all done
  990. X`09errchk=.true.
  991. X`09return
  992. X
  993. X 2000`09print*,'%Network communications error'
  994. X`09errchk=.true.
  995. X`09end
  996. X`0C
  997. X`09subroutine get_password (password,len)
  998. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  999. Vcccc
  1000. Xc
  1001. Xc`09UBBS subroutines
  1002. Xc`09This routine will read a password and echo asterisks in its place.
  1003. Xc`09Dale Miller - UALR
  1004. Xc
  1005. Xc
  1006. Xc`09Rev. 3.5  19-Jun-1986
  1007. Xc`09Rev. 4.9  10-Feb-1987
  1008. Xc`09Rev. 5.3  02-Dec-1987
  1009. Xc`09Rev. 5.4  21-Dec-1987
  1010. Xc
  1011. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1012. Vcccc
  1013. X`09implicit none
  1014. X`09include 'bbs_inc.for/nolist'
  1015. X`09logical*1 asterisk(1)/'*'/
  1016. X`09logical*1 back_up(3)/bs,' ',bs/
  1017. X`09character password*(*)
  1018. X`09integer len,tempi,j,read_byte
  1019. X
  1020. X`09len=0
  1021. X`09timeouts=0
  1022. X`09password=' '
  1023. X
  1024. X 0010`09tempi=read_byte(60)
  1025. X`09if(timeouts.gt.4) call finish_timeout
  1026. X`09if(tempi.eq.cr) then`09`09`09`09!carriage return
  1027. X`09    do j=len+1,10
  1028. X`09`09call send_byte(asterisk)
  1029. X`09`09end do
  1030. X`09    call send_byte(cr)
  1031. X`09    return
  1032. X`09else if(tempi.eq.bs.or.tempi.eq.rub) then`09!Backspace or rubout
  1033. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  1034. X`09    password(len:len)=' '
  1035. X`09    len=len-1
  1036. X`09    call raw_write(back_up,3)
  1037. X`09else if(tempi.eq.nak.or.tempi.eq.can) then`09!`5EU or `5EX
  1038. X`09    do j=1,len
  1039. X`09`09call raw_write(back_up,3)
  1040. X`09`09end do
  1041. X`09    len=0
  1042. X`09    password=' '
  1043. X`09else if(len.ge.10) then
  1044. X`09    go to 10
  1045. X`09else if(tempi.le.us) then`09`09`09!other control character
  1046. X`09    go to 10
  1047. X`09else if(tempi.ge.97.and.tempi.le.122) then
  1048. X`09    tempi=tempi-32
  1049. X`09    len=len+1
  1050. X`09    password(len:len)=char(tempi)
  1051. X`09    call send_byte(asterisk)
  1052. X`09else
  1053. X`09    len=len+1
  1054. X`09    password(len:len)=char(tempi)
  1055. X`09    call send_byte(asterisk)
  1056. X`09end if
  1057. X
  1058. X`09go to 10
  1059. X
  1060. X`09end
  1061. X`0C
  1062. X`09subroutine get_upcase_string (string,len)
  1063. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1064. Vcccc
  1065. Xc
  1066. Xc`09UBBS subroutines
  1067. Xc`09This routine will allow input of an upper-case-only string.
  1068. Xc`09Dale Miller - UALR
  1069. Xc
  1070. Xc
  1071. Xc`09Rev. 3.5  19-Jun-1986
  1072. Xc`09Rev. 4.9  10-Feb-1987
  1073. Xc`09Rev. 5.3  02-Dec-1987
  1074. Xc`09Rev. 5.4  21-Dec-1987
  1075. Xc
  1076. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1077. Vcccc
  1078. X`09implicit none
  1079. X`09include 'bbs_inc.for/nolist'
  1080. X`09character string*(*)
  1081. X`09logical*1 back_up(3)/bs,' ',bs/
  1082. X`09logical*1 to_send(1)
  1083. X`09logical*1 spc
  1084. X`09integer tempi,len,max,j
  1085. X`09integer read_byte
  1086. X
  1087. X`09spc=.false.
  1088. X`09if(len.lt.0) then
  1089. X`09    len=-len
  1090. X`09    spc=.true.
  1091. X`09    end if
  1092. X`09max=len
  1093. X`09len=0
  1094. X`09timeouts=0
  1095. X`09string=' '
  1096. X
  1097. X 0010`09tempi=read_byte(60)
  1098. X`09if(timeouts.gt.4) then
  1099. X`09    call finish_timeout
  1100. X`09else if(tempi.eq.cr) then`09`09`09!carriage return
  1101. X`09    call send_byte(cr)
  1102. X`09    return
  1103. X`09else if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rub
  1104. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  1105. X`09    string(len:len)=' '
  1106. X`09    len=len-1
  1107. X`09    call raw_write(back_up,3)
  1108. X`09else if(tempi.eq.dc2) then`09`09`09!Control-r  (Repaint line)
  1109. X`09    call out(string(1:len),*10)
  1110. X`09else if(tempi.eq.nak.or.tempi.eq.can) then`09!`5EU or `5EX
  1111. X`09    do j=1,len
  1112. X`09`09call raw_write(back_up,3)
  1113. X`09`09end do
  1114. X`09    len=0
  1115. X`09    string=' '
  1116. X`09else if(len.ge.max) then
  1117. X`09    continue
  1118. X`09else if(tempi.le.us) then`09`09`09!other control character
  1119. X`09    continue
  1120. X`09else if(tempi.eq.32.and..not.spc) then
  1121. X`09    continue
  1122. X
  1123. Xc`09force to only alphabetic plus ' and -
  1124. X`09else if ((tempi.ge.33.and.tempi.le.38) .or.
  1125. X`091   (tempi.ge.40.and.tempi.le.44) .or.
  1126. X`092   (tempi.ge.46.and.tempi.le.64) .or.
  1127. X`093   (tempi.ge.91.and.tempi.le.96) .or.
  1128. X`094   (tempi.ge.123.and.tempi.le.126)) then
  1129. X`09    continue
  1130. X
  1131. Xc`09good character
  1132. X`09else
  1133. X`09    len=len+1
  1134. X`09    if(tempi.ge.97.and.tempi.le.122) tempi=tempi-32
  1135. X`09    string(len:len)=char(tempi)
  1136. X`09    to_send(1)=tempi
  1137. X`09    call send_byte(to_send)
  1138. X`09end if
  1139. X
  1140. X`09go to 10
  1141. X
  1142. X`09end
  1143. X`0C
  1144. X`09subroutine get_uplow_string (string,len)
  1145. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1146. Vcccc
  1147. Xc
  1148. Xc`09UBBS subroutines
  1149. Xc`09This routine will allow input of all but control characters.
  1150. Xc`09Dale Miller - UALR
  1151. Xc
  1152. Xc
  1153. Xc`09Rev. 3.5  19-Jun-1986
  1154. Xc`09Rev. 4.9  10-Feb-1987
  1155. Xc`09Rev. 5.3  02-Dec-1987
  1156. Xc`09Rev. 5.4  21-Dec-1987
  1157. Xc
  1158. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1159. Vcccc
  1160. X`09implicit none
  1161. X`09include 'bbs_inc.for/nolist'
  1162. X`09character string*(*)
  1163. X`09logical*1 back_up(3)/bs,' ',bs/
  1164. X`09logical*1 to_send(1),ctlz
  1165. X`09integer read_byte,tempi,j,len,max
  1166. X
  1167. X`09ctlz=.false.`09`09!assume no control-z allowed
  1168. X`09if(len.lt.0) then
  1169. X`09    len=-len
  1170. X`09    ctlz=.true.
  1171. X`09    end if
  1172. X`09max=len
  1173. X`09len=0
  1174. X`09timeouts=0
  1175. X`09string=' '
  1176. X
  1177. X 0010`09tempi=read_byte(60)
  1178. X`09if(timeouts.gt.4) then
  1179. X`09    call finish_timeout
  1180. X`09else if(tempi.eq.cr) then`09`09`09!carriage return
  1181. X`09    call send_byte(cr)
  1182. X`09    return
  1183. X`09else if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rub
  1184. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  1185. X`09    string(len:len)=' '`09`09`09`09!Clear out old one
  1186. X`09    len=len-1
  1187. X`09    call raw_write(back_up,3)
  1188. X`09else if(tempi.eq.dc2) then`09`09`09!Control-r  (Repaint line)
  1189. X`09    call out(string(1:len),*10)
  1190. X`09else if(tempi.eq.nak.or.tempi.eq.can) then`09!`5EU or `5EX
  1191. X`09    do j=1,len
  1192. X`09`09call raw_write(back_up,3)
  1193. X`09`09end do
  1194. X`09    len=0
  1195. X`09    string=' '
  1196. X`09else if((tempi.eq.sub).and.(len.eq.0).and.ctlz) then !control-z (eof)
  1197. X`09    len=-1
  1198. X`09    string=' '
  1199. X`09    return
  1200. X`09else if((tempi.eq.etx).and.(len.eq.0).and.ctlz) then !control-c (abort)
  1201. X`09    len=-2
  1202. X`09    string=' '
  1203. X`09    return
  1204. X`09else if(len.ge.max) then
  1205. X`09    continue
  1206. X`09else if(tempi.le.us) then`09`09`09!other control character
  1207. X`09    continue
  1208. X
  1209. Xc`09good character
  1210. X`09else
  1211. X`09    len=len+1
  1212. X`09    string(len:len)=char(tempi)
  1213. X`09    to_send(1)=tempi
  1214. X`09    call send_byte(to_send)
  1215. X`09end if
  1216. X
  1217. X`09go to 10
  1218. X
  1219. X`09end
  1220. X`0C
  1221. X`09subroutine get_number (string,len,flag)
  1222. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1223. Vcccc
  1224. Xc
  1225. Xc`09UBBS subroutines
  1226. Xc`09This routine will read a numeric string or an asterisk.
  1227. Xc`09If flag = .true. an asterisk is allowed.
  1228. Xc
  1229. Xc`09Dale Miller - UALR
  1230. Xc
  1231. Xc
  1232. Xc`09Rev. 3.5  19-Jun-1986
  1233. Xc`09Rev. 4.9  10-Feb-1987
  1234. Xc`09Rev. 4.11 27-Nov-1987
  1235. Xc`09Rev. 5.4  21-Dec-1987
  1236. Xc
  1237. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1238. Vcccc
  1239. X`09implicit none
  1240. X`09include 'bbs_inc.for/nolist'
  1241. X`09logical*1 asterisk(1)/'*'/
  1242. X`09logical*1 back_up(3)/bs,' ',bs/
  1243. X`09character string*(*)
  1244. X`09logical flag
  1245. X`09logical*1 to_send(1)
  1246. X`09integer read_byte,tempi,j,len,max
  1247. X
  1248. X`09max=len`09`09`09`09
  1249. X`09len=0
  1250. X`09timeouts=0
  1251. X`09string=' '
  1252. X
  1253. X 0010`09tempi=read_byte(60)
  1254. X`09if(timeouts.gt.4) then
  1255. X`09    call finish_timeout
  1256. X`09else if(tempi.eq.cr) then`09`09`09!carriage return
  1257. X`09    call send_byte(cr)
  1258. X`09    return
  1259. X`09else if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rub
  1260. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  1261. X`09    string(len:len)=' '
  1262. X`09    len=len-1
  1263. X`09    call raw_write(back_up,3)
  1264. X`09else if(tempi.eq.dc2) then`09`09`09!Control-r  (Repaint line)
  1265. X`09    call out(string(1:len),*10)
  1266. X`09else if(tempi.eq.nak.or.tempi.eq.can) then`09!`5EU or `5EX
  1267. X`09    do j=1,len
  1268. X`09`09call raw_write(back_up,3)
  1269. X`09`09end do
  1270. X`09    len=0
  1271. X`09    string=' '
  1272. X`09else if(len.ge.max) then
  1273. X`09    continue
  1274. X`09else if(tempi.eq.42.and.(len.ne.0.or.(.not.flag))) then`09!Asterisk
  1275. X`09     continue
  1276. X`09else if(tempi.gt.42.and.tempi.lt.48) then`09!Non-numeric
  1277. X`09    continue
  1278. X`09else if(tempi.lt.42.or.tempi.gt.57) then`09!Non-numeric
  1279. X`09    continue
  1280. X`09else if(string(1:1).eq.'*') then`09`09!Asterisk was entered
  1281. X`09    continue
  1282. Xc`09good character
  1283. X`09else
  1284. X`09    len=len+1
  1285. X`09    string(len:len)=char(tempi)
  1286. X`09    to_send(1)=tempi
  1287. X`09    call send_byte(to_send)
  1288. X`09end if
  1289. X
  1290. X`09go to 10
  1291. X
  1292. X`09end
  1293. X`0C
  1294. X`09subroutine get_filnam_string (string,len)
  1295. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1296. Vcccc
  1297. Xc
  1298. Xc`09UBBS subroutines
  1299. Xc`09This routine will allow input of a VAX filename.
  1300. Xc
  1301. Xc`09Dale Miller - UALR
  1302. Xc
  1303. Xc
  1304. Xc`09Rev. 3.5  19-Jun-1986
  1305. Xc`09Rev. 4.9  10-Feb-1987
  1306. Xc`09Rev. 4.12 11-Jun-1987
  1307. Xc`09Rev. 5.4  21-Dec-1987
  1308. Xc
  1309. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1310. Vcccc
  1311. X`09implicit none
  1312. X`09include 'bbs_inc.for/nolist'
  1313. X`09character string*(*)
  1314. X`09logical*1 back_up(3)/bs,' ',bs/
  1315. X`09logical*1 to_send(1)
  1316. X`09logical*1 period
  1317. X`09integer read_byte,tempi,j,len,max
  1318. X
  1319. X`09period=.false.
  1320. X`09max=len
  1321. X`09len=0
  1322. X`09timeouts=0
  1323. X`09string=' '
  1324. X
  1325. X 0010`09tempi=read_byte(60)
  1326. X`09if(timeouts.gt.4) then
  1327. X`09    call finish_timeout
  1328. X`09else if(tempi.eq.cr) then`09`09`09!carriage return
  1329. X`09    call send_byte(cr)
  1330. X`09    if(period) then
  1331. X`09`09return
  1332. X`09    else
  1333. X`09`09if(len.eq.max) len=len-1
  1334. X`09`09len=len+1
  1335. X`09`09string(len:len)='.'
  1336. X`09`09return
  1337. X`09    end if
  1338. X`09else if(tempi.eq.bs .or. tempi.eq.rub) then`09!backspace or rub
  1339. X`09    if(len.eq.0) go to 10`09`09`09!nothing to delete
  1340. X`09    string(len:len)=' '
  1341. X`09    len=len-1
  1342. X`09    call raw_write(back_up,3)
  1343. X`09else if(tempi.eq.dc2) then`09`09`09!Control-r  (Repaint line)
  1344. X`09    call out(string(1:len),*10)
  1345. X`09else if(tempi.eq.nak.or.tempi.eq.can) then`09!`5EU or `5EX
  1346. X`09    do j=1,len
  1347. X`09`09call raw_write(back_up,3)
  1348. X`09`09end do
  1349. X`09    len=0
  1350. X`09    string=' '
  1351. X`09else if(len.ge.max) then
  1352. X`09    continue
  1353. X`09else if(tempi.le.us) then`09`09`09!other control character
  1354. X`09    continue
  1355. X
  1356. Xc`09force to only alphabetic plus _,$,- and .
  1357. X
  1358. X`09else if(tempi.eq.46.and.period) then
  1359. X`09    continue
  1360. X`09else if ((tempi.le.35) .or.
  1361. X`091   (tempi.eq.36.and.len.eq.0) .or.`09`09! Disallow leading $
  1362. X`092   (tempi.ge.37.and.tempi.le.44) .or.
  1363. X`093   (tempi.eq.47) .or.
  1364. X`094   (tempi.ge.58.and.tempi.le.64) .or.
  1365. X`095   (tempi.ge.91.and.tempi.le.94) .or.
  1366. X`096   (tempi.eq.96) .or.
  1367. X`097   (tempi.ge.123.and.tempi.le.126)) then
  1368. X`09    continue
  1369. X
  1370. Xc`09good character
  1371. X`09else
  1372. X`09    len=len+1
  1373. X`09    if(tempi.ge.97.and.tempi.le.122) tempi=tempi-32
  1374. X`09    string(len:len)=char(tempi)
  1375. X`09    to_send(1)=tempi
  1376. X`09    call send_byte(to_send)
  1377. X`09    if(tempi.eq.46) period=.true.
  1378. X`09end if
  1379. X
  1380. X`09go to 10
  1381. X
  1382. X`09end
  1383. X`0C
  1384. X`09subroutine searchcat(darea)
  1385. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1386. Vcccc
  1387. Xc
  1388. Xc`09UBBS subroutines
  1389. Xc`09This routine will search the directory of files for a download area
  1390. Xc`09for a specific keyword.
  1391. Xc`09Dale Miller - UALR
  1392. Xc
  1393. Xc
  1394. Xc`09Rev. 4.10 11-Feb-1987
  1395. Xc`09Rev. 6.0  06-Jun-1988
  1396. Xc`09Rev. 7.2  02-Jan-1989
  1397. Xc
  1398. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1399. Vcccc
  1400. X`09implicit none
  1401. X`09include 'bbs_inc.for'
  1402. X`09character*(*) darea
  1403. X`09character cdate*11,filtyp*6,startoff*18
  1404. X`09character keyword*40,lookup*40
  1405. X`09integer length,dummy,kl
  1406. X`09real*8 long_ago
  1407. X`09logical short
  1408. X
  1409. X`09integer istat,keyln
  1410. X`09integer compquad
  1411. X`09integer sys$asctim,sys$bintim,str$upcase,str$trim
  1412. X`09external uopen
  1413. X
  1414. X`09record/file_description/ fd
  1415. X
  1416. X`09write(6,1001)crlf(:cl)//'Keyword to search for? `5Bexit`5D'
  1417. X`09kl=40
  1418. X`09call get_uplow_string(keyword,kl)
  1419. X`09if(kl.eq.0) return
  1420. X`09istat=str$upcase(keyword,keyword)
  1421. X
  1422. X`09short=.true.
  1423. X`09write(6,1001)crlf(:cl)//'Do you want a short or a long listing?'//
  1424. X`091   ' `5BShort`5D'
  1425. X`09dummy=5
  1426. X`09call get_upcase_string(startoff,dummy)
  1427. X`09if(startoff(1:1).eq.'L') short=.false.
  1428. X`09write(6,1001)crlf(:cl)//'Enter earliest date of files you'//
  1429. X`091   ' wish to see.'//crlf(:cl)//
  1430. X`092   'The date must be dd-mmm-yyyy (e.g. 19-APR-1986)'//
  1431. X`093   crlf(:cl)//'Or enter <cr> for a all dates.'//
  1432. X`094   crlf(:cl)//'?'
  1433. X`09dummy=11
  1434. X`09call get_uplow_string(cdate,dummy)
  1435. X`09if(dummy.eq.0) cdate='01-JUL-1985'
  1436. X`09istat=str$upcase(cdate,cdate)
  1437. X`09istat = sys$bintim(cdate(:11)//' 00:00:00.00',long_ago)
  1438. X`09istat = sys$asctim(,cdate,long_ago,)
  1439. X
  1440. X`09write(6,1001)crlf(:cl)//
  1441. X`091   'Enter the starting file name or <cr> for beginning :'
  1442. X`09dummy=18
  1443. X`09startoff=char(0)
  1444. X`09call get_filnam_string(startoff,dummy)
  1445. X`09if(startoff.eq.' ') startoff='.'
  1446. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  1447. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  1448. X`09write(6,1001)crlf(:cl)//'    Files since: '//cdate(:11)
  1449. X`09call ctrl_o_check(*10,*10)
  1450. X
  1451. Xc`09Open the indexed file for reading.
  1452. X`09open(unit=4,`09`09shared,
  1453. X`091   file='ubbs_files:`5B'//darea//'`5Dfiles.idx',
  1454. X`092   status='old',`09organization='indexed',
  1455. X`093   access='keyed',`09form='unformatted',
  1456. X`094   recl=192,`09`09recordtype='variable',
  1457. X`095   readonly,`09`09key=(1:18:character),
  1458. X`096   useropen=uopen)
  1459. X
  1460. X`09fd.file_name='$Header'
  1461. X`09read(4,key=fd.file_name,err=100)fd
  1462. X`09istat = sys$asctim(,cdate,fd.upload_date,)
  1463. X
  1464. X`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  1465. X`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  1466. X`09write(6,1001)crlf(:cl)//'Last file added: '//cdate(:11)
  1467. X`09call ctrl_o_check(*10,*10)
  1468. X
  1469. X 0100`09fd.file_name=startoff
  1470. X`09read(4,keygt=fd.file_name,iostat=ios)fd
  1471. X`09do while (ios.eq.0)
  1472. X
  1473. X`09    call ctrl_o_check(*10,*10)
  1474. X
  1475. X`09    istat=str$upcase(lookup,fd.keywords)
  1476. X`09    if(index(fd.file_name//' '//lookup,keyword(1:kl)).eq.0) go to 110
  1477. X
  1478. X`09    if(fd.file_type.eq.'A') then
  1479. X`09`09filtyp='Ascii '
  1480. X`09    else if(fd.file_type.eq.'B') then
  1481. X`09`09filtyp='Binary'
  1482. X`09    else
  1483. X`09`09go to 110
  1484. X`09    end if
  1485. X`09    istat=compquad(fd.upload_date,long_ago)
  1486. X`09    if(istat.ne.-1 .and. (.not.short)) then
  1487. X`09`09write(6,1001)crlf(:cl)//
  1488. X`091`09    '************************************************'//
  1489. X`092`09    '***********************'//crlf(:cl)
  1490. X`09`09istat = sys$asctim(,cdate,fd.upload_date,)
  1491. X`09`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  1492. X`09`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  1493. X`09`09istat=str$trim(fd.keywords,fd.keywords,keyln)
  1494. X
  1495. X`09    `09write(6,1002)crlf(:cl),fd.file_name,cdate(:11),
  1496. X`091`09    (fd.file_size+1)/2,filtyp,fd.times_down,
  1497. X`092`09    crlf(:cl)//crlf(:cl),
  1498. X`093`09    fd.keywords(:keyln),fd.upload_name//crlf(:cl)
  1499. X
  1500. X`09`09istat=index(fd.upload_text,char(cr))
  1501. X`09`09do while(istat.ne.0)
  1502. X`09`09    write(6,1001)crlf(:cl)//fd.upload_text(:istat-1)
  1503. X`09`09    call ctrl_o_check(*10,*10)
  1504. X`09`09    fd.upload_text=fd.upload_text(istat+1:)
  1505. X`09`09    istat=index(fd.upload_text,char(cr))
  1506. X`09`09    end do
  1507. X`09        end if
  1508. X`09    if(istat.ne.-1 .and. short) then
  1509. X`09`09istat = sys$asctim(,cdate,fd.upload_date,)
  1510. X`09`09cdate(5:5)=char(ichar(cdate(5:5))+32)
  1511. X`09`09cdate(6:6)=char(ichar(cdate(6:6))+32)
  1512. X`09`09istat=str$trim(fd.keywords,fd.keywords,keyln)
  1513. X
  1514. X`09    `09write(6,1003)crlf(:cl),fd.file_name,cdate(:11),
  1515. X`091`09    (fd.file_size+1)/2,filtyp,fd.keywords(:keyln)
  1516. X
  1517. X`09        end if
  1518. X 0110`09    read(4,keygt=fd.file_name,iostat=ios)fd
  1519. X`09    end do
  1520. X 0010`09close(unit=4)
  1521. X`09return
  1522. X 1001`09format(a)
  1523. X 1002`09format(a,a18,5x,a11,1x,i5,'K bytes',2x,a6,4x,'Accesses:',i5,a,5x,
  1524. X`091   'Keywords: ',a,' By:',a)
  1525. X 1003`09format(a,a18,1x,a11,i4,'K ',a6,1x,a)
  1526. X`09end
  1527. X`0C
  1528. X`09subroutine send_code
  1529. X
  1530. Xc`09These routines are used to send a control character to the remote.
  1531. X
  1532. X`09implicit none
  1533. X`09include 'bbs_inc.for/nolist'
  1534. X`09logical*1 last_code(2)
  1535. X
  1536. Xc`09Entry to send line feed
  1537. X
  1538. X`09entry send_lf
  1539. X`09last_code(1) = lf
  1540. X`09go to 100
  1541. X
  1542. Xc`09Entry to send carriage return
  1543. X
  1544. X`09entry send_cr
  1545. X`09last_code(1) = cr
  1546. X`09go to 100
  1547. X
  1548. Xc`09Entry to send SOH (Start of Header).`09CTRL/A
  1549. X
  1550. X`09entry send_soh
  1551. X`09last_code(1) = soh
  1552. X`09go to 100
  1553. X
  1554. Xc`09Entry to send STX (Start of Text).`09CTRL/B
  1555. X
  1556. X`09entry send_stx
  1557. X`09last_code(1) = stx
  1558. X`09go to 100
  1559. X
  1560. Xc`09Entry to send ETX (End of Text).`09CTRL/C
  1561. X
  1562. X`09entry send_etx
  1563. X`09last_code(1) = etx
  1564. X`09go to 100
  1565. X
  1566. Xc`09Entry to send ACK (Acknowlegment).
  1567. X
  1568. X`09entry send_ack
  1569. X`09last_code(1) = ack
  1570. X`09go to 100
  1571. X
  1572. Xc`09Entry to send NAK (Negative Acknowlement).
  1573. X
  1574. X`09entry send_nak
  1575. X`09last_code(1) = nak
  1576. X`09go to 100
  1577. X
  1578. Xc`09Entry to send SYN (Synchronize).
  1579. X
  1580. X`09entry send_syn
  1581. X`09last_code(1) = syn
  1582. X`09go to 100
  1583. X
  1584. Xc`09Entry to send ENQ (Enquire).
  1585. X
  1586. X`09entry send_enq
  1587. X`09last_code(1) = enq
  1588. X`09go to 100
  1589. X
  1590. Xc`09Entry to send EOF (End of File).
  1591. X
  1592. X`09entry send_eof
  1593. X`09last_code(1) = sub
  1594. X`09go to 100
  1595. X
  1596. Xc`09Entry to send EOT (End of Transmission).
  1597. X
  1598. X`09entry send_eot
  1599. X`09last_code(1) = eot
  1600. X`09go to 100
  1601. X
  1602. Xc`09Entry to send CAN (Cancel).
  1603. X
  1604. X`09entry send_can
  1605. X`09last_code(1) = can
  1606. X`09go to 100
  1607. X
  1608. Xc`09Entry to send 'C' (CRC sync character).
  1609. X
  1610. X`09entry send_c
  1611. X`09last_code(1) = '43'X
  1612. X`09go to 100
  1613. XC
  1614. XC`09This entry is used to resend the last code in the event that
  1615. XC`09the previous transmission was lost or garbled and the remote
  1616. XC`09sent us an ENQ to find out what the last response was.
  1617. XC
  1618. X`09entry resend_code
  1619. X100`09call raw_write (last_code(1), 1)
  1620. X`09return
  1621. X`09end
  1622. X`0C
  1623. X`09logical function get_xmodem
  1624. Xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  1625. Vcccc
  1626. Xc
  1627. Xc`09UBBS subroutines - GET_XMODEM.FOR
  1628. Xc`09This routine is used transfer a file from the remote system to
  1629. Xc`09the VAX using the XMODEM protocol.
  1630. Xc`09Dale Miller - UALR
  1631. Xc
  1632. Xc`09Rev. 4.13 04-Jul-1987
  1633. Xc`09Rev. 5.6  03-Mar-1988
  1634. Xc`09Rev. 6.2  21-Jul-1988
  1635. +-+-+-+-+-+-+-+-  END  OF PART 6 +-+-+-+-+-+-+-+-
  1636.