home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1249 / xbbs.p01u < prev   
Encoding:
Text File  |  1990-12-28  |  17.2 KB  |  723 lines

  1. *** /u/news/xbbs/bbsc1.c    Wed Mar 21 23:28:02 1990
  2. --- bbsc1.c    Sun Apr 29 23:17:19 1990
  3. ***************
  4. *** 185,199 ****
  5.           error_config();
  6.       strip(buf128);
  7.       MAXKBYTE = atoi(buf128);
  8. !     if ((fgets(TAR, 49, inbuf) == NULL))
  9.           error_config();
  10. !     strip(TAR);
  11. !     if ((fgets(ZCAT, 49, inbuf) == NULL))
  12.           error_config();
  13. !     strip(ZCAT);
  14. !     if ((fgets(ARC, 49, inbuf) == NULL))
  15.           error_config();
  16. !     strip(ARC);
  17.       if ((fgets(ZIP, 49, inbuf) == NULL))
  18.           error_config();
  19.       strip(ZIP);
  20. --- 185,199 ----
  21.           error_config();
  22.       strip(buf128);
  23.       MAXKBYTE = atoi(buf128);
  24. !     if ((fgets(MAILER, 49, inbuf) == NULL))
  25.           error_config();
  26. !     strip(MAILER);
  27. !     if ((fgets(MAILADR, 49, inbuf) == NULL))
  28.           error_config();
  29. !     strip(MAILADR);
  30. !     if ((fgets(EXTENS, 49, inbuf) == NULL))
  31.           error_config();
  32. !     strip(EXTENS);
  33.       if ((fgets(ZIP, 49, inbuf) == NULL))
  34.           error_config();
  35.       strip(ZIP);
  36. ***************
  37. *** 544,560 ****
  38.       which_timer = 1;
  39.       alarm(sec);
  40.   
  41. !     if (signal(SIGALRM, timer) == (int (*) ()) -1)
  42.           exit(1);
  43. !     if (signal(SIGUSR1, mon_toggle) == (int (*) ()) -1)
  44.           exit(1);
  45. !     if (signal(SIGUSR2, sys_toggle) == (int (*) ()) -1)
  46. !         exit(1);
  47. !     if (signal(SIGPIPE, chat) == (int (*) ()) -1)
  48. !         exit(1);
  49. !     if (signal(SIGINT, STOP) == (int (*) ()) -1)
  50.           exit(1);
  51. !     if (signal(SIGHUP, hanged) == (int (*) ()) -1)
  52.           exit(1);
  53.   
  54.   
  55. --- 544,560 ----
  56.       which_timer = 1;
  57.       alarm(sec);
  58.   
  59. !     if ((int) signal(SIGALRM, timer) == (int (*) ()) -1)
  60.           exit(1);
  61. !     if ((int) signal(SIGUSR1, mon_toggle) == (int (*) ()) -1)
  62.           exit(1);
  63. !     if ((int) signal(SIGUSR2, sys_toggle) == (int (*) ()) -1)
  64. !         exit(1);
  65. !     if ((int) signal(SIGPIPE, chat) == (int (*) ()) -1)
  66. !         exit(1);
  67. !     if ((int) signal(SIGINT, STOP) == (int (*) ()) -1)
  68.           exit(1);
  69. !     if ((int) signal(SIGHUP, hanged) == (int (*) ()) -1)
  70.           exit(1);
  71.   
  72.   
  73. ***************
  74. *** 1565,1576 ****
  75.           goto ffile;
  76.       }
  77.   }
  78.   file_c()
  79.   {
  80. !     int             result, zcat;
  81. !     char           *ptr, temp[16];
  82. !     zcat = 0;
  83. !     portsout("\n\r\n\rArchive Contents Listing Option for .tar(.Z), .zip  or .arc files\n\r\n\r");
  84.       portsout("Input archive file name to list ====> ");
  85.       portsin(x_filename, 15);
  86.       portsout(CRLF);
  87. --- 1565,1578 ----
  88.           goto ffile;
  89.       }
  90.   }
  91.   file_c()
  92.   {
  93. !     FILE    *fpt;
  94. !     char    cmd_line[1024];
  95. !     int    ext_flag, result;
  96. !     portsout("\n\r\n\rList the Contents of an Archive\n\r\n\r");
  97.       portsout("Input archive file name to list ====> ");
  98.       portsin(x_filename, 15);
  99.       portsout(CRLF);
  100. ***************
  101. *** 1578,1668 ****
  102.           return;
  103.       strcpy(x_pathandfile, f_pathname);
  104.       strcat(x_pathandfile, x_filename);
  105. !     ptr = strrchr(x_pathandfile, '.');
  106. !     if (ptr == NULL) {
  107. !         portsout("\n\rImproper file extension\n\r");
  108.           return;
  109.       }
  110. !     *ptr++;
  111. !     strcpy(temp, ptr);
  112. !     if (strcmp(temp, "Z") == 0) {
  113. !         zcat = 1;
  114. !         strcpy(buf128, x_pathandfile);
  115. !         ptr = strrchr(buf128, '.');
  116. !         if (ptr == NULL) {
  117. !             portsout("\n\rImproper file extension\n\r");
  118. !             return;
  119. !         }
  120. !         *ptr = '\0';
  121. !         ptr = strrchr(buf128, '.');
  122. !         if (ptr == NULL) {
  123. !             portsout("\n\rImproper file extension\n\r");
  124. !             return;
  125. !         }
  126. !         *ptr++;
  127. !         strcpy(temp, ptr);
  128. !     }
  129. !     if ((strcmp(temp, "arc") == 0) || (strcmp(temp, "ARC") == 0) || (strcmp(temp, "tar") == 0) || (strcmp(temp,"zip") == 0) || (strcmp(temp,"ZIP") ==0)) {
  130. !         result = stat(x_pathandfile, &statbuf);
  131. !         if (result != 0) {
  132. !             portsout("\n\r\n\rThe requested file was not found!\n\r\n\r");
  133. !             return;
  134. !         }
  135. !         if ((strcmp(temp, "arc") == 0 || strcmp(temp, "ARC") == 0)) {
  136. !             strcpy(buf128, ARC);
  137. !             strcat(buf128, x_pathandfile);
  138. !             strcat(buf128, " > ");
  139. !             strcat(buf128, TMPFILE);
  140. !             strcat(buf128, port_id);
  141. !             (void) system(buf128);
  142. !             portsout("\n\r\n\r");
  143. !             strcpy(buf128, TMPFILE);
  144. !             strcat(buf128, port_id);
  145. !             cmd_p(buf128);
  146. !             portsout("\n\r\n\r");
  147. !             return;
  148. !         }
  149. !         if ((strcmp(temp, "zip") == 0 || strcmp(temp, "ZIP") == 0)) {
  150. !             strcpy(buf128, ZIP);
  151. !             strcat(buf128, x_pathandfile);
  152. !             strcat(buf128, " > ");
  153. !             strcat(buf128, TMPFILE);
  154. !             strcat(buf128, port_id);
  155. !             (void) system(buf128);
  156. !             portsout("\n\r\n\r");
  157. !             strcpy(buf128, TMPFILE);
  158. !             strcat(buf128, port_id);
  159. !             cmd_p(buf128);
  160. !             portsout("\n\r\n\r");
  161. !             return;
  162. !         }
  163. !         if (strcmp(temp, "tar") == 0) {
  164. !             if (!zcat) {
  165. !                 strcpy(buf128, TAR);
  166. !                 strcat(buf128, x_pathandfile);
  167. !             } else {
  168. !                 strcpy(buf128, ZCAT);
  169. !                 strcat(buf128, x_pathandfile);
  170. !                 strcat(buf128, " | ");
  171. !                 strcat(buf128, TAR);
  172. !                 strcat(buf128, "-");
  173.               }
  174.   
  175. !             strcat(buf128, " > ");
  176. !             strcat(buf128, TMPFILE);
  177. !             strcat(buf128, port_id);
  178. !             portsout("\n\rOne moment please ....");
  179. !             (void) system(buf128);
  180. !             portsout("\n\r\n\r");
  181. !             strcpy(buf128, TMPFILE);
  182. !             strcat(buf128, port_id);
  183. !             cmd_p(buf128);
  184. !             portsout("\n\r\n\r");
  185. !             return;
  186.           }
  187.       }
  188. !     portsout("\n\r\n\rIllegal file extension!\n\r\n\r");
  189.   }
  190.   file_r()
  191.   {
  192.       int             result;
  193. --- 1580,1687 ----
  194.           return;
  195.       strcpy(x_pathandfile, f_pathname);
  196.       strcat(x_pathandfile, x_filename);
  197. !     result=stat(x_pathandfile, &statbuf);
  198. !     if(result != 0) {
  199. !         portsout("\n\r\n\rThe requested file was not found!\n\r\n\r");
  200.           return;
  201.       }
  202. !     strcpy(buf128, EXTENS);
  203. !     if((fpt=fopen(buf128, "r")) == NULL) {
  204. !         portsout("\n\r\n\rDescription File for Extensions missing: Notify Sysop\n\r\n\r");
  205. !         return;
  206. !     }
  207. !     ext_flag=0;
  208. !     while(1) {
  209. !         if((fgets(buf128,80,fpt)==NULL)) {
  210. !            if(ext_flag==0) {
  211. !             portsout("\n\r\n\rNot an Archive or Extension currently not supported\n\r\n\r");
  212. !             portsout("If you have the C-Source of a Programm supporting this Archive\n\r");
  213. !             portsout("under Unix - please upload it\n\r\n\r");
  214. !             return;
  215. !            }
  216. !            else break;
  217. !         }
  218. !         if(buf128[0] == '#') /* Comment Line */
  219. !             continue;
  220. !         if(buf128[0] == '*') /* Continuation Line */
  221. !             if(!ext_flag)
  222. !                 continue;
  223. !             else {
  224. !                 strcat(cmd_line, " | ");
  225. !                 strcat(cmd_line, get_ext(&buf128[10],'\n'));
  226. !                 continue;
  227.               }
  228.   
  229. !         if(check_ext(buf128) == 0) { /* Line with Extension */
  230. !             strcpy(cmd_line, get_ext(&buf128[10],'\n'));
  231. !             strcat(cmd_line, " ");
  232. !             strcat(cmd_line, x_pathandfile);
  233. !             ext_flag=1;
  234. !         } else {
  235. !             if(ext_flag)
  236. !                 break;
  237. !             else
  238. !                 continue;
  239.           }
  240.       }
  241. !     fclose(fpt);
  242. !     strcat(cmd_line, " > ");
  243. !     strcat(cmd_line, TMPFILE);
  244. !     strcat(cmd_line, port_id);
  245. !     portsout("\n\rOne moment please ....");
  246. !     (void) system(cmd_line);
  247. !     portsout("\n\r\n\r");
  248. !     strcpy(buf128, TMPFILE);
  249. !     strcat(buf128, port_id);
  250. !     cmd_p(buf128);
  251. !     portsout("\n\r\n\r");
  252. !     return;
  253. ! }
  254. ! check_ext(str)
  255. ! char    *str;
  256. ! {
  257. !     int    i1, i2;
  258. !     char    s2[80];
  259. !     strcpy(s2,get_ext(str,' '));
  260. !     i1=strlen(x_pathandfile);
  261. !     i2=strlen(s2);
  262. !     if(i1<=i2)
  263. !         return (1);
  264. !     if(strcmp(&x_pathandfile[i1-i2], s2) == 0) {
  265. !         return(0);
  266. !     }
  267. !     return (1);
  268. ! }
  269. ! char *get_ext(str,delim)  /* Parameters: string and the ending delimiter */
  270. ! char    *str, delim;
  271. ! {
  272. !     char    s2[80];
  273. !     int    i;
  274. !     i=0;
  275. !     while(*str != '\0') {
  276. !         s2[i]=*str;
  277. !         if(*str == delim) {
  278. !             s2[i]='\0';
  279. !             return (s2);
  280. !         }
  281. !         str++;
  282. !         i++;
  283. !     }
  284. !     s2[i]='\0';
  285. !     return (s2);
  286.   }
  287.   file_r()
  288.   {
  289.       int             result;
  290. ***************
  291. *** 2504,2509 ****
  292. --- 2523,2529 ----
  293.           }
  294.           strcat(x_pathandfile, x_filename);
  295.           strcpy(buf128, ORGPATH);
  296. +         strcat(buf128, "temp/");
  297.           strcat(buf128, x_filename);
  298.           code = link(x_pathandfile, buf128);
  299.           if( code == -1) {
  300. ***************
  301. *** 3265,3274 ****
  302.   
  303.   savemsg()
  304.   {                /* save a message */
  305. !     int             fd;
  306.   
  307.       portsout("Saving...\r\n");
  308.       strcpy(msg_delete, pubpriv);    /* delete byte */
  309.       strcpy(msg_date, mm);
  310.       strcat(msg_date, "/");
  311. --- 3285,3295 ----
  312.   
  313.   savemsg()
  314.   {                /* save a message */
  315. !     FILE        *fdm;
  316. !     int             fd, no_uucp;
  317. !     char        mail_file[128], m_date[128];
  318.   
  319.       portsout("Saving...\r\n");
  320.       strcpy(msg_delete, pubpriv);    /* delete byte */
  321.       strcpy(msg_date, mm);
  322.       strcat(msg_date, "/");
  323. ***************
  324. *** 3306,3311 ****
  325. --- 3327,3357 ----
  326.   
  327.       strcpy(h_date, msg_date);
  328.       hdrwrt();        /* update the header file */
  329. +     /* Write msg to another system via uucp */
  330. +     strcpy(mail_file, "/tmp/mail_XXXXXX");
  331. +     mktemp(mail_file);
  332. +     if(!(fdm = fopen(mail_file, "w"))) {
  333. +         portsout(CRLF);
  334. +         portsout("Mail tempfile has problems writing");
  335. +         portsout(CRLF);
  336. +     }
  337. +     strcpy(m_date, msg_date);
  338. +     strcat(m_date, "  ");
  339. +     strcat(m_date, msg_time);
  340. +     fprintf(fdm, "XBBX_Date: %s\n", m_date);
  341. +     fprintf(fdm, "XBBS_From: %s\n", msg_from);
  342. +     fprintf(fdm, "XBBS_To: %s\n", msg_to);
  343. +     fprintf(fdm, "XBBS_Subject: %s\n\n", msg_subject);
  344. +     fprintf(fdm, "%s\n", msg_text);
  345. +     fclose(fdm);
  346. +     strcpy(m_date, MAILER);
  347. +     strcat(m_date, MAILADR);
  348. +     strcat(m_date, " <");
  349. +     strcat(m_date, mail_file);
  350. +     system(m_date);
  351. +     unlink(mail_file);
  352.   }
  353.   /* end of function               */
  354.   
  355. ***************
  356. *** 3397,3413 ****
  357.       char           *logname();
  358.   
  359.       static char     shell[] = "SHELL=/bin/sh";
  360. !     static char     home[150];
  361. !     static char     logn[50];
  362.       char            cmd[512];
  363.       char            news[520];
  364.       char            tmp[512];
  365.       FILE           *newsf;
  366. !     int             mask;
  367.       char            term;
  368.   
  369. -     strcpy(home, "HOME=");
  370. -     strcpy(logn,"LOGNAME=");
  371.       strcat(home, ORGPATH);
  372.       strcat(home, "usenet/");
  373.       strcat(home, u_fname);
  374. --- 3443,3457 ----
  375.       char           *logname();
  376.   
  377.       static char     shell[] = "SHELL=/bin/sh";
  378. !     static char     home[150] = "HOME=";
  379. !     static char     logn[50] = "LOGNAME=";
  380.       char            cmd[512];
  381.       char            news[520];
  382.       char            tmp[512];
  383.       FILE           *newsf;
  384. !     int             mask, mode_dumb;
  385.       char            term;
  386.   
  387.       strcat(home, ORGPATH);
  388.       strcat(home, "usenet/");
  389.       strcat(home, u_fname);
  390. ***************
  391. *** 3434,3452 ****
  392.           umask(mask);
  393.       }
  394.   menu:
  395.       portsout("\n\rWhich type of terminal do you have:\n\r");
  396.       portsout("1) Ansi Standard Monitor\n\r");
  397. !     portsout("2) ANSI.SYS for MS-DOS\n\r");
  398. !     portsout("3) VT100\n\r");
  399. !     portsout("4) Macintosh MacTerm in VT-100 mode\n\r");
  400. !     portsout("5) VT52 Terminal\n\r");
  401. !     portsout("6) Televideo 925\n\r");
  402. !     portsout("7) Televideo 910\n\r");
  403. !     portsout("8) Tandy DT-100\n\r");
  404. !     portsout("9) Dumb  - Use this when nothing else works correctly.\n\r");
  405. !     portsout("           Instead of the normal \"- MORE -\" inbetween pages\n\r");
  406. !     portsout("           You will see nothing, BUT you will hear a beep.\n\r");
  407. !     portsout("           This is the same thing. \"?\" is for help\n\r");
  408.       portsout("\n\rQ) Return to main menu\n\r");
  409.       portsout("===> ");
  410.       term = portin();
  411. --- 3478,3488 ----
  412.           umask(mask);
  413.       }
  414.   menu:
  415. +     mode_dumb=0;
  416.       portsout("\n\rWhich type of terminal do you have:\n\r");
  417.       portsout("1) Ansi Standard Monitor\n\r");
  418. !     portsout("2) VT100\n\r");
  419. !     portsout("3) Wyse 60\n\r");
  420.       portsout("\n\rQ) Return to main menu\n\r");
  421.       portsout("===> ");
  422.       term = portin();
  423. ***************
  424. *** 3456,3483 ****
  425.           putenv("TERM=ansi");
  426.           break;
  427.       case ('2'):
  428. -         putenv("TERM=dosansi");
  429. -         break;
  430. -     case ('3'):
  431.           putenv("TERM=vt100");
  432.           break;
  433. !     case ('4'):
  434. !         putenv("TERM=macterm");
  435. !         break;
  436. !     case ('5'):
  437. !         putenv("TERM=vt52so");
  438. !         break;
  439. !     case ('6'):
  440. !         putenv("TERM=tvi925co");
  441. !         break;
  442. !     case ('7'):
  443. !         putenv("TERM=tvi910");
  444. !         break;
  445. !     case ('8'):
  446. !         putenv("TERM=dt100");
  447. !         break;
  448. !     case ('9'):
  449. !         putenv("TERM=dumb");
  450.           break;
  451.       case ('Q'):
  452.       case ('q'):
  453. --- 3492,3501 ----
  454.           putenv("TERM=ansi");
  455.           break;
  456.       case ('2'):
  457.           putenv("TERM=vt100");
  458.           break;
  459. !     case ('3'):
  460. !         putenv("TERM=wyse60");
  461.           break;
  462.       case ('Q'):
  463.       case ('q'):
  464. ***************
  465. *** 3493,3537 ****
  466.       putenv(shell);
  467.       putenv(home);
  468.       putenv(logn);
  469. ! choose:
  470. !     portsout("\n\rDo you wish to:\n\r");
  471. !     portsout("1) Readnews\n\r");
  472. !     portsout("2) Postnews\n\r");
  473. !     portsout("\n\rQ) Return to main menu\n\r");
  474. !     portsout("===>");
  475. !     term = portin();
  476. !     portsout("\n\r");
  477. !     switch (term) {
  478. !     case ('1'):
  479. !         restoremodes();
  480. !         portrst();
  481. !         STDerr = freopen("/dev/tty", "w+", stderr);
  482. !         sprintf(cmd, "%s -n all",READN);
  483. !         system(cmd);
  484. !         break;
  485. !     case ('2'):
  486. !         restoremodes();
  487. !         portrst();
  488. !         STDerr = freopen("/dev/tty", "w+", stderr);
  489. !         sprintf(cmd, "%s",POSTN);
  490. !         system(cmd);
  491. !         break;
  492. !     case ('Q'):
  493. !     case ('q'):
  494. !         portsout("\n\r");
  495. !         strcpy(home, "HOME=");
  496. !         strcpy(logn, "LOGNAME=");
  497. !         cmd[0] = '\0';
  498. !         news[0] = '\0';
  499. !         tmp[0] = '\0';
  500. !         return (0);
  501. !         break;
  502. !     default:
  503. !         portsout("Please try again\n\r");
  504. !         goto choose;
  505. !         break;
  506. !     }
  507.       strcpy(home, "HOME=");
  508.       strcpy(logn, "LOGNAME=");
  509.       cmd[0] = '\0';
  510. --- 3511,3521 ----
  511.       putenv(shell);
  512.       putenv(home);
  513.       putenv(logn);
  514. !     restoremodes();
  515. !     portrst();
  516. !     STDerr = freopen("/dev/tty", "w+", stderr);
  517. !     sprintf(cmd, READN);
  518. !     system(cmd);
  519.       strcpy(home, "HOME=");
  520.       strcpy(logn, "LOGNAME=");
  521.       cmd[0] = '\0';
  522. ***************
  523. *** 3550,3555 ****
  524. --- 3534,3540 ----
  525.       signal(SIGPIPE, chat);
  526.   
  527.   }
  528.   restoresig()
  529.   {
  530.       signal(SIGALRM, timer);
  531. *** /u/news/xbbs/bbsc2.c    Mon Jul  3 14:28:08 1989
  532. --- bbsc2.c    Sun Apr 29 17:35:17 1990
  533. ***************
  534. *** 1248,1253 ****
  535. --- 1248,1254 ----
  536.       char            foo;
  537.       int             result;
  538.       strcpy(buf128, ORGPATH);
  539. +     strcat(buf128, "daylogs/");
  540.       strcat(buf128, mnd);
  541.       if ((inbuf = fopen(buf128, "r+")) == NULL) {
  542.           portsout(CRLF);
  543. ***************
  544. *** 1418,1423 ****
  545. --- 1419,1425 ----
  546.   {
  547.       char            firstz[20], lastz[20], dsize[20];
  548.       strcpy(buf128, ORGPATH);
  549. +     strcat(buf128, "daylogs/");
  550.       strcat(buf128, mnd);
  551.       if ((inbuf = fopen(buf128, "r")) == NULL) {
  552.           fclose(inbuf);
  553. *** /u/news/xbbs/bbscconf.c    Thu Mar 15 23:26:42 1990
  554. --- bbscconf.c    Sun Apr 29 17:32:52 1990
  555. ***************
  556. *** 19,43 ****
  557.   struct stat     thisstat;
  558.   char           *getlogin();
  559.   
  560. - #ifdef SYSV
  561. - #define    opendir(path) fopen (path, "r")
  562. - #define closedir(dirp) fclose (dirp)
  563. - struct dirent  *
  564. - readdir(dirp)
  565. -     DIR            *dirp;
  566. - {
  567. -     static struct dirent entry;
  568. -     if (dirp == NULL)
  569. -     return (NULL);
  570. -     for (;;) {
  571. -     if (fread(&entry, sizeof(struct dirent), 1, dirp) == 0)
  572. -         return (NULL);
  573. -     if (entry.d_ino)
  574. -         return (&entry);
  575. -     }
  576. - }
  577. - #endif
  578.   conf()
  579.   {
  580.       int             mypid, loginpid, uid;
  581. --- 19,24 ----
  582. ***************
  583. *** 233,240 ****
  584.           fclose(infile);
  585.           j = kill(i, 0);    /* see if it is a good pid */
  586.           if (!j) {
  587. !         strcpy(buf128, ORGPATH);
  588. !         strcat(buf128, "lastcall.bbs");
  589.           ptr1 = who_am_i + 3;
  590.           ptr2 = who_am_I;
  591.           for (i = 3; i < 5; i++)
  592. --- 214,220 ----
  593.           fclose(infile);
  594.           j = kill(i, 0);    /* see if it is a good pid */
  595.           if (!j) {
  596. !         strcpy(buf128, LASTCALL);
  597.           ptr1 = who_am_i + 3;
  598.           ptr2 = who_am_I;
  599.           for (i = 3; i < 5; i++)
  600. *** /u/news/xbbs/bbscport.c    Mon Jul  3 14:28:26 1989
  601. --- bbscport.c    Sun Apr 29 22:03:14 1990
  602. ***************
  603. *** 6,11 ****
  604. --- 6,12 ----
  605.   #include "bbscdef.h"
  606.   #include <string.h>
  607.   #include <ctype.h>
  608. + #include <termio.h>
  609.   #include <sys/types.h>
  610.   #include <sys/locking.h>
  611.   extern int no_cntrl_k;
  612. ***************
  613. *** 77,82 ****
  614. --- 78,84 ----
  615.       int cnt, byte ; char bytex ;
  616.       cnt = 0;
  617.       byte = FALSE;
  618. +     ioctl(0, TCFLSH, 0); /* Flush input */
  619.       while (++cnt <= max && byte != '\r')
  620.           {
  621.           while((byte = (int)portin()) < ' ' || byte > '}')
  622. ***************
  623. *** 106,111 ****
  624. --- 108,114 ----
  625.       int cnt, byte ; char bytex ;
  626.       cnt = 0;
  627.       byte = FALSE;
  628. +     ioctl(0, TCFLSH, 0); /* Flush input */
  629.       while (++cnt <= max && byte != '\r')
  630.           {
  631.           while((byte = (int)portin()) < ' ' || byte > '}')
  632. ***************
  633. *** 138,143 ****
  634. --- 141,147 ----
  635.       cnt = 0;
  636.       new_max = max;
  637.       byte = FALSE;
  638. +     ioctl(0, TCFLSH, 0); /* Flush input */
  639.       while (++cnt <= new_max && byte != '\r')
  640.           {
  641.           while((byte = (int)portin()) < ' ' || byte > '}')
  642. ***************
  643. *** 180,185 ****
  644. --- 184,190 ----
  645.       char *result;
  646.       cnt = 0;
  647.       byte = FALSE;
  648. +     ioctl(0, TCFLSH, 0); /* Flush input */
  649.       while (++cnt <= max && byte != '\r')
  650.           {
  651.           while((byte = (int)portin()) < ' ' || byte > '}')
  652. *** /u/news/xbbs/bbsc12.h    Wed Mar 21 23:28:10 1990
  653. --- bbsc12.h    Sun Apr 29 15:17:30 1990
  654. ***************
  655. *** 20,25 ****
  656. --- 20,26 ----
  657.   #define VERSION " 7.91 "
  658.   #define CONFIG ".config.bbs"
  659.   char           *ttyname();
  660. + char           *get_ext();
  661.   char           *tty;
  662.   char           *this_ttyname;
  663.   static unsigned Xsec, Sec;
  664. *** /u/news/xbbs/bbscdef.h    Wed Mar 21 23:27:54 1990
  665. --- bbscdef.h    Sun Apr 29 21:53:36 1990
  666. ***************
  667. *** 48,54 ****
  668. --- 48,60 ----
  669.   #define MESSAGES  "messages.bbs"        /* file name */
  670.   #define HEADER    "header.bbs"
  671.   #define MSGLOG    "messages.log"
  672. + #ifdef SYSV
  673. + #define BBSMAIL   "/usr/mail/bbsuser"
  674. + #else
  675.   #define BBSMAIL   "/usr/spool/mail/bbsuser"             /* group mail */
  676. + #endif
  677.   #define CROSSREF  "crossref.bbs"
  678.   #define FILES     "files.bbs"
  679.   #define TMPFILE   "/tmp/files"
  680. ***************
  681. *** 56,64 ****
  682.   #define STDERR    "/tmp/error_out"
  683.   #define SYSTTY    "/tmp/ttydev"
  684.   char FOO[10];
  685. ! char TAR[50];
  686. ! char ZCAT[50];
  687. ! char ARC[50];
  688.   char ZIP[50];
  689.   char MONITOR[30];               /* Monitor device */
  690.   char CONSOLE[30];               /* The main console */
  691. --- 62,70 ----
  692.   #define STDERR    "/tmp/error_out"
  693.   #define SYSTTY    "/tmp/ttydev"
  694.   char FOO[10];
  695. ! char MAILER[50];
  696. ! char MAILADR[50];
  697. ! char EXTENS[50];
  698.   char ZIP[50];
  699.   char MONITOR[30];               /* Monitor device */
  700.   char CONSOLE[30];               /* The main console */
  701.