home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume12 / ecu2.80 / part29 < prev    next >
Encoding:
Text File  |  1990-05-11  |  16.3 KB  |  625 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v12i082: ECU 2.80 part 29/29
  3. from: wht%n4hgf@gatech.edu (Warren Tucker)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 12, Issue 82
  7. Submitted-by: wht%n4hgf@gatech.edu (Warren Tucker)
  8. Archive-name: ecu2.80/part29
  9.  
  10. ---- Cut Here and unpack ----
  11. #!/bin/sh
  12. # This is part 29 of ecu280
  13. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  14.  then TOUCH=touch
  15.  else TOUCH=true
  16. fi
  17. # ============= models/sz_update.ep ==============
  18. echo "x - extracting models/sz_update.ep (Text)"
  19. sed 's/^X//' << 'SHAR_EOF' > models/sz_update.ep &&
  20. X#  CHK=0x4068
  21. X#--------------------------------------------------------------
  22. X# sz_update.ep - update local directory
  23. X#
  24. X# parameters:
  25. X# %argv(1) = remote directory to copy to
  26. X# %argv(2) = local directory to copy from
  27. X# %argv(3) = file list to send
  28. X# %argv(4) = remote username needed, if any, else null
  29. X#            if %argv(4) not null, 'su_'+%argv(4)+".ep" must
  30. X#            exist to su to remote
  31. X# %argv(5)   name of superior procedure
  32. X#
  33. X#--------------------------------------------------------------
  34. X#+:EDITS:*/
  35. X#:07-11-1989-16:55-wht-get cmd became lgets
  36. X#:06-28-1989-19:36-wht-use named variables
  37. X#:06-25-1989-13:56-wht-new do command syntax
  38. X#:06-25-1989-12:33-wht-new if/while syntax
  39. X#:06-22-1989-13:30-wht-creation
  40. X
  41. X# variable usage
  42. X    mkvar $i_csave            # color settings at entry to procedure
  43. X    mkvar $i_suflag            # true if su occurred
  44. X    mkvar $i_rtnflag        # return code
  45. X    mkvar $s_origdir(128)    # original working directory
  46. X    mkvar $s_ruser(16)        # remote username we started with before su
  47. X    mkvar $s_rdir(128)        # remote directory we started with
  48. X    mkvar $s_xtitle(64)        # title for xfer
  49. X
  50. X    $i_csave=%colors # get colors at entry
  51. X
  52. X    $s_xtitle = 'Connected to '+%rname
  53. X    ifs %argv(5) != ''
  54. X        $s_xtitle = $s_xtitle+' - procedure '+%argv(5)
  55. X
  56. X# check to make sure we are connected
  57. X    ifi %conn == 0
  58. X    {
  59. X        color red; echo 'not connected to anyone!'
  60. X        goto SORRY
  61. X    }
  62. X    color lt_blue;  echo 'Connected to '+%rname
  63. X
  64. X# save local current directory and change to target
  65. X    $s_origdir=%dir
  66. X    color brown
  67. X    ifs $s_origdir == %argv(2)
  68. X        echo -n 'local directory already '
  69. X    else 
  70. X    {
  71. X        cd %argv(2)
  72. X        echo -n 'local directory set to '
  73. X    }
  74. X    color yellow; echo %dir
  75. X
  76. X# make sure remote username ok
  77. X    ifs %argv(4) == '' goto REMOTE_CD # if any remote username
  78. X    do 'bsd_uname'            # get $s0=username
  79. X    ifi $i0 == 0 goto SORRY    # test failure
  80. X    $s_ruser = $s0            # save original remote username
  81. X    ifs $s0 != %argv(4)
  82. X    {                        # need to su
  83. X        color brown
  84. X        echo -n 'remote username '
  85. X        color yellow
  86. X        echo -n $s0
  87. X        color brown
  88. X        echo ' ... su to '+%argv(4)+' now'
  89. X        color gray
  90. X        do 'su_'+%argv(4)    # call proc, which calls su.ep
  91. X        lookfor '% ' 50        # su leaves prompt in buffer: swallow
  92. X        do 'bsd_uname'        # make sure we su'd
  93. X        ifi $i0 == 0 goto SORRY
  94. X        ifs $s0 != %argv(4)    # failed to su?
  95. X        {
  96. X            color red;echo 'su to '+%argv(4)+' failed'
  97. X            goto SORRY
  98. X        }
  99. X        $i_suflag = 1        #remember we su'd
  100. X    }    # now we are proper username on remote
  101. X
  102. X# establish proper remote working directory
  103. XREMOTE_CD
  104. X    color gray
  105. X    $s0 = 'pwd';do 'oneline'    # save old remote ...
  106. X    $s_rdir = $s0                # ... directory in $s_rdir
  107. X    ifs $s_rdir != %argv(1)        # if cd needed, do it
  108. X    {
  109. X        send 'cd '+%argv(1)        # remote cd
  110. X        lookfor -e '\n' 50        # echo command
  111. X        lookfor '% ' 50            # swallow prompt
  112. X        $s0 = 'pwd'
  113. X        do 'oneline'            # make sure we got there
  114. X        ifs $s0 != %argv(1)        # dir change failed
  115. X        {
  116. X            color red;echo 'remote cd failed'
  117. X            goto SORRY;
  118. X        }
  119. X    }
  120. X    color brown;  echo -n 'remote directory '
  121. X    color yellow; echo    %argv(1)
  122. X
  123. X# transfer files
  124. X    color lt_blue
  125. X    echo 'sz -n -f '+%argv(3)
  126. X    icolor $i_csave                # restore colors at entry
  127. X    sz -nfl $s_xtitle %argv(3)
  128. X    ifi $i0 != 0                # whoops
  129. X    {
  130. X        color red; echo -n '\nTRANSFER FAILED ... '
  131. X        ifi $i0 == 0x100 echo 'interrupt'
  132. X        ifi $i0 != 0x100 echo 'termination status '+%itos($i0,04d)
  133. X        goto SORRY
  134. X    }
  135. X    lookfor '% ' 50                # swallow prompt
  136. X    goto RETURN
  137. X
  138. XSORRY # whoops
  139. X    color red;echo 'sz_update failed ... sorry'
  140. X    $i_rtnflag = 1    # return error
  141. X
  142. XRETURN
  143. X    echo ''
  144. X    color brown;  echo -n 'remote user name '
  145. X    color yellow
  146. X    ifi $i_suflag != 0            # we su'd
  147. X    {
  148. X        send -n %chr(0x04)        # will force a new prompt from remote
  149. X        echo -n $s_ruser
  150. X        color brown;  echo ' restored (sent ^D to '+%argv(4)+' shell)'
  151. X        lookfor '% ' 50            # swallow prompt
  152. X    }
  153. X    else
  154. X        color brown;  echo 'unchanged'
  155. X
  156. X    ifs $s_rdir != %argv(1)        # if we did a remote cd
  157. X    {
  158. X        send 'cd '+$s_rdir        # restore original
  159. X        lookfor '\n'
  160. X        color brown;  echo -n 'remote working directory '
  161. X        color yellow; echo -n $s_rdir
  162. X        color brown;  echo    ' restored'
  163. X    }
  164. X    else
  165. X    {
  166. X        send ''    # spark a prompt
  167. X        color brown;  echo -n 'remote working directory '
  168. X        color yellow; echo -n $s_rdir
  169. X        color brown;  echo    ' unchanged'
  170. X    }
  171. X
  172. X    color brown;  echo -n 'local working directory '
  173. X    color yellow; echo -n $s_origdir
  174. X    color brown
  175. X    ifs $s_origdir != %dir    # restore original directory
  176. X    {
  177. X        cd $s_origdir
  178. X        echo    ' restored'
  179. X    }
  180. X    else
  181. X        echo ' unchanged'
  182. X
  183. X    icolor $i_csave        # restore colors at entry
  184. X    echo ''
  185. X    return $i_rtnflag    # return selected error code (bomb procedure if error)
  186. SHAR_EOF
  187. $TOUCH -am 0507232990 models/sz_update.ep &&
  188. chmod 0644 models/sz_update.ep ||
  189. echo "restore of models/sz_update.ep failed"
  190. set `wc -c models/sz_update.ep`;Wc_c=$1
  191. if test "$Wc_c" != "4479"; then
  192.     echo original size 4479, current size $Wc_c
  193. fi
  194. # ============= models/szall.ep ==============
  195. echo "x - extracting models/szall.ep (Text)"
  196. sed 's/^X//' << 'SHAR_EOF' > models/szall.ep &&
  197. X#  CHK=0xE67C
  198. X
  199. X    do 'put_mpad1'
  200. X    lookfor '% ' 40
  201. X    do 'put_kdir12'
  202. X    lookfor '% ' 40
  203. X    do 'put_sim'
  204. X    lookfor '% ' 40
  205. X    do 'put_ecu'
  206. SHAR_EOF
  207. $TOUCH -am 0507232990 models/szall.ep &&
  208. chmod 0644 models/szall.ep ||
  209. echo "restore of models/szall.ep failed"
  210. set `wc -c models/szall.ep`;Wc_c=$1
  211. if test "$Wc_c" != "127"; then
  212.     echo original size 127, current size $Wc_c
  213. fi
  214. # ============= models/tty1a.mi ==============
  215. echo "x - extracting models/tty1a.mi (Text)"
  216. sed 's/^X//' << 'SHAR_EOF' > models/tty1a.mi &&
  217. X#  CHK=0x10FF
  218. X#+-----------------------------------------------------------------
  219. X#  tty1a.mi - Microcom AX/9624c
  220. X#  Copyright 1989 Warren H. Tucker, III. All Rights Reserved
  221. X#------------------------------------------------------------------
  222. X#+:EDITS:*/
  223. X#:11-03-1989-16:21-wht------ unet2 -----
  224. X#:07-02-1989-20:51-wht-beef up init
  225. X#:06-17-1989-22:02-wht-creation
  226. X
  227. Xinit_>2400:atq0e1v1x4s0=0s2=43s7=30\q1\x1\n3
  228. Xinit_default:atq0e1v1x4s0=0s2=43s7=30\q0\x0\n0
  229. Xdial_default:atdt
  230. Xautoanswer:atq1s0=1
  231. SHAR_EOF
  232. $TOUCH -am 1103162189 models/tty1a.mi &&
  233. chmod 0644 models/tty1a.mi ||
  234. echo "restore of models/tty1a.mi failed"
  235. set `wc -c models/tty1a.mi`;Wc_c=$1
  236. if test "$Wc_c" != "495"; then
  237.     echo original size 495, current size $Wc_c
  238. fi
  239. # ============= models/tty2d.mi ==============
  240. echo "x - extracting models/tty2d.mi (Text)"
  241. sed 's/^X//' << 'SHAR_EOF' > models/tty2d.mi &&
  242. X#  CHK=0xFA63
  243. X#+-----------------------------------------------------------------
  244. X#  tty2d.mi - USR Courier 2400
  245. X#  Copyright 1989 Warren H. Tucker, III. All Rights Reserved
  246. X#------------------------------------------------------------------
  247. X#+:EDITS:*/
  248. X#:11-03-1989-16:21-wht------ unet2 -----
  249. X#:07-02-1989-20:51-wht-beef up init
  250. X#:06-17-1989-22:02-wht-creation
  251. X
  252. Xinit_default:atq0e1v1x4s0=0s2=43s7=30s11=47
  253. Xdial_default:atdt
  254. Xautoanswer:atq1s0=1
  255. SHAR_EOF
  256. $TOUCH -am 1103162189 models/tty2d.mi &&
  257. chmod 0644 models/tty2d.mi ||
  258. echo "restore of models/tty2d.mi failed"
  259. set `wc -c models/tty2d.mi`;Wc_c=$1
  260. if test "$Wc_c" != "446"; then
  261.     echo original size 446, current size $Wc_c
  262. fi
  263. # ============= models/unixlogin.ep ==============
  264. echo "x - extracting models/unixlogin.ep (Text)"
  265. sed 's/^X//' << 'SHAR_EOF' > models/unixlogin.ep &&
  266. X#  CHK=0x5E90
  267. X#+-----------------------------------------------------------------
  268. X#  unixlogin.ep - ecu UNIX login procedure
  269. X#  wht%n4hgf@gatech.edu
  270. X#
  271. X# %argv(1) = remote name
  272. X# %argv(2) = user name
  273. X# %argv(3) = password
  274. X# %argv(4) = term type
  275. X# %argv(5) = optional number of breaks needed
  276. X#+-----------------------------------------------------------------
  277. X#+:EDITS:*/
  278. X#:07-11-1989-16:55-wht-get cmd became lgets
  279. X#:07-09-1989-23:50-wht-add breaks
  280. X#:06-28-1989-19:36-wht-use named variables
  281. X#:06-25-1989-13:56-wht-new do command syntax
  282. X#:06-25-1989-12:33-wht-new if/while syntax
  283. X#:06-23-1989-19:46-wht-improved hayes dialer reduces need to report dial fail
  284. X#:06-19-1989-22:50-wht-use while and if statements
  285. X#:06-14-1989-15:58-wht-add login capability when already connected
  286. X#:06-11-1989-23:37-wht-creation
  287. X
  288. X    mkvar $i_csave,$i_ltimeout,$i_retries
  289. X
  290. X    $i_csave = %colors
  291. X    $i_ltimeout = 30 # 3 seconds wait for first login prompt
  292. X    $i_retries=3
  293. X
  294. X    color red;    echo -n '\nauto-logon to '
  295. X    color yellow; echo -n %argv(1)
  296. X    color red;    echo    ' on '+%date+' at '+%time+'\n'
  297. X
  298. X    ifi %argc < 5    # not enough args
  299. X    {
  300. X        color red
  301. X        echo %argv(0)+' needs 5 arguments (got '+%itos(%argc)+')'
  302. X        goto SORRY
  303. X    }
  304. X    mkvar $i_breaks
  305. X    ifi %argc > 5 $i_breaks = %stoi(%argv(5))
  306. X
  307. X    ifi %conn == 0 goto DIAL
  308. X
  309. X    ifs %rname == %argv(1)
  310. X    {
  311. X        color brown;  echo -n 'already connected to '
  312. X        color yellow; echo    %rname
  313. X        send ''
  314. X        goto SEND_BREAKS
  315. X    }
  316. X
  317. XHANGUP
  318. X    ifi %conn <> 0 echo 'hanging up on '+%rname; hangup
  319. X
  320. XDIAL
  321. X    color green
  322. X    dial %argv(1); set $i1=$i0 #save dial result in $i1
  323. X    ifi $i1 == 2 color red; echo 'interrupted'; goto SORRY
  324. X    ifi $i1 != 0 goto SORRY
  325. X
  326. X# send breaks?
  327. XSEND_BREAKS
  328. X    ifi $i_breaks > 0
  329. X    {
  330. X        whilei $i_breaks > 0
  331. X        {
  332. X            color blue; echo 'sending break to remote'
  333. X            nap 20
  334. X            lbreak
  335. X            $i_breaks = $i_breaks - 1
  336. X        }
  337. X        flush
  338. X        lookfor '\n' 50
  339. X    }
  340. X
  341. X# get login prompt from remote UNIX system: "login: "
  342. XGET_LOGIN_PROMPT
  343. X    set $i_retries = 6        # retry count
  344. X
  345. XGET_LOGIN_PROMPT_RETRY        # retry get login prompt
  346. X    whilei $i_retries > 0
  347. X    {
  348. X        color cyan
  349. X        lookfor -e 'login: ' $i_ltimeout
  350. X        ifi $i0 == 1 break            # go send username
  351. X        $i_ltimeout = 50            # later login waits 5 secs
  352. X        set $i_retries = $i_retries - 1            # read and decrement retry
  353. X        ifi $i_retries == 0 goto SORRY    # but not if retry exhausted
  354. X        color yellow
  355. X        echo 'sending prompt stimulus'
  356. X        color green
  357. X        send '' # kick off another login prompt
  358. X    }
  359. X
  360. X# give username to remote
  361. XSEND_USERNAME
  362. X    nap 3 # system not always ready when it says
  363. X    send %argv(2)
  364. X
  365. X# get password prompt: "Password:" 
  366. XGET_PASSWORD_PROMPT
  367. X    lookfor -e 'Password:' 50
  368. X    ifi $i0 != 1        # did not find 'Password: '
  369. X    {
  370. X        send ''
  371. X        gotob GET_LOGIN_PROMPT_RETRY
  372. X    }
  373. X
  374. X# send the password
  375. X    nap 3 # system not always ready when it says
  376. X    send %argv(3)
  377. X
  378. X# get term type prompt "TERM = (ansi) "
  379. X# also handle incorect login retry and 'Sorry' hangup indication
  380. XGET_TERMTYPE_PROMPT
  381. X    ifs %argv(4) == ''    # if no term type, don't wait for prompt
  382. X    {
  383. X        $i0 = 0            # return good status
  384. X        goto SETCOLOR_AND_RETURN_STATUS
  385. X    }
  386. X    lgets -re $s0 100 50 ') '
  387. X    ifi %instr($s0,'Sorry') > 0 hangup;goto SORRY
  388. X    ifi %instr($s0,'incorrect') > 0        # exhausted retry?
  389. X    {
  390. X        set $i_retries=$i_retries-1
  391. X        ifi $i_retries > 0 goto SEND_USERNAME
  392. X        goto SORRY
  393. X    }
  394. X# send terminal type
  395. X    ifi %instr($s0,'TERM') < 0
  396. X        lookfor -e ') ' 30
  397. X    send %argv(4)
  398. X    lookfor -e '\n' 50
  399. X    set $i0=0
  400. X    goto SETCOLOR_AND_RETURN_STATUS
  401. X
  402. X# procedure failed
  403. XSORRY
  404. X    set $i0=1
  405. X
  406. XSETCOLOR_AND_RETURN_STATUS
  407. X    icolor $i_csave
  408. X    ifi $i0 == 0 ifi %conn !=0 prompt %rname+' >'
  409. X    return $i0
  410. X
  411. X# vi:set tabstop=4 shiftwidth=4:
  412. SHAR_EOF
  413. $TOUCH -am 0507233390 models/unixlogin.ep &&
  414. chmod 0644 models/unixlogin.ep ||
  415. echo "restore of models/unixlogin.ep failed"
  416. set `wc -c models/unixlogin.ep`;Wc_c=$1
  417. if test "$Wc_c" != "3550"; then
  418.     echo original size 3550, current size $Wc_c
  419. fi
  420. # ============= zgcc ==============
  421. echo "x - extracting zgcc (Text)"
  422. sed 's/^X//' << 'SHAR_EOF' > zgcc &&
  423. X#!/bin/csh
  424. X#zgcc -- build prototyping "LINT_ARGS"
  425. Xecho C sources in $1';' result file $2
  426. Xunset noclobber
  427. Xrm -f zg.t
  428. Xif (-e /unix)
  429. X    echo 'building old-style prototypes for XENIX compiler compatibility'
  430. X    echo 'unnamed struct/union as parameter warning probably about FILE :-('
  431. Xendif
  432. Xforeach i(`cat $1`)
  433. Xif (-e /unix)
  434. X    cc -DBUILDING_LINT_ARGS -Zg $argv[3-] $i | mkoldproto > zg1.t
  435. Xelse
  436. X    cc -DBUILDING_LINT_ARGS -Zg $argv[3-] $i > zg1.t
  437. Xendif
  438. Xsort zg1.t > zg2.t
  439. Xecho '/*' $i '*/' >> zg.t
  440. Xcat zg2.t >> zg.t
  441. Xend
  442. Xafterlint zg.t $2
  443. Xrm -f zg.t zg?.t
  444. Xfcrc -u $2
  445. Xecho Output in $2
  446. SHAR_EOF
  447. $TOUCH -am 0402132790 zgcc &&
  448. chmod 0755 zgcc ||
  449. echo "restore of zgcc failed"
  450. set `wc -c zgcc`;Wc_c=$1
  451. if test "$Wc_c" != "570"; then
  452.     echo original size 570, current size $Wc_c
  453. fi
  454. # ============= mkoldproto.l ==============
  455. echo "x - extracting mkoldproto.l (Text)"
  456. sed 's/^X//' << 'SHAR_EOF' > mkoldproto.l &&
  457. X/* CHK=0x5793 */
  458. X%{
  459. Xchar *rev = "1.00";
  460. X/*+-------------------------------------------------------------------------
  461. X    mkoldproto.c.{l,c} - make "old" style prototypes from "new" kind
  462. X
  463. Xcc -Zg source.c | mkproto > lint_args.h
  464. X
  465. Xtakes prototypes of the style
  466. Xvoid change_report(char *original);
  467. Xand emits
  468. Xvoid change_report(char *);
  469. XThe UNIX V compiler makes the new kind, accepts the old and new kind,
  470. Xbut there are a lot of compilers which don't like the new kind.
  471. X
  472. XWarning, this program will make mush out of "old" style prototypes
  473. Xfed to it.
  474. X--------------------------------------------------------------------------*/
  475. X/*+:EDITS:*/
  476. X/*:11-27-1989-18:31-wht-creation */
  477. X
  478. Xint verbose = 0;
  479. X
  480. X/*+-------------------------------------------------------------------------
  481. X    change_report(original)
  482. X--------------------------------------------------------------------------*/
  483. Xvoid
  484. Xchange_report(original)
  485. Xchar *original;
  486. X{
  487. X    fputs("fixing: ",stderr);
  488. X    while(*original)
  489. X    {
  490. X        if((*original >= ' ') && (*original <= '~'))
  491. X            fputc(*original,stderr);
  492. X        else
  493. X            fprintf(stderr,"<%02x>",*original);
  494. X        original++;
  495. X    }
  496. X    fputs("\n",stderr);
  497. X}    /* end of change_report */
  498. X
  499. X
  500. X/*+-------------------------------------------------------------------------
  501. X    main(argc,argv,envp)
  502. X--------------------------------------------------------------------------*/
  503. Xmain(argc,argv,envp)
  504. Xint argc;
  505. Xchar **argv;
  506. Xchar **envp;
  507. X{
  508. Xregister int itmp;
  509. Xregister int iargv;
  510. Xint fileiargv = 0;
  511. X
  512. X    if(argc > 1)
  513. X    {
  514. X        for(iargv = 1; iargv < argc; iargv++)
  515. X        {
  516. X            if(argv[iargv][0] == '-')
  517. X            {
  518. X                switch(itmp = (argv[iargv][1]))
  519. X                {
  520. X                    case 'v':
  521. X                        verbose = 1;
  522. X                        break;
  523. X                    default:
  524. X                        break;
  525. X                }
  526. X            }
  527. X            else
  528. X            {
  529. X                if(yyin != stdin)
  530. X                {
  531. X                    fprintf(stderr,"only 1 filename, please\n");
  532. X                    exit(1);
  533. X                }
  534. X                if( (yyin = fopen(argv[iargv],"r")) == NULL)
  535. X                {
  536. X                    perror(argv[iargv]);
  537. X                    exit(1);
  538. X                }
  539. X                fileiargv = iargv;
  540. X            }
  541. X        }
  542. X    }
  543. X
  544. X    if(verbose && fileiargv)
  545. X        fprintf(stderr,"%s:\n",argv[fileiargv]);
  546. X
  547. X    yylex();
  548. X
  549. X    exit(0);
  550. X}    /* end of main */
  551. X
  552. X/* vi: set tabstop=4 shiftwidth=4: */
  553. X%}
  554. XW            [ \t]
  555. XSTRING        \"([^"\n]|\\\")*\"
  556. XOPCHARS        ["'+-*/=|!&%^?><:\]]
  557. XIDENT        [a-zA-Z0-9_]+
  558. XU            "unsigned"
  559. XI            "int"
  560. XL            "long"
  561. XS            "short"
  562. XC            "char"
  563. XR            "register"
  564. XST            "static"
  565. XI8            "INT8"
  566. XI16            "INT16"
  567. XI32            "INT32"
  568. XUN_ST        ("union "|"struct "){IDENT}
  569. XDECLTAB1    ({I}|{C}|{S}|{L}|{U}|{R}|{ST}|{I8}|{I16}|{I32}|{UN_ST})[\t]{IDENT}
  570. XDECLTAB2    ({I}|{C}|{S}|{L}|{U}|{R}|{ST}|{I8}|{I16}|{I32}|{UN_ST})[\t ][\t ]+{IDENT}
  571. X%START    COMMENT PREPROC
  572. X%%
  573. X<PREPROC>.*\n                            {ECHO;
  574. X                                         BEGIN 0;
  575. X                                        }
  576. X^"#"                                    {
  577. X                                        ECHO;
  578. X                                        BEGIN PREPROC;
  579. X                                        }
  580. X<COMMENT>([^*\n]|"*"+[^*/\n])*            ECHO;
  581. X<COMMENT>([^*\n]|"*"+[^*/\n])*"*"*"*/"    {ECHO;
  582. X                                         BEGIN 0;
  583. X                                        }
  584. X<COMMENT>.|\n                            ECHO;
  585. X"/*"                {
  586. X                        ECHO;
  587. X                        BEGIN COMMENT;
  588. X                    }
  589. X"extern  "            {
  590. X                        ;
  591. X                    }
  592. X"* "                {
  593. X                        fprintf(yyout,"*");
  594. X                    }
  595. X{IDENT}","            {
  596. X                    register char *cptr = yytext + yyleng - 1;
  597. X                        if(verbose)
  598. X                            change_report(yytext);
  599. X                        while((*cptr != '\t') && (*cptr != ' ') && (*cptr != '*'))
  600. X                            *cptr-- = 0;
  601. X                        fprintf(yyout,",",yytext);
  602. X                    }
  603. X{IDENT}")"            {
  604. X                    register char *cptr = yytext + yyleng - 1;
  605. X                        if(verbose)
  606. X                            change_report(yytext);
  607. X                        while((*cptr != '\t') && (*cptr != ' ') && (*cptr != '*'))
  608. X                            *cptr-- = 0;
  609. X                        fprintf(yyout,")",yytext);
  610. X                    }
  611. X{STRING}            ECHO;
  612. X"'"."'"                ECHO;
  613. X.|\n                ECHO;
  614. X
  615. SHAR_EOF
  616. $TOUCH -am 1127134189 mkoldproto.l &&
  617. chmod 0644 mkoldproto.l ||
  618. echo "restore of mkoldproto.l failed"
  619. set `wc -c mkoldproto.l`;Wc_c=$1
  620. if test "$Wc_c" != "3418"; then
  621.     echo original size 3418, current size $Wc_c
  622. fi
  623. exit 0
  624.  
  625.