home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / 421-421A.ZIP / 421-421A.MOD next >
Text File  |  1992-07-21  |  196KB  |  8,219 lines

  1. /*****************************************************************************
  2.  
  3.                 WWIV Version 4
  4.                     Copyright (C) 1988-1991 by Wayne Bell
  5.  
  6. Distribution of the source code for WWIV, in any form, modified or unmodified,
  7. without PRIOR, WRITTEN APPROVAL by the author, is expressly prohibited.
  8. Distribution of compiled versions of WWIV is limited to copies compiled BY
  9. THE AUTHOR.  Distribution of any copies of WWIV not compiled by the author
  10. is expressly prohibited.
  11.  
  12.  
  13. *****************************************************************************/
  14.  
  15.  
  16.  
  17. /****************************************************************************/
  18. /****************************************************************************/
  19.  
  20. NOTE: THIS FILE (AND THE ACCOMPANYING SOURCE FILES) MAY >NOT< BE
  21. DISTRIBUTED AT ALL, EXCEPT ON AUTHORIZED WWIV SOURCE DISTRIBUTION SITES.
  22.  
  23. /****************************************************************************/
  24. /****************************************************************************/
  25.  
  26.  
  27. This file lists the mods required to upgrade WWIV v4.21 to WWIV v4.21a.
  28. In addition to these, you'll have to replace the following files
  29. (included in this archive):
  30.  
  31. fcns.h
  32. vars.h
  33. connect1.c
  34. netsup.c
  35. skeleton.c
  36.  
  37. (These files do not have 'mods' listed, as it was shorter to include the
  38. entire file, than to list the changes.)
  39.  
  40.  
  41. /****************************************************************************/
  42.  
  43. First off, you'll find a lot of changes for function definitions, where
  44. a simple () has been replaced with (void).  If you're upgrading, you
  45. don't really need to do this.  Only BC++3.1 (or later, I guess) cares at
  46. all, and that will shut up its warnings if you just make sure the fcns.h
  47. file has the () changed to (void).  The fcns.h file included here does
  48. that, but if you do a 'make fcns' yourself, just do a search-replace of
  49. () with (void), and it'll all by happy.
  50.  
  51. You'll also find a lot (but not all) of MAX_SUBS changed to max_subs,
  52. syscfg.datadir to net_data, and syscfg.systemnumber changed to
  53. net_sysnum.
  54.  
  55.  
  56. /*****************************************************************************/
  57. batch.c:
  58.  
  59.  
  60. Starting at line #28, delete this one line:
  61. # #define SETREC(i)  lseek(dlf,((long) (i))*((long)sizeof(uploadsrec)),SEEK_SET);
  62. - void listbatch()
  63. # {
  64. #   char s[81];
  65. #   int abort,i;
  66. And insert this one line:
  67. # #define SETREC(i)  lseek(dlf,((long) (i))*((long)sizeof(uploadsrec)),SEEK_SET);
  68. + void listbatch(void)
  69. # {
  70. #   char s[81];
  71. #   int abort,i;
  72.  
  73. Starting at line #69, delete this one line:
  74. #   }
  75. # }
  76. - void downloaded(char *fn)
  77. # {
  78. #   int i,i1;
  79. #   uploadsrec u;
  80. And insert this one line:
  81. #   }
  82. # }
  83. + void downloaded(char *fn, long cps)
  84. # {
  85. #   int i,i1;
  86. #   uploadsrec u;
  87.  
  88. Starting at line #86, add these 3 lines:
  89. #         ++u.numdloads;
  90. #         SETREC(i);
  91. #         write(dlf,(void *)&u,sizeof(uploadsrec));
  92. +         if (cps)
  93. +           sprintf(s,"Downloaded '%s' (%ld cps)",u.filename, cps);
  94. +         else
  95. #           sprintf(s,"Downloaded '%s'",u.filename);
  96. #         sysoplog(s);
  97. #         if (syscfg.sysconfig & sysconfig_log_dl) {
  98.  
  99. Starting at line #164, delete this one line:
  100. # }
  101. - void uploaded(char *fn)
  102. # {
  103. #   int i,i1, d1, d2, rn;
  104. #   uploadsrec u;
  105. And insert this one line:
  106. # }
  107. + void uploaded(char *fn, long cps)
  108. # {
  109. #   int i,i1, d1, d2, rn;
  110. #   uploadsrec u;
  111.  
  112. Starting at line #237, delete this one line:
  113. #               save_status();
  114. #               SETREC(rn);
  115. #               write(dlf,(void *)&u,sizeof(uploadsrec));
  116. -               sprintf(s,"+%s uploaded on %s",
  117. #                 u.filename,
  118. #                 directories[batch[i1].dir].name);
  119. #               sysoplog(s);
  120. And insert this one line:
  121. #               save_status();
  122. #               SETREC(rn);
  123. #               write(dlf,(void *)&u,sizeof(uploadsrec));
  124. +               sprintf(s,"+%s uploaded on %s (%ld cps)",
  125. #                 u.filename,
  126. #                 directories[batch[i1].dir].name, cps);
  127. #               sysoplog(s);
  128.  
  129. Starting at line #239, delete this one line:
  130. #               write(dlf,(void *)&u,sizeof(uploadsrec));
  131. #               sprintf(s,"+%s uploaded on %s",
  132. #                 u.filename,
  133. -                 directories[batch[i1].dir].name);
  134. #               sysoplog(s);
  135. #               npr("Uploaded '%s' to %s\r\n",u.filename,
  136. #                 directories[batch[i1].dir].name);
  137. And insert this one line:
  138. #               write(dlf,(void *)&u,sizeof(uploadsrec));
  139. #               sprintf(s,"+%s uploaded on %s (%ld cps)",
  140. #                 u.filename,
  141. +                 directories[batch[i1].dir].name, cps);
  142. #               sysoplog(s);
  143. #               npr("Uploaded '%s' to %s\r\n",u.filename,
  144. #                 directories[batch[i1].dir].name);
  145.  
  146. Starting at line #313, delete this one line:
  147. #         sprintf(s,"%s%s",directories[batch[cur].dir].path,u.filename);
  148. #         xymodem_send(s,&ok,&percent,u.filetype,1,1,1);
  149. #         if (ok) {
  150. -           downloaded(u.filename);
  151. #         } else {
  152. #           closedl();
  153. #         }
  154. And insert this one line:
  155. #         sprintf(s,"%s%s",directories[batch[cur].dir].path,u.filename);
  156. #         xymodem_send(s,&ok,&percent,u.filetype,1,1,1);
  157. #         if (ok) {
  158. +           downloaded(u.filename, 0);
  159. #         } else {
  160. #           closedl();
  161. #         }
  162.  
  163. Starting at line #338, add this one line:
  164. # {
  165. #   char *ss;
  166. #   int i;
  167. +   long cps;
  168. #   char s[161];
  169. #   /* find the filename */
  170.  
  171. Starting at line #343, delete this one line:
  172. #   /* find the filename */
  173. #   ss=strtok(l," \t");
  174. -   for (i=0; (i<10) && (ss); i++)
  175. #     ss=strtok(NULL," \t");
  176. #   if (ss) {
  177. And insert these 4 lines:
  178. #   /* find the filename */
  179. #   ss=strtok(l," \t");
  180. +   for (i=0; (i<10) && (ss); i++) {
  181. +     switch(i) {
  182. +       case 4: cps=atol(ss); break;
  183. +     }
  184. #     ss=strtok(NULL," \t");
  185. #   }
  186.  
  187. Starting at line #344, add this one line:
  188. #       case 4: cps=atol(ss); break;
  189. #     }
  190. #     ss=strtok(NULL," \t");
  191. +   }
  192. #   if (ss) {
  193. #     strcpy(s,stripfn(ss));
  194.  
  195. Starting at line #357, delete this one line:
  196. #       case 'B':
  197. #       case 'H':
  198. #         /* received a file */
  199. -         uploaded(s);
  200. #         break;
  201. #       case 'z':
  202. And insert this one line:
  203. #       case 'B':
  204. #       case 'H':
  205. #         /* received a file */
  206. +         uploaded(s,cps);
  207. #         break;
  208. #       case 'z':
  209.  
  210. Starting at line #366, delete this one line:
  211. #       case 'b':
  212. #       case 'h':
  213. #         /* sent a file */
  214. -         downloaded(s);
  215. #         break;
  216. #       case 'E':
  217. And insert this one line:
  218. #       case 'b':
  219. #       case 'h':
  220. #         /* sent a file */
  221. +         downloaded(s,cps);
  222. #         break;
  223. #       case 'E':
  224.  
  225. Starting at line #485, add these 2 lines:
  226. #       _chmod(dszlog,1,0);
  227. #       unlink(dszlog);
  228. +       create_chain_file("CHAIN.TXT");
  229. #       if (uplist[0])
  230. #         cd_to(syscfg.batchdir);
  231.  
  232. Starting at line #528, delete this one line:
  233. # }
  234. - void process_dszlog()
  235. # {
  236. #   int f,i,i1;
  237. #   char *ss;
  238. And insert this one line:
  239. # }
  240. + void process_dszlog(void)
  241. # {
  242. #   int f,i,i1;
  243. #   char *ss;
  244.  
  245. Starting at line #613, delete this one line:
  246. #   double ti;
  247. #   sprintf(dl,"%s BATCH TRANSFER, %d send, %d recv",
  248. -     desc, numbatch-numbatchdl, numbatchdl);
  249. #   if (had)
  250. #     strcat(dl,", HAD");
  251. #   sysoplog(dl);
  252. And insert this one line:
  253. #   double ti;
  254. #   sprintf(dl,"%s BATCH TRANSFER, %d send, %d recv",
  255. +     desc, numbatchdl, numbatch-numbatchdl);
  256. #   if (had)
  257. #     strcat(dl,", HAD");
  258. #   sysoplog(dl);
  259.  
  260. Starting at line #637, delete this one line:
  261. # /****************************************************************************/
  262. - void batchdl()
  263. # {
  264. #   int i,abort,done,i1,i2,had,dsz;
  265. #   char s[81],s1[81],ch,ch1;
  266. And insert this one line:
  267. # /****************************************************************************/
  268. + void batchdl(void)
  269. # {
  270. #   int i,abort,done,i1,i2,had,dsz;
  271. #   char s[81],s1[81],ch,ch1;
  272.  
  273.  
  274. /*****************************************************************************/
  275. bbs.c:
  276.  
  277.  
  278. Starting at line #31, delete this one line:
  279. - int checkpw()
  280. # {
  281. #   char s[81];
  282. And insert this one line:
  283. + int checkpw(void)
  284. # {
  285. #   char s[81];
  286.  
  287. Starting at line #61, delete this one line:
  288. # }
  289. - void sublist()
  290. # {
  291. #   int i,abort;
  292. #   char s[80];
  293. And insert this one line:
  294. # }
  295. + void sublist(void)
  296. # {
  297. #   int i,abort;
  298. #   char s[80];
  299.  
  300. Starting at line #71, delete this one line:
  301. #   pla("Subs available: ",&abort);
  302. #   nl();
  303. #   i=0;
  304. -   while ((i<MAX_SUBS) && (usub[i].subnum!=-1)) {
  305. #     strcpy(s,usub[i].keys);
  306. #     s[2]=0;
  307. #     if (s[1]==0)
  308. And insert this one line:
  309. #   pla("Subs available: ",&abort);
  310. #   nl();
  311. #   i=0;
  312. +   while ((i<max_subs) && (usub[i].subnum!=-1)) {
  313. #     strcpy(s,usub[i].keys);
  314. #     s[2]=0;
  315. #     if (s[1]==0)
  316.  
  317. Starting at line #91, delete this one line:
  318. #       strcat(s,"   ");
  319. # #endif
  320. #     }
  321. -     if (syscfg.systemnumber) {
  322. #       if (subboards[usub[i].subnum].type) {
  323. #         if (subboards[usub[i].subnum].anony & anony_val_net)
  324. #           strcat(s,"[NET] ");
  325. And insert this one line:
  326. #       strcat(s,"   ");
  327. # #endif
  328. #     }
  329. +     if (net_sysnum) {
  330. #       if (subboards[usub[i].subnum].type) {
  331. #         if (subboards[usub[i].subnum].anony & anony_val_net)
  332. #           strcat(s,"[NET] ");
  333.  
  334. Starting at line #110, delete this one line:
  335. # }
  336. - void dirlist()
  337. # {
  338. #   int i,abort;
  339. #   char s[80];
  340. And insert this one line:
  341. # }
  342. + void dirlist(void)
  343. # {
  344. #   int i,abort;
  345. #   char s[80];
  346.  
  347. Starting at line #131, delete this one line:
  348. # }
  349. - void text_edit()
  350. # {
  351. #   char s[81],s1[81];
  352. And insert this one line:
  353. # }
  354. + void text_edit(void)
  355. # {
  356. #   char s[81],s1[81];
  357.  
  358. Starting at line #140, add these 2 lines:
  359. #   input(s,12);
  360. #   if (strstr(s,".LOG")!=NULL)
  361. #     s[0]=0;
  362. +   if (!okfn(s))
  363. +     s[0]=0;
  364. #   if (s[0]) {
  365. #     sprintf(s1,"@ Edited: %s",s);
  366. #     sysoplog(s1);
  367.  
  368. Starting at line #145, delete this one line:
  369. #     sprintf(s1,"@ Edited: %s",s);
  370. #     sysoplog(s1);
  371. #     if (okfsed())
  372. -       external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500);
  373. #     else
  374. #       tedit(s);
  375. #   }
  376. And insert this one line:
  377. #     sprintf(s1,"@ Edited: %s",s);
  378. #     sysoplog(s1);
  379. #     if (okfsed())
  380. +       external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500,syscfg.gfilesdir,s,1);
  381. #     else
  382. #       tedit(s);
  383. #   }
  384.  
  385. Starting at line #151, replace function parse_email_info() with the following:
  386.  
  387. void parse_email_info(char *s, unsigned short *un1, unsigned short *sy1)
  388. {
  389.   char *ss,s1[5],onx[20],ch,*mmk;
  390.   unsigned un, sy;
  391.   int i,nv,on,xx,onxi,odci;
  392.   net_system_list_rec *csne;
  393.  
  394.   *un1=0;
  395.   *sy1=0;
  396.   ss=strchr(s,'@');
  397.   if (ss==NULL) {
  398.     un=finduser1(s);
  399.     if (un>0)
  400.       *un1=un;
  401.     else
  402.       pl("Unknown user.");
  403.   } else {
  404.     ss[0]=0;
  405.     ss=&(ss[1]);
  406.     i=strlen(s);
  407.     while ((i>0) && (s[i-1]==' '))
  408.       --i;
  409.     s[i]=0;
  410.     un=atoi(s);
  411.     sy=atoi(ss);
  412.     if (sy==0) {
  413.       un=finduser1(s);
  414.       if (un>0)
  415.         *un1=un;
  416.       else
  417.         pl("Unknown user.");
  418.     } else {
  419.       if (un==0) {
  420.         strcpy(net_email_name,s);
  421.         i=strlen(net_email_name);
  422.         while ((i>0) && (net_email_name[i-1]==' '))
  423.           --i;
  424.         net_email_name[i]=0;
  425.         if (net_email_name[0])
  426.           *sy1=sy;
  427.         else
  428.           pl("Unknown user.");
  429.       } else {
  430.         *un1=un;
  431.         *sy1=sy;
  432.       }
  433.       if (*sy1 && (net_num_max>1)) {
  434.         odc[0]=0;
  435.         odci=0;
  436.         onx[0]='Q';
  437.         onx[1]=0;
  438.         onxi=1;
  439.         nv=0;
  440.         on=net_num;
  441.         ss=malloc(net_num_max);
  442.         xx=-1;
  443.         for (i=0; i<net_num_max; i++) {
  444.           set_net_num(i);
  445.           if (net_sysnum==*sy1)
  446.             xx=i;
  447.           else if (next_system(*sy1)) {
  448.             ss[nv++]=i;
  449.           }
  450.         }
  451.         set_net_num(on);
  452.         if (nv==0) {
  453.           if (xx!=-1) {
  454.             set_net_num(xx);
  455.             *sy1=0;
  456.             if (*un1==0) {
  457.               *un1=finduser(net_email_name);
  458.               if ((*un1==0) || (*un1>32767)) {
  459.                 *un1=0;
  460.                 pl("Unknown user.");
  461.               }
  462.             }
  463.           } else {
  464.             nl();
  465.             pl("Unknown system");
  466.             *sy1=*un1=0;
  467.           }
  468.         } else if (nv==1) {
  469.           set_net_num(ss[0]);
  470.         } else {
  471.           nl();
  472.           for (i=0; i<nv; i++) {
  473.             set_net_num(ss[i]);
  474.             csne=next_system(*sy1);
  475.             if (csne) {
  476.               if (i<9) {
  477.                 onx[onxi++]=i+'1';
  478.                 onx[onxi]=0;
  479.               } else {
  480.                 odci=(i+1)/10;
  481.                 odc[odci-1]=odci+'0';
  482.                 odc[odci]=0;
  483.               }
  484.               npr("%d. %s (%s)\r\n",i+1,net_name,csne->name);
  485.             }
  486.           }
  487.           pl("Q. Quit");
  488.           nl();
  489.           prt(2,"Which network (number)? ");
  490.           if (nv<9) {
  491.             ch=onek(onx);
  492.             if (ch=='Q')
  493.               i=-1;
  494.             else
  495.               i=ch-'1';
  496.           } else {
  497.             mmk=mmkey(2);
  498.             if (*mmk=='Q')
  499.               i=-1;
  500.             else
  501.               i=atoi(mmk)-1;
  502.           }
  503.           if ((i>=0) && (i<nv)) {
  504.             set_net_num(ss[i]);
  505.           } else {
  506.             nl();
  507.             pl("Aborted.");
  508.             nl();
  509.             *un1=*sy1=0;
  510.           }
  511.         }
  512.         farfree(ss);
  513.       } else {
  514.         if (*sy1==net_sysnum) {
  515.           *sy1=0;
  516.           if (*un1==0)
  517.             *un1=finduser(net_email_name);
  518.           if ((*un1==0) || (*un1>32767)) {
  519.             *un1=0;
  520.             pl("Unknown user.");
  521.           }
  522.         }
  523.       }
  524.     }
  525.   }
  526. }
  527.  
  528.  
  529.  
  530. Starting at line #201, delete this one line:
  531. # }
  532. - void send_email()
  533. # {
  534. #   char s1[81],*ss;
  535. #   int i;
  536. And insert this one line:
  537. # }
  538. + void send_email(void)
  539. # {
  540. #   char s1[81],*ss;
  541. #   int i;
  542.  
  543. Starting at line #216, add this one line:
  544. #   irt[0]=0;
  545. #   irt_name[0]=0;
  546. #   parse_email_info(s1,&un,&sy);
  547. +   grab_quotes(NULL, NULL);
  548. #   if (un || sy)
  549. #     email(un,sy,0,0);
  550. # }
  551.  
  552. Starting at line #221, delete this one line:
  553. #     email(un,sy,0,0);
  554. # }
  555. - void mainmenu()
  556. # {
  557. #   char *s, s1[81],s2[81],ch;
  558. #   int i;
  559. And insert this one line:
  560. #     email(un,sy,0,0);
  561. # }
  562. + void mainmenu(void)
  563. # {
  564. #   char *s, s1[81],s2[81],ch;
  565. #   int i;
  566.  
  567. Starting at line #250, delete this one line:
  568. #   s=mmkey(0);
  569. #   helpl=0;
  570. #   if (s[0])
  571. -     for (i=0; i<MAX_SUBS; i++)
  572. #       if (strcmp(usub[i].keys,s)==0)
  573. #         cursub=i;
  574. #   if (strlen(s)>2) {
  575. And insert this one line:
  576. #   s=mmkey(0);
  577. #   helpl=0;
  578. #   if (s[0])
  579. +     for (i=0; (i<max_subs) && (usub[i].subnum!=-1); i++)
  580. #       if (strcmp(usub[i].keys,s)==0)
  581. #         cursub=i;
  582. #   if (strlen(s)>2) {
  583.  
  584. Starting at line #305, delete this one line:
  585. #       input(s1,50);
  586. #       if (s1[0]) {
  587. #         if ((okansi()) && (thisuser.defed))
  588. -           external_edit(s1,"",thisuser.defed-1,500);
  589. #         else
  590. #           tedit(s1);
  591. #       }
  592. And insert this one line:
  593. #       input(s1,50);
  594. #       if (s1[0]) {
  595. #         if ((okansi()) && (thisuser.defed))
  596. +           external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
  597. #         else
  598. #           tedit(s1);
  599. #       }
  600.  
  601. Starting at line #386, delete this one line:
  602. #       sysoplog("@ Ran Tedit");
  603. #       text_edit();
  604. #     }
  605. -     if ((strcmp(s,",")==0) && (syscfg.systemnumber>0)) {
  606. #       nl();
  607. #       prt(2,"Which NETDAT log (0-2,Q)? ");
  608. #       ch=onek("Q012");
  609. And insert this one line:
  610. #       sysoplog("@ Ran Tedit");
  611. #       text_edit();
  612. #     }
  613. +     if ((strcmp(s,",")==0) && (net_sysnum>0)) {
  614. #       nl();
  615. #       prt(2,"Which NETDAT log (0-2,Q)? ");
  616. #       ch=onek("Q012");
  617.  
  618. Starting at line #410, delete this one line:
  619. #       for (i=0; i<33; i++)
  620. #         thisuser.qscnptr[i]=status.qscanptr-1L;
  621. # #if MAX_SUBS>32
  622. -       for (i=0; i<MAX_SUBS-32; i++)
  623. #         thisuser.qscnptr2[i]=status.qscanptr-1L;
  624. # #endif
  625. #       nl();
  626. And insert this one line:
  627. #       for (i=0; i<33; i++)
  628. #         thisuser.qscnptr[i]=status.qscanptr-1L;
  629. # #if MAX_SUBS>32
  630. +       for (i=0; i<max_subs-32; i++)
  631. #         thisuser.qscnptr2[i]=status.qscanptr-1L;
  632. # #endif
  633. #       nl();
  634.  
  635. Starting at line #440, delete this one line:
  636. #     print_net_listing(atoi(s+4));
  637. #   }
  638. #   if (strcmp(s,"RSET")==0) {
  639. -     for (i=0; i<MAX_SUBS; i++)
  640. #       sub_dates[i]=0L;
  641. #   }
  642. #   if (strcmp(s,"VER")==0) {
  643. And insert this one line:
  644. #     print_net_listing(atoi(s+4));
  645. #   }
  646. #   if (strcmp(s,"RSET")==0) {
  647. +     for (i=0; i<max_subs; i++)
  648. #       sub_dates[i]=0L;
  649. #   }
  650. #   if (strcmp(s,"VER")==0) {
  651.  
  652. Starting at line #450, delete these 2 lines:
  653. #     pl("The author may be contacted at:");
  654. #     nl();
  655. #     pl("   Wayne Bell");
  656. -     pl("   904 Silver Spur Road #636");
  657. -     pl("   Rolling Hills Estates, CA  90274");
  658. #     nl();
  659. #   }
  660. #   if ((s[1]==0) && (s[0]!=0)) {
  661. And insert these 3 lines:
  662. #     pl("The author may be contacted at:");
  663. #     nl();
  664. #     pl("   Wayne Bell");
  665. +     pl("   WWIV Software Services");
  666. +     pl("   PO Box 720455");
  667. +     pl("   McAllen, TX  78504-0455");
  668. #     nl();
  669. #   }
  670. #   if ((s[1]==0) && (s[0]!=0)) {
  671.  
  672. Starting at line #458, delete this one line:
  673. #     switch(s[0]) {
  674. #       case '>':
  675. #       case '+':
  676. -         if ((cursub<MAX_SUBS-1) && (usub[cursub+1].subnum>=0))
  677. #           ++cursub;
  678. #         else
  679. #           cursub=0;
  680. And insert this one line:
  681. #     switch(s[0]) {
  682. #       case '>':
  683. #       case '+':
  684. +         if ((cursub<max_subs-1) && (usub[cursub+1].subnum>=0))
  685. #           ++cursub;
  686. #         else
  687. #           cursub=0;
  688.  
  689. Starting at line #468, delete this one line:
  690. #         if (cursub>0)
  691. #           --cursub;
  692. #         else {
  693. -           while ((usub[cursub+1].subnum>=0) && (cursub<MAX_SUBS-1))
  694. #             ++cursub;
  695. #         }
  696. #         break;
  697. And insert this one line:
  698. #         if (cursub>0)
  699. #           --cursub;
  700. #         else {
  701. +           while ((usub[cursub+1].subnum>=0) && (cursub<max_subs-1))
  702. #             ++cursub;
  703. #         }
  704. #         break;
  705.  
  706. Starting at line #513, add this one line:
  707. #       case 'F':
  708. #         strcpy(irt,"Feedback.");
  709. #         irt_name[0]=0;
  710. +         grab_quotes(NULL, NULL);
  711. #         email(1,0,0,0);
  712. #         break;
  713. #       case 'G':
  714.  
  715. Starting at line #562, add this one line:
  716. #       case 'P':
  717. #         irt[0]=0;
  718. #         irt_name[0]=0;
  719. +         grab_quotes(NULL, NULL);
  720. #         if (usub[0].subnum!=-1)
  721. #           post();
  722. #         break;
  723.  
  724. Starting at line #631, delete this one line:
  725. # }
  726. - void dlmainmenu()
  727. # {
  728. #   char *s, s1[81],s2[81],ch;
  729. #   int i,i1,i2,abort,next;
  730. And insert this one line:
  731. # }
  732. + void dlmainmenu(void)
  733. # {
  734. #   char *s, s1[81],s2[81],ch;
  735. #   int i,i1,i2,abort,next;
  736.  
  737. Starting at line #896, delete this one line:
  738. # }
  739. - int date_changed()
  740. # {
  741. #   struct date today,today1;
  742. And insert this one line:
  743. # }
  744. + int date_changed(void)
  745. # {
  746. #   struct date today,today1;
  747.  
  748. Starting at line #930, delete this one line:
  749. # }
  750. - void getcaller()
  751. # {
  752. #   char s[81],s1[81],ch,done,lokb;
  753. #   int i,i1,i2,i3,any;
  754. And insert this one line:
  755. # }
  756. + void getcaller(void)
  757. # {
  758. #   char s[81],s1[81],ch,done,lokb;
  759. #   int i,i1,i2,i3,any;
  760.  
  761. Starting at line #979, delete this one line:
  762. #     }
  763. #     lokb=0;
  764. #     strcpy(curspeed,"KB");
  765. -     if ((!any) && ((rand() % 8000)==0) && (syscfg.systemnumber) &&
  766. #                    (ok_modem_stuff)) {
  767. #       attempt_callout();
  768. #       any=1;
  769. And insert this one line:
  770. #     }
  771. #     lokb=0;
  772. #     strcpy(curspeed,"KB");
  773. +     if ((!any) && ((rand() % 8000)==0) && (net_sysnum) &&
  774. #                    (ok_modem_stuff)) {
  775. #       attempt_callout();
  776. #       any=1;
  777.  
  778. Starting at line #1134, add this one line:
  779. #             print_local_file("NET.LOG","NETDAT*.LOG");
  780. #           break;
  781. #         case 'P':
  782. +           if (ok_local())
  783. #             print_pending_list();
  784. #           break;
  785. #         case 'Q':
  786.  
  787. Starting at line #1209, delete this one line:
  788. #           }
  789. #           break;
  790. #         case '/':
  791. -           if ((syscfg.systemnumber) && (ok_local()))
  792. #             force_callout();
  793. #           break;
  794. And insert this one line:
  795. #           }
  796. #           break;
  797. #         case '/':
  798. +           if ((net_sysnum) && (ok_local()))
  799. #             force_callout();
  800. #           break;
  801.  
  802. Starting at line #1409, add these 2 lines:
  803. #   if (restoring_shrink) {
  804. #     restoring_shrink=0;
  805. #     switch(restore_data("restore.wwv")) {
  806. +       case -1: /* hanging up */
  807. +         goto hanging_up;
  808. #       case 0: /* WFC */
  809. #         goto wfc_label;
  810. #       case 1: /* main menu */
  811.  
  812. Starting at line #1444, add this one line:
  813. #     if (!hangup) {
  814. #       logon();
  815. # main_menu_label:
  816. +       set_net_num(0);
  817. #       while (!hangup) {
  818. #         if (curdloads)
  819. #           dlmainmenu();
  820.  
  821.  
  822. /*****************************************************************************/
  823. bbsutl.c:
  824.  
  825.  
  826. Starting at line #299, delete this one line:
  827. # }
  828. - int so()
  829. # {
  830. #   if (actsl==255)
  831. #     return(1);
  832. And insert this one line:
  833. # }
  834. + int so(void)
  835. # {
  836. #   if (actsl==255)
  837. #     return(1);
  838.  
  839. Starting at line #309, delete this one line:
  840. - int cs()
  841. # {
  842. #   slrec ss;
  843. And insert this one line:
  844. + int cs(void)
  845. # {
  846. #   slrec ss;
  847.  
  848. Starting at line #323, delete this one line:
  849. # }
  850. - int lcs()
  851. # {
  852. #   slrec ss;
  853. And insert this one line:
  854. # }
  855. + int lcs(void)
  856. # {
  857. #   slrec ss;
  858.  
  859. Starting at line #404, delete this one line:
  860. # }
  861. - int sysop2()
  862. # {
  863. #   int ok;
  864. And insert this one line:
  865. # }
  866. + int sysop2(void)
  867. # {
  868. #   int ok;
  869.  
  870. Starting at line #423, delete this one line:
  871. #   return(ok);
  872. # }
  873. - void reqchat()
  874. # {
  875. #   int ok;
  876. #   char s[81];
  877. And insert this one line:
  878. #   return(ok);
  879. # }
  880. + void reqchat(void)
  881. # {
  882. #   int ok;
  883. #   char s[81];
  884.  
  885. Starting at line #465, delete this one line:
  886. # }
  887. - void yourinfo()
  888. # {
  889. #   outchr(12);
  890. #   npr("Your name      : %s\r\n",nam(&thisuser,usernum));
  891. And insert this one line:
  892. # }
  893. + void yourinfo(void)
  894. # {
  895. #   outchr(12);
  896. #   npr("Your name      : %s\r\n",nam(&thisuser,usernum));
  897.  
  898. Starting at line #489, delete this one line:
  899. # }
  900. - void upload_post()
  901. # {
  902. #   char s[81],s1[81],ch;
  903. #   int i,i1,maxli,f;
  904. And insert this one line:
  905. # }
  906. + void upload_post(void)
  907. # {
  908. #   char s[81],s1[81],ch;
  909. #   int i,i1,maxli,f;
  910.  
  911. Starting at line #545, delete this one line:
  912. # }
  913. - int check_ansi()
  914. # {
  915. #   long l;
  916. #   char ch;
  917. And insert this one line:
  918. # }
  919. + int check_ansi(void)
  920. # {
  921. #   long l;
  922. #   char ch;
  923.  
  924.  
  925. /*****************************************************************************/
  926. bbsutl1.c:
  927.  
  928.  
  929. Starting at line #22, delete this one line:
  930. # #pragma hdrstop
  931. - int ok_local()
  932. # {
  933. #   if (syscfg.sysconfig& sysconfig_no_local)
  934. #     return(0);
  935. And insert this one line:
  936. # #pragma hdrstop
  937. + int ok_local(void)
  938. # {
  939. #   if (syscfg.sysconfig& sysconfig_no_local)
  940. #     return(0);
  941.  
  942. Starting at line #208, delete this one line:
  943. #       write_user(un,&u);
  944. #     }
  945. #     close_user();
  946. -   } else if (syscfg.systemnumber && next_system(sy)) {
  947. #     nh.tosys=sy;
  948. #     nh.touser=un;
  949. #     nh.fromsys=syscfg.systemnumber;
  950. And insert this one line:
  951. #       write_user(un,&u);
  952. #     }
  953. #     close_user();
  954. +   } else if (net_sysnum && next_system(sy)) {
  955. #     nh.tosys=sy;
  956. #     nh.touser=un;
  957. #     nh.fromsys=net_sysnum;
  958.  
  959. Starting at line #211, delete this one line:
  960. #   } else if (syscfg.systemnumber && next_system(sy)) {
  961. #     nh.tosys=sy;
  962. #     nh.touser=un;
  963. -     nh.fromsys=syscfg.systemnumber;
  964. #     nh.fromuser=usernum;
  965. #     nh.main_type = main_type_ssm;
  966. #     nh.minor_type=0;
  967. And insert this one line:
  968. #   } else if (net_sysnum && next_system(sy)) {
  969. #     nh.tosys=sy;
  970. #     nh.touser=un;
  971. +     nh.fromsys=net_sysnum;
  972. #     nh.fromuser=usernum;
  973. #     nh.main_type = main_type_ssm;
  974. #     nh.minor_type=0;
  975.  
  976. Starting at line #221, delete this one line:
  977. #       s[80]=0;
  978. #     nh.length=strlen(s);
  979. #     nh.method=0;
  980. -     sprintf(s1,"%sP0.NET",syscfg.datadir);
  981. #     f=open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  982. #     lseek(f,0L,SEEK_END);
  983. #     write(f,(void *)&nh,sizeof(net_header_rec));
  984. And insert this one line:
  985. #       s[80]=0;
  986. #     nh.length=strlen(s);
  987. #     nh.method=0;
  988. +     sprintf(s1,"%sP0.NET",net_data);
  989. #     f=open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  990. #     lseek(f,0L,SEEK_END);
  991. #     write(f,(void *)&nh,sizeof(net_header_rec));
  992.  
  993. Starting at line #319, delete this one line:
  994. - void do_chains()
  995. # {
  996. #   int map[50],mapp,i,i1,ok,done;
  997. #   char s[81],s1[81],*ss;
  998. And insert this one line:
  999. + void do_chains(void)
  1000. # {
  1001. #   int map[50],mapp,i,i1,ok,done;
  1002. #   char s[81],s1[81],*ss;
  1003.  
  1004.  
  1005. /*****************************************************************************/
  1006. chnedit.c:
  1007.  
  1008.  
  1009. Starting at line #52, delete this one line:
  1010. #             n,c.description,c.filename,c.sl,y,x,z,w);
  1011. # }
  1012. - void showchains()
  1013. # {
  1014. #   int abort,i;
  1015. #   char s[180];
  1016. And insert this one line:
  1017. #             n,c.description,c.filename,c.sl,y,x,z,w);
  1018. # }
  1019. + void showchains(void)
  1020. # {
  1021. #   int abort,i;
  1022. #   char s[180];
  1023.  
  1024. Starting at line #212, delete this one line:
  1025. # }
  1026. - void chainedit()
  1027. # {
  1028. #   int i,i1,i2,done,f;
  1029. #   char s[81],s1[81],s2[81],ch;
  1030. And insert this one line:
  1031. # }
  1032. + void chainedit(void)
  1033. # {
  1034. #   int i,i1,i2,done,f;
  1035. #   char s[81],s1[81],s2[81],ch;
  1036.  
  1037.  
  1038. /*****************************************************************************/
  1039. com.c:
  1040.  
  1041.  
  1042. Starting at line #34, delete this one line:
  1043. #   unsigned char new_iir, old_iir;
  1044. #   old_iir = inportb(syscfg.com_base[pn]+2);
  1045. -   outportb(syscfg.com_base[pn]+2,0xc1);
  1046. #   new_iir = inportb(syscfg.com_base[pn]+2);
  1047. #   outportb(syscfg.com_base[pn]+2,old_iir);
  1048. And insert this one line:
  1049. #   unsigned char new_iir, old_iir;
  1050. #   old_iir = inportb(syscfg.com_base[pn]+2);
  1051. +   outportb(syscfg.com_base[pn]+2,0x81);
  1052. #   new_iir = inportb(syscfg.com_base[pn]+2);
  1053. #   outportb(syscfg.com_base[pn]+2,old_iir);
  1054.  
  1055. Starting at line #42, add these 9 lines:
  1056. #     return(0);
  1057. #   }
  1058. +   if (new_iir==0) {
  1059. +     /* unbuffered */
  1060. +     return(1);
  1061. +   }
  1062. +   outportb(syscfg.com_base[pn]+2,0xc1);
  1063. +   new_iir = inportb(syscfg.com_base[pn]+2);
  1064. +   outportb(syscfg.com_base[pn]+2,old_iir);
  1065. #   switch ((new_iir >> 6) & 0x03) {
  1066. #     case 0: /* no 16550 */
  1067. #     case 1: /* huh? */
  1068.  
  1069. Starting at line #88, delete this one line:
  1070. # }
  1071. - void ptime()
  1072. # {
  1073. #   char xl[81], cl[81], atr[81], cc, s[81];
  1074. #   long l;
  1075. And insert this one line:
  1076. # }
  1077. + void ptime(void)
  1078. # {
  1079. #   char xl[81], cl[81], atr[81], cc, s[81];
  1080. #   long l;
  1081.  
  1082. Starting at line #112, delete this one line:
  1083. # }
  1084. - void reprint()
  1085. # {
  1086. #   char xl[81], cl[81], atr[81], cc, ansistr_1[81];
  1087. #   int ansiptr_1;
  1088. And insert this one line:
  1089. # }
  1090. + void reprint(void)
  1091. # {
  1092. #   char xl[81], cl[81], atr[81], cc, ansistr_1[81];
  1093. #   int ansiptr_1;
  1094.  
  1095. Starting at line #166, delete this one line:
  1096. #     outportb(0x61, inportb(0x61) & 0xFC);
  1097. # }
  1098. - void far interrupt async_isr ()
  1099. # /* This function is called every time a char is received on the com port.
  1100. #  * The character is stored in the buffer[] array, and the head pointer is
  1101. #  * updated.
  1102. And insert this one line:
  1103. #     outportb(0x61, inportb(0x61) & 0xFC);
  1104. # }
  1105. + void far interrupt async_isr(void)
  1106. # /* This function is called every time a char is received on the com port.
  1107. #  * The character is stored in the buffer[] array, and the head pointer is
  1108. #  * updated.
  1109.  
  1110. Starting at line #193, delete this one line:
  1111. - char peek1c()
  1112. # {
  1113. #   if (head!=tail) {
  1114. #     return(buffer[tail]);
  1115. And insert this one line:
  1116. + char peek1c(void)
  1117. # {
  1118. #   if (head!=tail) {
  1119. #     return(buffer[tail]);
  1120.  
  1121. Starting at line #201, delete this one line:
  1122. #     return(0);
  1123. # }
  1124. - char get1c()
  1125. # /* This function returns one character from the com port, or a zero if
  1126. #  * no character is waiting
  1127. #  */
  1128. And insert this one line:
  1129. #     return(0);
  1130. # }
  1131. + char get1c(void)
  1132. # /* This function returns one character from the com port, or a zero if
  1133. #  * no character is waiting
  1134. #  */
  1135.  
  1136. Starting at line #221, delete this one line:
  1137. - int comhit()
  1138. # /* This returns a value telling if there is a character waiting in the com
  1139. #  * buffer.
  1140. #  */
  1141. And insert this one line:
  1142. + int comhit(void)
  1143. # /* This returns a value telling if there is a character waiting in the com
  1144. #  * buffer.
  1145. #  */
  1146.  
  1147. Starting at line #231, delete this one line:
  1148. - void dump()
  1149. # /* This function clears the com buffer */
  1150. # {
  1151. #   disable();
  1152. And insert this one line:
  1153. + void dump(void)
  1154. # /* This function clears the com buffer */
  1155. # {
  1156. #   disable();
  1157.  
  1158. Starting at line #285, delete this one line:
  1159. - void closeport()
  1160. # /* This function closes out the com port, removing the interrupt routine,
  1161. #  * etc.
  1162. #  */
  1163. And insert this one line:
  1164. + void closeport(void)
  1165. # /* This function closes out the com port, removing the interrupt routine,
  1166. #  * etc.
  1167. #  */
  1168.  
  1169. Starting at line #291, add this one line:
  1170. # {
  1171. #   int temp;
  1172. +   if (base) {
  1173. #     disable();
  1174. #     temp = inportb(0x21);
  1175. #     temp = temp | ((1 << async_irq));
  1176.  
  1177. Starting at line #299, add these 2 lines:
  1178. #     outportb(base + 4, 3);
  1179. #     setvect(async_irq+8,getvect(8)); /* for desqview */
  1180. #     enable();
  1181. +     base=0;
  1182. +   }
  1183. # }
  1184. # void dtr(int i)
  1185.  
  1186. Starting at line #322, delete this one line:
  1187. # }
  1188. - int cdet()
  1189. # /* This returns the status of the carrier detect lead from the modem */
  1190. # {
  1191. #   return((inportb(base + 6) & 0x80) ? 1 : 0);
  1192. And insert this one line:
  1193. # }
  1194. + int cdet(void)
  1195. # /* This returns the status of the carrier detect lead from the modem */
  1196. # {
  1197. #   return((inportb(base + 6) & 0x80) ? 1 : 0);
  1198.  
  1199. Starting at line #330, delete this one line:
  1200. - void checkhangup()
  1201. # /* This function checks to see if the user logged on to the com port has
  1202. #  * hung up.  Obviously, if no user is logged on remotely, this does nothing.
  1203. #  * If carrier detect is detected to be low, it is checked 100 times
  1204. And insert this one line:
  1205. + void checkhangup(void)
  1206. # /* This function checks to see if the user logged on to the com port has
  1207. #  * hung up.  Obviously, if no user is logged on remotely, this does nothing.
  1208. #  * If carrier detect is detected to be low, it is checked 100 times
  1209.  
  1210. Starting at line #429, delete this one line:
  1211. # }
  1212. - void execute_ansi()
  1213. # /* This function executes an ANSI string to change color, position the
  1214. #  * cursor, etc.
  1215. #  */
  1216. And insert this one line:
  1217. # }
  1218. + void execute_ansi(void)
  1219. # /* This function executes an ANSI string to change color, position the
  1220. #  * cursor, etc.
  1221. #  */
  1222.  
  1223. Starting at line #624, delete this one line:
  1224. - void nl()
  1225. # /* This function performs a CR/LF sequence to move the cursor to the next
  1226. #  * line.  If any end-of-line ANSI codes are set (such as changing back to
  1227. #  * the default color) are specified, those are executed first.
  1228. And insert this one line:
  1229. + void nl(void)
  1230. # /* This function performs a CR/LF sequence to move the cursor to the next
  1231. #  * line.  If any end-of-line ANSI codes are set (such as changing back to
  1232. #  * the default color) are specified, those are executed first.
  1233.  
  1234. Starting at line #639, delete this one line:
  1235. - void backspace()
  1236. # /* This function executes a backspace, space, backspace sequence. */
  1237. # {
  1238. #   int i;
  1239. And insert this one line:
  1240. + void backspace(void)
  1241. # /* This function executes a backspace, space, backspace sequence. */
  1242. # {
  1243. #   int i;
  1244.  
  1245. Starting at line #665, delete this one line:
  1246. - void pausescr()
  1247. # /* This will pause output, displaying the [PAUSE] message, and wait for
  1248. #  * a key to be hit.
  1249. #  */
  1250. And insert this one line:
  1251. + void pausescr(void)
  1252. # /* This will pause output, displaying the [PAUSE] message, and wait for
  1253. #  * a key to be hit.
  1254. #  */
  1255.  
  1256. Starting at line #712, delete this one line:
  1257. # }
  1258. - int kbhitb()
  1259. # {
  1260. #   union REGS r;
  1261. And insert this one line:
  1262. # }
  1263. + int kbhitb(void)
  1264. # {
  1265. #   union REGS r;
  1266.  
  1267. Starting at line #725, delete this one line:
  1268. # }
  1269. - int empty()
  1270. # {
  1271. #   if (x_only)
  1272. #     return(1);
  1273. And insert this one line:
  1274. # }
  1275. + int empty(void)
  1276. # {
  1277. #   if (x_only)
  1278. #     return(1);
  1279.  
  1280. Starting at line #744, delete this one line:
  1281. #   char c;
  1282. #   c = *ch;
  1283. -   if (c == 127)
  1284. #     c = 8;
  1285. #   if (okskey)
  1286. #     switch(c) {
  1287. And insert this one line:
  1288. #   char c;
  1289. #   c = *ch;
  1290. +   if ((c == 127) && (!in_fsed))
  1291. #     c = 8;
  1292. #   if (okskey)
  1293. #     switch(c) {
  1294.  
  1295. Starting at line #783, delete this one line:
  1296. #   *ch = c;
  1297. # }
  1298. - char getchd()
  1299. # {
  1300. #   union REGS r;
  1301. And insert this one line:
  1302. #   *ch = c;
  1303. # }
  1304. + char getchd(void)
  1305. # {
  1306. #   union REGS r;
  1307.  
  1308. Starting at line #793, delete this one line:
  1309. # }
  1310. - char getchd1()
  1311. # {
  1312. #   union REGS r;
  1313. And insert this one line:
  1314. # }
  1315. + char getchd1(void)
  1316. # {
  1317. #   union REGS r;
  1318.  
  1319. Starting at line #804, delete this one line:
  1320. # }
  1321. - char inkey()
  1322. # /* This function checks both the local keyboard, and the remote terminal
  1323. #  * (if any) for input.  If there is input, the key is returned.  If there
  1324. #  * is no input, a zero is returned.  Function keys hit are interpreted as
  1325. And insert this one line:
  1326. # }
  1327. + char inkey(void)
  1328. # /* This function checks both the local keyboard, and the remote terminal
  1329. #  * (if any) for input.  If there is input, the key is returned.  If there
  1330. #  * is no input, a zero is returned.  Function keys hit are interpreted as
  1331.  
  1332. Starting at line #877, delete this one line:
  1333. # }
  1334. - unsigned char getkey()
  1335. # /* This function returns one character from either the local keyboard or
  1336. #  * remote com port (if applicable).  After 1.5 minutes of inactivity, a
  1337. #  * beep is sounded.  After 3 minutes of inactivity, the user is hung up.
  1338. And insert this one line:
  1339. # }
  1340. + unsigned char getkey(void)
  1341. # /* This function returns one character from either the local keyboard or
  1342. #  * remote com port (if applicable).  After 1.5 minutes of inactivity, a
  1343. #  * beep is sounded.  After 3 minutes of inactivity, the user is hung up.
  1344.  
  1345. Starting at line #1031, delete this one line:
  1346. - int yn()
  1347. # /* The keyboard is checked for either a Y, N, or C/R to be hit.  C/R is
  1348. #  * assumed to be the same as a N.  Yes or No is output, and yn is set to
  1349. #  * zero if No was returned, and yn() is non-zero if Y was hit.
  1350. And insert this one line:
  1351. + int yn(void)
  1352. # /* The keyboard is checked for either a Y, N, or C/R to be hit.  C/R is
  1353. #  * assumed to be the same as a N.  Yes or No is output, and yn is set to
  1354. #  * zero if No was returned, and yn() is non-zero if Y was hit.
  1355.  
  1356. Starting at line #1049, delete this one line:
  1357. - int ny()
  1358. # /* This is the same as yn(), except C/R is assumed to be "Y" */
  1359. # {
  1360. #   char ch=0;
  1361. And insert this one line:
  1362. + int ny(void)
  1363. # /* This is the same as yn(), except C/R is assumed to be "Y" */
  1364. # {
  1365. #   char ch=0;
  1366.  
  1367. Starting at line #1095, add these 5 lines:
  1368. #   ansic(i);
  1369. #   outstr(s);
  1370. #   ansic(0);
  1371. + }
  1372. + void reset_colors(void)
  1373. + {
  1374. +   outstr("\033[0m");
  1375. # }
  1376.  
  1377.  
  1378. /*****************************************************************************/
  1379. conio.c:
  1380.  
  1381.  
  1382. Starting at line #45, delete this one line:
  1383. # static int global_ptr;
  1384. # static int wx=0;
  1385. - void my_video_int()
  1386. # {
  1387. # #if __TURBOC__ >= 0x0200
  1388. #   /* TC 2.0 or TC++ here */
  1389. And insert this one line:
  1390. # static int global_ptr;
  1391. # static int wx=0;
  1392. + void my_video_int(void)
  1393. # {
  1394. # #if __TURBOC__ >= 0x0200
  1395. #   /* TC 2.0 or TC++ here */
  1396.  
  1397. Starting at line #193, delete this one line:
  1398. - int wherex()
  1399. # /* This function returns the current X cursor position, as the number of
  1400. #  * characters from the left hand side of the screen.  An X position of zero
  1401. #  * means the cursor is at the left-most position
  1402. And insert this one line:
  1403. + int wherex(void)
  1404. # /* This function returns the current X cursor position, as the number of
  1405. #  * characters from the left hand side of the screen.  An X position of zero
  1406. #  * means the cursor is at the left-most position
  1407.  
  1408. Starting at line #211, delete this one line:
  1409. - int wherey()
  1410. # /* This function returns the Y cursor position, as the line number from
  1411. #  * the top of the logical window.  The offset due to the protected top
  1412. #  * of the screen display is taken into account.  A wherey() of zero means
  1413. And insert this one line:
  1414. + int wherey(void)
  1415. # /* This function returns the Y cursor position, as the line number from
  1416. #  * the top of the logical window.  The offset due to the protected top
  1417. #  * of the screen display is taken into account.  A wherey() of zero means
  1418.  
  1419. Starting at line #227, delete this one line:
  1420. - void lf()
  1421. # /* This function performs a linefeed to the screen (but not remotely) by
  1422. #  * either moving the cursor down one line, or scrolling the logical screen
  1423. #  * up one line.
  1424. And insert this one line:
  1425. + void lf(void)
  1426. # /* This function performs a linefeed to the screen (but not remotely) by
  1427. #  * either moving the cursor down one line, or scrolling the logical screen
  1428. #  * up one line.
  1429.  
  1430. Starting at line #254, delete this one line:
  1431. - void cr()
  1432. # /* This short function returns the local cursor to the left-most position
  1433. #  * on the screen.
  1434. #  */
  1435. And insert this one line:
  1436. + void cr(void)
  1437. # /* This short function returns the local cursor to the left-most position
  1438. #  * on the screen.
  1439. #  */
  1440.  
  1441. Starting at line #267, delete this one line:
  1442. #   my_video_int();
  1443. # }
  1444. - void clrscrb()
  1445. # /* This clears the local logical screen */
  1446. # {
  1447. #   SCROLL_UP(topline,screenbottom,0);
  1448. And insert this one line:
  1449. #   my_video_int();
  1450. # }
  1451. + void clrscrb(void)
  1452. # /* This clears the local logical screen */
  1453. # {
  1454. #   SCROLL_UP(topline,screenbottom,0);
  1455.  
  1456. Starting at line #277, delete this one line:
  1457. - void bs()
  1458. # /* This function moves the cursor one position to the left, or if the cursor
  1459. #  * is currently at its left-most position, the cursor is moved to the end of
  1460. #  * the previous line, except if it is on the top line, in which case nothing
  1461. And insert this one line:
  1462. + void bs(void)
  1463. # /* This function moves the cursor one position to the left, or if the cursor
  1464. #  * is currently at its left-most position, the cursor is moved to the end of
  1465. #  * the previous line, except if it is on the top line, in which case nothing
  1466.  
  1467. Starting at line #662, delete this one line:
  1468. - void val_cur_user()
  1469. # /* val_cur_user allows the sysop at the keyboard to validate the current user,
  1470. #    chaning sl, dsl, ar, dar, sysop sub, exemptions, restrictions, and user
  1471. #    note
  1472. And insert this one line:
  1473. + void val_cur_user(void)
  1474. # /* val_cur_user allows the sysop at the keyboard to validate the current user,
  1475. #    chaning sl, dsl, ar, dar, sysop sub, exemptions, restrictions, and user
  1476. #    note
  1477.  
  1478. Starting at line #920, delete this one line:
  1479. #             chatting=0;
  1480. #           break;
  1481. #     case 71: /* HOME */
  1482. -       if (chatting) {
  1483. #         if (chat_file)
  1484. #           chat_file=0;
  1485. #         else
  1486. And insert this one line:
  1487. #             chatting=0;
  1488. #           break;
  1489. #     case 71: /* HOME */
  1490. +           if (chatting==1) {
  1491. #         if (chat_file)
  1492. #           chat_file=0;
  1493. #         else
  1494.  
  1495. Starting at line #1050, delete this one line:
  1496. # }
  1497. - void topscreen()
  1498. # {
  1499. #   int cc,cx,cy,ctl,i;
  1500. #   char sl[81],ar[17],dar[17],restrict[17],rst[17],lo[90],ol[190],calls[20];
  1501. And insert this one line:
  1502. # }
  1503. + void topscreen(void)
  1504. # {
  1505. #   int cc,cx,cy,ctl,i;
  1506. #   char sl[81],ar[17],dar[17],restrict[17],rst[17],lo[90],ol[190],calls[20];
  1507.  
  1508. Starting at line #1621, add these 3 lines:
  1509. #   double tc;
  1510. #   chatcall=0;
  1511. +   if (two_way)
  1512. +     chatting=2;
  1513. +   else
  1514. #     chatting=1;
  1515. #   tc=timer();
  1516. #   cf=0;
  1517.  
  1518.  
  1519. /*****************************************************************************/
  1520. defaults.c:
  1521.  
  1522.  
  1523. Starting at line #22, delete this one line:
  1524. # #pragma hdrstop
  1525. - void select_editor()
  1526. # {
  1527. #   char s[81],s1[81],*ss;
  1528. #   int i;
  1529. And insert this one line:
  1530. # #pragma hdrstop
  1531. + void select_editor(void)
  1532. # {
  1533. #   char s[81],s1[81],*ss;
  1534. #   int i;
  1535.  
  1536. Starting at line #56, delete this one line:
  1537. # }
  1538. - void print_cur_stat()
  1539. # {
  1540. #   char s[81],s1[81],s2[81];
  1541. #   userrec ur;
  1542. And insert this one line:
  1543. # }
  1544. + void print_cur_stat(void)
  1545. # {
  1546. #   char s[81],s1[81],s2[81];
  1547. #   userrec ur;
  1548.  
  1549. Starting at line #77, delete this one line:
  1550. #     pl("Normal");
  1551. #   else {
  1552. #     if (thisuser.forwardsys) {
  1553. -       sprintf(s,"Forward to #%u @%u.",thisuser.forwardusr,thisuser.forwardsys);
  1554. #       pl(s);
  1555. #     } else {
  1556. #       if (thisuser.forwardusr==65535) {
  1557. And insert these 3 lines:
  1558. #     pl("Normal");
  1559. #   else {
  1560. #     if (thisuser.forwardsys) {
  1561. +       sprintf(s,"Forward to %s #%u @%u.",
  1562. +       net_networks[thisuser.net_num].name,
  1563. +       thisuser.forwardusr,thisuser.forwardsys);
  1564. #       pl(s);
  1565. #     } else {
  1566. #       if (thisuser.forwardusr==65535) {
  1567.  
  1568. Starting at line #179, delete this one line:
  1569. #   return(s);
  1570. # }
  1571. - void color_list()
  1572. # {
  1573. #   int i;
  1574. And insert this one line:
  1575. #   return(s);
  1576. # }
  1577. + void color_list(void)
  1578. # {
  1579. #   int i;
  1580.  
  1581. Starting at line #198, delete this one line:
  1582. - void change_colors()
  1583. # {
  1584. #   int i,done,i1,i2;
  1585. #   char s[81],ch,nc;
  1586. And insert this one line:
  1587. + void change_colors(void)
  1588. # {
  1589. #   int i,done,i1,i2;
  1590. #   char s[81],ch,nc;
  1591.  
  1592. Starting at line #328, delete this one line:
  1593. - void l_config_qscan()
  1594. # {
  1595. #   int i,abort;
  1596. #   char s[81];
  1597. And insert this one line:
  1598. + void l_config_qscan(void)
  1599. # {
  1600. #   int i,abort;
  1601. #   char s[81];
  1602.  
  1603. Starting at line #337, delete this one line:
  1604. #   nl();
  1605. #   pl("Boards to q-scan marked with '*'");
  1606. #   nl();
  1607. -   for (i=0; (i<MAX_SUBS) && (usub[i].subnum!=-1) && (!abort); i++) {
  1608. #     sprintf(s,"%c %s. %s",
  1609. # #if MAX_SUBS>32
  1610. #       (usub[i].subnum>=32)?
  1611. And insert this one line:
  1612. #   nl();
  1613. #   pl("Boards to q-scan marked with '*'");
  1614. #   nl();
  1615. +   for (i=0; (i<max_subs) && (usub[i].subnum!=-1) && (!abort); i++) {
  1616. #     sprintf(s,"%c %s. %s",
  1617. # #if MAX_SUBS>32
  1618. #       (usub[i].subnum>=32)?
  1619.  
  1620. Starting at line #354, delete this one line:
  1621. #   nl();
  1622. # }
  1623. - void config_qscan()
  1624. # {
  1625. #   char *s;
  1626. #   int i,done;
  1627. And insert this one line:
  1628. #   nl();
  1629. # }
  1630. + void config_qscan(void)
  1631. # {
  1632. #   char *s;
  1633. #   int i,done;
  1634.  
  1635. Starting at line #368, delete this one line:
  1636. #     outstr("Config: ");
  1637. #     s=mmkey(0);
  1638. #     if (s[0])
  1639. -       for (i=0; i<MAX_SUBS; i++)
  1640. #         if (strcmp(usub[i].keys,s)==0) {
  1641. # #if MAX_SUBS>32
  1642. #           if (usub[i].subnum>=32)
  1643. And insert this one line:
  1644. #     outstr("Config: ");
  1645. #     s=mmkey(0);
  1646. #     if (s[0])
  1647. +       for (i=0; (i<max_subs) && (usub[i].subnum!=-1); i++)
  1648. #         if (strcmp(usub[i].keys,s)==0) {
  1649. # #if MAX_SUBS>32
  1650. #           if (usub[i].subnum>=32)
  1651.  
  1652. Starting at line #407, delete this one line:
  1653. # }
  1654. - void make_macros()
  1655. # {
  1656. #   unsigned char tempmac[81],s[81];
  1657. #   unsigned char ch,ch1;
  1658. And insert this one line:
  1659. # }
  1660. + void make_macros(void)
  1661. # {
  1662. #   unsigned char tempmac[81],s[81];
  1663. #   unsigned char ch,ch1;
  1664.  
  1665. Starting at line #503, delete this one line:
  1666. # }
  1667. - void input_pw1()
  1668. # {
  1669. #   char s[81],s1[81];
  1670. #   int ok;
  1671. And insert this one line:
  1672. # }
  1673. + void input_pw1(void)
  1674. # {
  1675. #   char s[81],s1[81];
  1676. #   int ok;
  1677.  
  1678. Starting at line #556, replace function modify_mailbox() with the following:
  1679.  
  1680. void modify_mailbox(void)
  1681. {
  1682.   int i,i1,i2;
  1683.   unsigned int u;
  1684.   char s[81];
  1685.   net_system_list_rec *csne;
  1686.  
  1687.   nl();
  1688.   helpl=35;
  1689.  
  1690.   prt(5,"Do you want to close your mailbox? ");
  1691.   if (yn()) {
  1692.     prt(5,"Are you sure? ");
  1693.     if (yn()) {
  1694.       thisuser.forwardsys=0;
  1695.       thisuser.forwardusr=-1;
  1696.       return;
  1697.     }
  1698.   }
  1699.   prt(5,"Do you want to forward your mail? ");
  1700.   if (!yn()) {
  1701.     thisuser.forwardsys=0;
  1702.     thisuser.forwardusr=0;
  1703.     return;
  1704.   }
  1705.   nl();
  1706.   prt(2,"Where? ");
  1707.   input(s,40);
  1708.   parse_email_info(s, &thisuser.forwardusr, &thisuser.forwardsys);
  1709.   if (thisuser.forwardsys) {
  1710.     thisuser.net_num=net_num;
  1711.     if (!thisuser.forwardusr) {
  1712.       thisuser.forwardsys=thisuser.net_num=0;
  1713.       nl();
  1714.       pl("Can't forward to a user name, must use user number.");
  1715.       nl();
  1716.     }
  1717.  } else if (thisuser.forwardusr==usernum) {
  1718.     nl();
  1719.     pl("Can't forward to yourself.");
  1720.     nl();
  1721.     thisuser.forwardusr=0;
  1722.   }
  1723.   if ((!thisuser.forwardusr) && (!thisuser.forwardsys)) {
  1724.     thisuser.net_num=0;
  1725.     nl();
  1726.     pl("Forwarding reset.");
  1727.     nl();
  1728.   } else {
  1729.     nl();
  1730.     pl("Saved.");
  1731.     nl();
  1732.   }
  1733. }
  1734.  
  1735.  
  1736. Starting at line #639, delete this one line:
  1737. # }
  1738. - void optional_lines()
  1739. # {
  1740. #   char s[81];
  1741. #   int i;
  1742. And insert this one line:
  1743. # }
  1744. + void optional_lines(void)
  1745. # {
  1746. #   char s[81];
  1747. #   int i;
  1748.  
  1749. Starting at line #656, delete this one line:
  1750. # }
  1751. - void enter_regnum()
  1752. # {
  1753. #   char s[81];
  1754. #   long l;
  1755. And insert this one line:
  1756. # }
  1757. + void enter_regnum(void)
  1758. # {
  1759. #   char s[81];
  1760. #   long l;
  1761.  
  1762. Starting at line #672, delete this one line:
  1763. # }
  1764. - void defaults()
  1765. # {
  1766. #   int i,i1,i2,done;
  1767. #   char s[81],s1[81],s2[81],ch;
  1768. And insert this one line:
  1769. # }
  1770. + void defaults(void)
  1771. # {
  1772. #   int i,i1,i2,done;
  1773. #   char s[81],s1[81],s2[81],ch;
  1774.  
  1775. Starting at line #679, add these 3 lines:
  1776. #   done=0;
  1777. #   print_cur_stat();
  1778. #   do {
  1779. +     tleft(1);
  1780. +     if (hangup)
  1781. +       return;
  1782. #     nl();
  1783. #     helpl=4;
  1784. #     if (okansi()) {
  1785.  
  1786.  
  1787. /*****************************************************************************/
  1788. diredit.c:
  1789.  
  1790.  
  1791. Starting at line #40, delete this one line:
  1792. #             n,x,r.name,r.filename,r.dsl,r.age,r.maxfiles,r.path);
  1793. # }
  1794. - void showdirs()
  1795. # {
  1796. #   int abort,i;
  1797. #   char s[180];
  1798. And insert this one line:
  1799. #             n,x,r.name,r.filename,r.dsl,r.age,r.maxfiles,r.path);
  1800. # }
  1801. + void showdirs(void)
  1802. # {
  1803. #   int abort,i;
  1804. #   char s[180];
  1805.  
  1806. Starting at line #287, delete this one line:
  1807. # }
  1808. - void dlboardedit()
  1809. # {
  1810. #   int i,i1,i2,done,f;
  1811. #   char s[81],s1[81],s2[81],ch;
  1812. And insert this one line:
  1813. # }
  1814. + void dlboardedit(void)
  1815. # {
  1816. #   int i,i1,i2,done,f;
  1817. #   char s[81],s1[81],s2[81],ch;
  1818.  
  1819.  
  1820. /*****************************************************************************/
  1821. extrn.c:
  1822.  
  1823.  
  1824. Starting at line #38, delete this one line:
  1825. - unsigned char getkeyext()
  1826. # {
  1827. #   unsigned char ch;
  1828. #   static int holding=0;
  1829. And insert this one line:
  1830. + unsigned char getkeyext(void)
  1831. # {
  1832. #   unsigned char ch;
  1833. #   static int holding=0;
  1834.  
  1835. Starting at line #143, add these 2 lines:
  1836. #   outportb(base+4,temp | 0x0A);
  1837. #   enable();
  1838. #   dtr(1);
  1839. +   reset_colors();
  1840. +   ansic(0);
  1841. # }
  1842.  
  1843. Starting at line #192, delete this one line:
  1844. #   return(rc);
  1845. # }
  1846. - void checka1()
  1847. # {
  1848. #   char ch;
  1849. #   long d1;
  1850. And insert this one line:
  1851. #   return(rc);
  1852. # }
  1853. + void checka1(void)
  1854. # {
  1855. #   char ch;
  1856. #   long d1;
  1857.  
  1858. Starting at line #223, delete this one line:
  1859. # long ca_d1;
  1860. - void checka2()
  1861. # {
  1862. #   ca_pause=0;
  1863. #   ca_ctrl_c=0;
  1864. And insert this one line:
  1865. # long ca_d1;
  1866. + void checka2(void)
  1867. # {
  1868. #   ca_pause=0;
  1869. #   ca_ctrl_c=0;
  1870.  
  1871. Starting at line #263, delete this one line:
  1872. - void run_external(char *s)
  1873. # {
  1874. #   do_remote(s,1);
  1875. # }
  1876. And insert this one line:
  1877. + int run_external(char *s)
  1878. # {
  1879. #   return(do_remote(s,1));
  1880. # }
  1881.  
  1882. Starting at line #265, delete this one line:
  1883. # void run_external(char *s)
  1884. # {
  1885. -   do_remote(s,1);
  1886. # }
  1887. And insert this one line:
  1888. # int run_external(char *s)
  1889. # {
  1890. +   return(do_remote(s,1));
  1891. # }
  1892.  
  1893. Starting at line #272, delete these 4 lines:
  1894. # int run_external1(char *s)
  1895. # {
  1896. -   int i;
  1897. -   i=do_remote(s,0);
  1898. -   return(i);
  1899. # }
  1900. And insert this one line:
  1901. # int run_external1(char *s)
  1902. # {
  1903. +   return(do_remote(s,0));
  1904. # }
  1905.  
  1906. Starting at line #604, delete function alf().
  1907.  
  1908.  
  1909. Starting at line #613, replace function create_chain_file() with the following:
  1910.  
  1911. char *create_chain_file(char *fn)
  1912. {
  1913.   int i,i1;
  1914.   char s[81],s1[81],gd[81],dd[81];
  1915.   static char fpn[81];
  1916.   long l,l1;
  1917.   FILE *f;
  1918.  
  1919.   cd_to(syscfg.gfilesdir);
  1920.   get_dir(gd,1);
  1921.   cd_to(cdir);
  1922.   cd_to(syscfg.datadir);
  1923.   get_dir(dd,1);
  1924.   cd_to(cdir);
  1925.   sl1(3,s);
  1926.   l=(long) (timeon);
  1927.   if (l<0)
  1928.     l += 3600*24;
  1929.   l1=(long) (timer()-timeon);
  1930.   if (l1<0)
  1931.     l1 += 3600*24;
  1932.  
  1933.   unlink(fn);
  1934.   f=fopen(fn,"wt");
  1935.   if (f) {
  1936.     fprintf(f,"%d\n%s\n%s\n%s\n%d\n%c\n%10.2f\n%s\n%d\n%d\n%u\n",
  1937.             usernum, thisuser.name, thisuser.realname, thisuser.callsign,
  1938.             thisuser.age, thisuser.sex, thisuser.gold, thisuser.laston,
  1939.             thisuser.screenchars, thisuser.screenlines, thisuser.sl);
  1940.     fprintf(f,"%d\n%d\n%d\n%d\n%10.2f\n%s\n%s\n%s\n",
  1941.             cs(),so(),okansi(), incom, nsl(), gd, dd, s);
  1942.     if (using_modem)
  1943.       fprintf(f,"%u\n",modem_speed);
  1944.     else
  1945.       fprintf(f,"KB\n");
  1946.     fprintf(f,"%d\n%s\n%s\n%ld\n%ld\n%lu\n%u\n%lu\n%u\n%s\n%u\n%u\n",
  1947.             syscfg.primaryport, syscfg.systemname, syscfg.sysopname, l, l1,
  1948.             thisuser.uk, thisuser.uploaded, thisuser.dk, thisuser.downloaded,
  1949.             (andwith==0x7f)?"7E1":"8N1", com_speed, net_sysnum);
  1950.     fclose(f);
  1951.   }
  1952.   get_dir(fpn,1);
  1953.   strcat(fpn,fn);
  1954.   return(fpn);
  1955. }
  1956.  
  1957.  
  1958. /*****************************************************************************/
  1959. gfiles.c:
  1960.  
  1961.  
  1962. Starting at line #193, delete this one line:
  1963. # }
  1964. - void gfiles()
  1965. # {
  1966. #   int i,i1,i2,done,abort,map[32],nmap,ok;
  1967. #   char s[81],s1[81],s2[81],*ss;
  1968. And insert this one line:
  1969. # }
  1970. + void gfiles(void)
  1971. # {
  1972. #   int i,i1,i2,done,abort,map[32],nmap,ok;
  1973. #   char s[81],s1[81],s2[81],*ss;
  1974.  
  1975.  
  1976. /*****************************************************************************/
  1977. gfledit.c:
  1978.  
  1979.  
  1980. Starting at line #45, delete this one line:
  1981. #             n,x,r.name,r.filename,r.sl,r.age,r.maxfiles);
  1982. # }
  1983. - void showsec()
  1984. # {
  1985. #   int abort,i;
  1986. #   char s[180];
  1987. And insert this one line:
  1988. #             n,x,r.name,r.filename,r.sl,r.age,r.maxfiles);
  1989. # }
  1990. + void showsec(void)
  1991. # {
  1992. #   int abort,i;
  1993. #   char s[180];
  1994.  
  1995. Starting at line #214, delete this one line:
  1996. # }
  1997. - void gfileedit()
  1998. # {
  1999. #   int i,i1,i2,done,f;
  2000. #   char s[81],s1[81],s2[81],ch;
  2001. And insert this one line:
  2002. # }
  2003. + void gfileedit(void)
  2004. # {
  2005. #   int i,i1,i2,done,f;
  2006. #   char s[81],s1[81],s2[81],ch;
  2007.  
  2008.  
  2009. /*****************************************************************************/
  2010. lilo.c:
  2011.  
  2012.  
  2013. Starting at line #23, delete this one line:
  2014. - void getuser()
  2015. # {
  2016. #   char s[81],s2[81],s3[81],*ss;
  2017. #   int ok,count,net_only,ans;
  2018. And insert this one line:
  2019. + void getuser(void)
  2020. # {
  2021. #   char s[81],s2[81],s3[81],*ss;
  2022. #   int ok,count,net_only,ans,i;
  2023.  
  2024. Starting at line #26, delete this one line:
  2025. # void getuser()
  2026. # {
  2027. #   char s[81],s2[81],s3[81],*ss;
  2028. -   int ok,count,net_only,ans;
  2029. #   long l;
  2030. #   FILE *f;
  2031. And insert this one line:
  2032. # void getuser(void)
  2033. # {
  2034. #   char s[81],s2[81],s3[81],*ss;
  2035. +   int ok,count,net_only,ans,i;
  2036. #   long l;
  2037. #   FILE *f;
  2038.  
  2039. Starting at line #65, delete these 2 lines:
  2040. #     } else
  2041. #       printfile("welcome.msg");
  2042. #   }
  2043. -   makeansi(0x07, s, 1);
  2044. -   outs(s);
  2045. #   do {
  2046. #     nl();
  2047. #     if (net_only) {
  2048. And insert these 2 lines:
  2049. #     } else
  2050. #       printfile("welcome.msg");
  2051. #   }
  2052. +   if (curatr!=7)
  2053. +     reset_colors();
  2054. #   do {
  2055. #     nl();
  2056. #     if (net_only) {
  2057.  
  2058. Starting at line #157, delete this one line:
  2059. #                   if (s[0]) {
  2060. #                     sprintf(s2,"%s /B%u /F%u",s,modem_speed,modem_flag);
  2061. #                     sprintf(s3,"%sREMOTES.DAT",syscfg.datadir);
  2062. -                     f=fopen(s3,"r");
  2063. #                     if (f) {
  2064. #                       ok=0;
  2065. #                       while ((!ok) && (fgets(s3,80,f))) {
  2066. And insert this one line:
  2067. #                   if (s[0]) {
  2068. #                     sprintf(s2,"%s /B%u /F%u",s,modem_speed,modem_flag);
  2069. #                     sprintf(s3,"%sREMOTES.DAT",syscfg.datadir);
  2070. +                     f=fopen(s3,"rt");
  2071. #                     if (f) {
  2072. #                       ok=0;
  2073. #                       while ((!ok) && (fgets(s3,80,f))) {
  2074.  
  2075. Starting at line #168, add this one line:
  2076. #                       }
  2077. #                       fclose(f);
  2078. #                       if (ok) {
  2079. +                         shrink_out(s2, -1, 0, 0, 1);
  2080. #                         run_external1(s2);
  2081. #                       }
  2082. #                     }
  2083.  
  2084. Starting at line #174, add this one line:
  2085. #                   }
  2086. #                   break;
  2087. #               }
  2088. +               l=status.qscanptr;
  2089. #               get_status();
  2090. #               if (l!=status.qscanptr) {
  2091. #                 for (i=0; i<num_subs; i++) {
  2092.  
  2093. Starting at line #175, add these 5 lines:
  2094. #               }
  2095. #               l=status.qscanptr;
  2096. #               get_status();
  2097. +               if (l!=status.qscanptr) {
  2098. +                 for (i=0; i<num_subs; i++) {
  2099. +                   sub_dates[i]=0L;
  2100. +                 }
  2101. +               }
  2102. #               hangup=1;
  2103. #               dtr(0);
  2104. #               global_xx=0;
  2105.  
  2106. Starting at line #203, delete this one line:
  2107. # }
  2108. - void logon()
  2109. # {
  2110. #   char s[255],s1[181],s2[81],*ss;
  2111. #   int i,i1,f;
  2112. And insert this one line:
  2113. # }
  2114. + void logon(void)
  2115. # {
  2116. #   char s[255],s1[181],s2[81],*ss;
  2117. #   int i,i1,f;
  2118.  
  2119. Starting at line #214, add this one line:
  2120. #   }
  2121. #   if (live_user) {
  2122. +     reset_colors();
  2123. #     ansic(0);
  2124. #     outchr(12);
  2125. #   }
  2126.  
  2127. Starting at line #361, delete these 3 lines:
  2128. #     pl(s1);
  2129. # /****************************************************************************/
  2130. -     if (syscfg.systemnumber)
  2131. -       npr("WWIVnet node   : @%u   (net%u)\r\n",syscfg.systemnumber,
  2132. -         status.net_version);
  2133. #     nl();
  2134. #     if (thisuser.forwardusr) {
  2135. And insert these 13 lines:
  2136. #     pl(s1);
  2137. # /****************************************************************************/
  2138. +     for (i=0; i<net_num_max; i++) {
  2139. +       if (net_networks[i].sysnum) {
  2140. +         sprintf(s,"%s node",net_networks[i].name);
  2141. +         for (i1=strlen(s); i1<15; i1++)
  2142. +           s[i1]=' ';
  2143. +         s[i1]=0;
  2144. +         sprintf(s1,"%s: @%u",s,net_networks[i].sysnum);
  2145. +         for (i1=strlen(s1); i1<23; i1++)
  2146. +           s1[i1]=' ';
  2147. +         s1[i1]=0;
  2148. +         npr("%s  (net%u)\r\n",s1,status.net_version);
  2149. +       }
  2150. +     }
  2151. #     nl();
  2152. #     if (thisuser.forwardusr) {
  2153.  
  2154. Starting at line #367, add this one line:
  2155. #     nl();
  2156. #     if (thisuser.forwardusr) {
  2157. #       if (thisuser.forwardsys) {
  2158. +         set_net_num(thisuser.net_num);
  2159. #         if (!next_system(thisuser.forwardsys)) {
  2160. #           thisuser.forwardusr=0;
  2161. #           thisuser.forwardsys=0;
  2162.  
  2163. Starting at line #372, add these 4 lines:
  2164. #           thisuser.forwardsys=0;
  2165. #           strcpy(s1,"Forwarded to unknown system; forwarding reset.");
  2166. #         } else {
  2167. +           if (net_num_max>1)
  2168. +             sprintf(s1,"Mail set to be forwarded to %s #%u @%u.",
  2169. +                 net_name,thisuser.forwardusr,thisuser.forwardsys);
  2170. +           else
  2171. #             sprintf(s1,"Mail set to be forwarded to #%u @%u.",
  2172. #                 thisuser.forwardusr,thisuser.forwardsys);
  2173. #         }
  2174.  
  2175. Starting at line #376, add these 3 lines:
  2176. #                 thisuser.forwardusr,thisuser.forwardsys);
  2177. #         }
  2178. #       } else {
  2179. +         if (thisuser.forwardusr==65535)
  2180. +           strcpy(s1,"Your mailbox is closed.");
  2181. +         else
  2182. #           sprintf(s1,"Mail set to be forwarded to #%u.",thisuser.forwardusr);
  2183. #       }
  2184. #       pl(s1);
  2185.  
  2186. Starting at line #444, delete this one line:
  2187. # }
  2188. - void logoff()
  2189. # {
  2190. #   long l;
  2191. #   int f,r,w,t,i;
  2192. And insert this one line:
  2193. # }
  2194. + void logoff(void)
  2195. # {
  2196. #   long l;
  2197. #   int f,r,w,t,i;
  2198.  
  2199.  
  2200. /*****************************************************************************/
  2201. misccmd.c:
  2202.  
  2203.  
  2204. Starting at line #22, delete this one line:
  2205. # #pragma hdrstop
  2206. - void read_automessage()
  2207. # {
  2208. #   int i,i1,i2,i3,f,len,ptrbeg[10],ptrend[10];
  2209. #   char s[81],l[6][81],anon,buf[512];
  2210. And insert this one line:
  2211. # #pragma hdrstop
  2212. + void read_automessage(void)
  2213. # {
  2214. #   int i,i1,i2,i3,f,len,ptrbeg[10],ptrend[10];
  2215. #   char s[81],l[6][81],anon,buf[512];
  2216.  
  2217. Starting at line #83, delete this one line:
  2218. #   nl();
  2219. # }
  2220. - void write_automessage1()
  2221. # {
  2222. #   int i,i1,f;
  2223. #   char s[81],l[4][81];
  2224. And insert this one line:
  2225. #   nl();
  2226. # }
  2227. + void write_automessage1(void)
  2228. # {
  2229. #   int i,i1,f;
  2230. #   char s[81],l[4][81];
  2231.  
  2232. Starting at line #134, delete this one line:
  2233. # }
  2234. - void write_automessage()
  2235. # {
  2236. #   char ch;
  2237. #   int done,okwrite;
  2238. And insert this one line:
  2239. # }
  2240. + void write_automessage(void)
  2241. # {
  2242. #   char ch;
  2243. #   int done,okwrite;
  2244.  
  2245. Starting at line #167, add this one line:
  2246. #         write_automessage1();
  2247. #         break;
  2248. #       case 'A':
  2249. +         grab_quotes(NULL, NULL);
  2250. #         if (status.amsguser)
  2251. #           email(status.amsguser,0,0,status.amsganon);
  2252. #         break;
  2253.  
  2254. Starting at line #177, delete this one line:
  2255. # }
  2256. - void bbslist()
  2257. # {
  2258. #   int i,i1,i2,f,done,ok;
  2259. #   char s[150],s1[150],s2[150],ch,ch1,*ss;
  2260. And insert this one line:
  2261. # }
  2262. + void bbslist(void)
  2263. # {
  2264. #   int i,i1,i2,f,done,ok;
  2265. #   char s[150],s1[150],s2[150],ch,ch1,*ss;
  2266.  
  2267. Starting at line #308, delete this one line:
  2268. # }
  2269. - void kill_old_email()
  2270. # {
  2271. #   int cur,max,i,i1,f,done,done1,forward;
  2272. #   char s[81],s1[81],ch;
  2273. And insert this one line:
  2274. # }
  2275. + void kill_old_email(void)
  2276. # {
  2277. #   int cur,max,i,i1,f,done,done1,forward;
  2278. #   char s[81],s1[81],ch;
  2279.  
  2280. Starting at line #405, delete this one line:
  2281. #   close(f);
  2282. # }
  2283. - void list_users()
  2284. # {
  2285. #   subboardrec s;
  2286. #   userrec u;
  2287. And insert this one line:
  2288. #   close(f);
  2289. # }
  2290. + void list_users(void)
  2291. # {
  2292. #   subboardrec s;
  2293. #   userrec u;
  2294.  
  2295. Starting at line #429, delete this one line:
  2296. #     ok=1;
  2297. #     if (u.sl<s.readsl)
  2298. #       ok=0;
  2299. -     if (u.age<s.age)
  2300. #       ok=0;
  2301. #     if ((s.ar!=0) && ((u.ar & s.ar)==0))
  2302. #       ok=0;
  2303. And insert this one line:
  2304. #     ok=1;
  2305. #     if (u.sl<s.readsl)
  2306. #       ok=0;
  2307. +     if (u.age<(s.age&0x7f))
  2308. #       ok=0;
  2309. #     if ((s.ar!=0) && ((u.ar & s.ar)==0))
  2310. #       ok=0;
  2311.  
  2312. Starting at line #573, delete this one line:
  2313. # }
  2314. - void vote()
  2315. # {
  2316. #   int i,i1,i2,f,map[21],mapp,abort,n,done;
  2317. #   char s[81],s1[81],s2[81],sodc[10],*ss;
  2318. And insert this one line:
  2319. # }
  2320. + void vote(void)
  2321. # {
  2322. #   int i,i1,i2,f,map[21],mapp,abort,n,done;
  2323. #   char s[81],s1[81],s2[81],sodc[10],*ss;
  2324.  
  2325.  
  2326. /*****************************************************************************/
  2327. modem.c:
  2328.  
  2329.  
  2330. Starting at line #204, delete this one line:
  2331. #     initport(syscfg.primaryport);
  2332. #     pr1(is);
  2333. #     dump();
  2334. -     if (mode_switch(10.0,0)==mode_norm) {
  2335. #       done=1;
  2336. #     } else {
  2337. #       ++i;
  2338. And insert this one line:
  2339. #     initport(syscfg.primaryport);
  2340. #     pr1(is);
  2341. #     dump();
  2342. +     if (mode_switch(5.0,0)==mode_norm) {
  2343. #       done=1;
  2344. #     } else {
  2345. #       ++i;
  2346.  
  2347. Starting at line #218, delete this one line:
  2348. # }
  2349. - void answer_phone()
  2350. # {
  2351. #   char ch,s[81],s1[81];
  2352. #   int i,i1;
  2353. And insert this one line:
  2354. # }
  2355. + void answer_phone(void)
  2356. # {
  2357. #   char ch,s[81],s1[81];
  2358. #   int i,i1;
  2359.  
  2360. Starting at line #231, add this one line:
  2361. #   if ((mode_switch(45.0,1)!=mode_con) && (modem_mode!=mode_fax)) {
  2362. #     if (modem_mode == 0) {
  2363. #       outcomch(' ');
  2364. +       outcomch('\r');
  2365. #       wait1(18);
  2366. #       if (fabs(timer()-d)<modem_time) {
  2367. #         outs("\r\nWaiting for modem...");
  2368.  
  2369. Starting at line #250, delete this one line:
  2370. #     if (!(modem_flag & flag_ec))
  2371. #       wait1(45);
  2372. #     else
  2373. -       wait1(2);
  2374. #   }
  2375. # }
  2376. And insert this one line:
  2377. #     if (!(modem_flag & flag_ec))
  2378. #       wait1(45);
  2379. #     else
  2380. +       wait1(18);
  2381. #   }
  2382. # }
  2383.  
  2384.  
  2385. /*****************************************************************************/
  2386. msgbase.c:
  2387.  
  2388.  
  2389. Starting at line #59, delete this one line:
  2390. # /****************************************************************************/
  2391. - static char origin_str[81];
  2392. # void setorigin(int sysnum, int usernum)
  2393. # {
  2394. And insert this one line:
  2395. # /****************************************************************************/
  2396. + static char origin_str[128];
  2397. # void setorigin(int sysnum, int usernum)
  2398. # {
  2399.  
  2400. Starting at line #64, delete this one line:
  2401. # void setorigin(int sysnum, int usernum)
  2402. # {
  2403. #   int i;
  2404. -   char s[81],ch;
  2405. #   net_system_list_rec *csne;
  2406. #   origin_str[0]=0;
  2407. And insert this one line:
  2408. # void setorigin(int sysnum, int usernum)
  2409. # {
  2410. #   int i;
  2411. +   char s[81],s1[81],ch;
  2412. #   net_system_list_rec *csne;
  2413. #   if (net_num_max>1)
  2414.  
  2415. Starting at line #66, add these 5 lines:
  2416. #   char s[81],s1[81],ch;
  2417. #   net_system_list_rec *csne;
  2418. +   if (net_num_max>1)
  2419. +     sprintf(s1,"%s - ",net_networks[net_num].name);
  2420. +   else
  2421. +     s1[0]=0;
  2422. #   origin_str[0]=0;
  2423. #   if (sysnum) {
  2424.  
  2425. Starting at line #84, delete this one line:
  2426. #       describe_area_code(atoi(csne->phone),s);
  2427. #       if (s[0])
  2428. -         sprintf(origin_str,"%c%s (%s) [%s]",ch,csne->name,s, csne->phone);
  2429. #       else
  2430. #         sprintf(origin_str,"%c%s [%s]",ch,csne->name,csne->phone);
  2431. And insert this one line:
  2432. #       describe_area_code(atoi(csne->phone),s);
  2433. #       if (s[0])
  2434. +         sprintf(origin_str,"%c%s%s (%s) [%s]",ch,s1,csne->name,s, csne->phone);
  2435. #       else
  2436. #         sprintf(origin_str,"%c%s%s [%s]",ch,s1,csne->name,csne->phone);
  2437.  
  2438. Starting at line #86, delete this one line:
  2439. #       if (s[0])
  2440. #         sprintf(origin_str,"%c%s (%s) [%s]",ch,csne->name,s, csne->phone);
  2441. #       else
  2442. -         sprintf(origin_str,"%c%s [%s]",ch,csne->name,csne->phone);
  2443. #     } else
  2444. And insert this one line:
  2445. #       if (s[0])
  2446. #         sprintf(origin_str,"%c%s%s (%s) [%s]",ch,s1,csne->name,s, csne->phone);
  2447. #       else
  2448. +         sprintf(origin_str,"%c%s%s [%s]",ch,s1,csne->name,csne->phone);
  2449. #     } else
  2450.  
  2451. Starting at line #90, delete this one line:
  2452. #     } else
  2453. -       strcpy(origin_str," Unknown System");
  2454. #   }
  2455. # }
  2456. And insert this one line:
  2457. #     } else
  2458. +       sprintf(origin_str," %sUnknown System",s1);
  2459. #   }
  2460. # }
  2461.  
  2462. Starting at line #95, delete this one line:
  2463. # }
  2464. - int okfsed()
  2465. # {
  2466. #   int ok;
  2467. And insert this one line:
  2468. # }
  2469. + int okfsed(void)
  2470. # {
  2471. #   int ok;
  2472.  
  2473. Starting at line #464, delete this one line:
  2474. # }
  2475. - void inmsg(messagerec *m1, char *title, int *anony, int needtitle, char *aux, int fsed)
  2476. # {
  2477. #   char s[LEN],s1[LEN],s2[LEN],ro[81],fnx[81],chx,*ss,*ss1;
  2478. #   int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon;
  2479. And insert this one line:
  2480. # }
  2481. + void inmsg(messagerec *m1, char *title, int *anony, int needtitle, char *aux, int fsed, char *dest, int flags)
  2482. # {
  2483. #   char s[LEN],s1[LEN],s2[LEN],ro[81],fnx[81],chx,*ss,*ss1;
  2484. #   int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon;
  2485.  
  2486. Starting at line #471, add these 2 lines:
  2487. #   long ll,l1;
  2488. #   char *lin, *b;
  2489. #   int real_name=0;
  2490. +   FILE *result;
  2491. +   struct {char tlen, ttl[81], anon; } fedit_data;
  2492. #   if ((fsed!=0) && (!okfsed()))
  2493. #     fsed=0;
  2494.  
  2495. Starting at line #667, delete this one line:
  2496. #       save=0;
  2497. #   } else {
  2498. #     if (fsed==1) {
  2499. -       save=external_edit("INPUT.MSG",syscfg.tempdir,(int) (thisuser.defed)-1,maxli);
  2500. #     } else {
  2501. #       save=exist(fnx);
  2502. #       if (save) {
  2503. And insert these 32 lines:
  2504. #       save=0;
  2505. #   } else {
  2506. #     if (fsed==1) {
  2507. +       fedit_data.tlen=60;
  2508. +       strcpy(fedit_data.ttl,title);
  2509. +       fedit_data.anon=0;
  2510. +       result=fopen("fedit.inf","wb");
  2511. +       if (result) {
  2512. +         fwrite(&fedit_data, sizeof(fedit_data), 1, result);
  2513. +         fclose(result);
  2514. +       }
  2515. +       save=external_edit("INPUT.MSG",syscfg.tempdir,(int) (thisuser.defed)-1,
  2516. +         maxli, dest, title, flags);
  2517. +       if (save) {
  2518. +         if ((result=fopen("result.ed","rt"))!=NULL) {
  2519. +           if (fgets(s,80,result)) {
  2520. +             ss=strchr(s,'\n');
  2521. +             if (ss) *ss=0;
  2522. +             setanon=atoi(s);
  2523. +             if (fgets(title,80,result)) {
  2524. +               ss=strchr(title,'\n');
  2525. +               if (ss) *ss=0;
  2526. +               fclose(result);
  2527. +             }
  2528. +           }
  2529. +         } else if ((result=fopen("fedit.inf","rb"))!=NULL) {
  2530. +           if (fread(&fedit_data, sizeof(fedit_data), 1, result)==1) {
  2531. +             strcpy(title,fedit_data.ttl);
  2532. +             setanon=fedit_data.anon;
  2533. +           }
  2534. +           fclose(result);
  2535. +         }
  2536. +       }
  2537. +       unlink("result.ed");
  2538. +       unlink("fedit.inf");
  2539. #     } else {
  2540. #       save=exist(fnx);
  2541. #       if (save) {
  2542.  
  2543. Starting at line #748, delete this one line:
  2544. #     if (real_name)
  2545. #       addline(b,thisuser.realname,&l1);
  2546. #     else
  2547. -       addline(b,nam1(&thisuser,usernum,syscfg.systemnumber),&l1);
  2548. #     time(&ll);
  2549. #     strcpy(s,ctime(&ll));
  2550. #     s[strlen(s)-1]=0;
  2551. And insert this one line:
  2552. #     if (real_name)
  2553. #       addline(b,thisuser.realname,&l1);
  2554. #     else
  2555. +       addline(b,nam1(&thisuser,usernum,net_sysnum),&l1);
  2556. #     time(&ll);
  2557. #     strcpy(s,ctime(&ll));
  2558. #     s[strlen(s)-1]=0;
  2559.  
  2560. Starting at line #811, add this one line:
  2561. #         return(0);
  2562. #       *u=ur.forwardusr;
  2563. #       *s=ur.forwardsys;
  2564. +       set_net_num(ur.net_num);
  2565. #       return(1);
  2566. #     } else {
  2567. #       *u=0;
  2568.  
  2569. Starting at line #842, add this one line:
  2570. #       *u=ur.forwardusr;
  2571. #       *s=ur.forwardsys;
  2572. #       farfree(ss);
  2573. +       set_net_num(ur.net_num);
  2574. #       return(1);
  2575. #     }
  2576. #     if (ss[cu]) {
  2577.  
  2578. Starting at line #873, delete this one line:
  2579. # }
  2580. - void sendout_email(char *title, messagerec *msg, int anony, unsigned un, unsigned sy, int an)
  2581. # {
  2582. #   mailrec m,m1;
  2583. #   net_header_rec nh;
  2584. And insert this one line:
  2585. # }
  2586. + void sendout_email(char *title, messagerec *msg, int anony, unsigned un, unsigned sy, int an, unsigned uf, unsigned sf, int fwd)
  2587. # {
  2588. #   mailrec m,m1;
  2589. #   net_header_rec nh;
  2590.  
  2591. Starting at line #884, add this one line:
  2592. #   strcpy(m.title, title);
  2593. #   m.msg=*msg;
  2594. #   m.anony=anony;
  2595. +   if (sf == net_sysnum)
  2596. #     m.fromsys=0;
  2597. #   else
  2598. #     m.fromsys=sf;
  2599.  
  2600. Starting at line #886, delete this one line:
  2601. #   m.msg=*msg;
  2602. #   m.anony=anony;
  2603. #   m.fromsys=0;
  2604. -   m.fromuser=usernum;
  2605. #   m.tosys=sy;
  2606. #   m.touser=un;
  2607. #   m.status=0;
  2608. And insert these 3 lines:
  2609. #   m.anony=anony;
  2610. #   if (sf == net_sysnum)
  2611. #     m.fromsys=0;
  2612. +   else
  2613. +     m.fromsys=sf;
  2614. +   m.fromuser=uf;
  2615. #   m.tosys=sy;
  2616. #   m.touser=un;
  2617. #   m.status=0;
  2618.  
  2619. Starting at line #926, delete these 2 lines:
  2620. #     remove_link(&(m.msg),"EMAIL");
  2621. #     nh.tosys=sy;
  2622. #     nh.touser=un;
  2623. -     nh.fromsys=syscfg.systemnumber;
  2624. -     nh.fromuser=usernum;
  2625. #     nh.main_type=main_type_email;
  2626. #     nh.minor_type=0;
  2627. #     nh.list_len=0;
  2628. And insert these 5 lines:
  2629. #     remove_link(&(m.msg),"EMAIL");
  2630. #     nh.tosys=sy;
  2631. #     nh.touser=un;
  2632. +     if (sf)
  2633. +       nh.fromsys=sf;
  2634. +     else
  2635. +       nh.fromsys=net_sysnum;
  2636. +     nh.fromuser=uf;
  2637. #     nh.main_type=main_type_email;
  2638. #     nh.minor_type=0;
  2639. #     nh.list_len=0;
  2640.  
  2641. Starting at line #951, delete this one line:
  2642. #       npr("Message truncated by %lu bytes for the network.\r\n",nh.length-32760L);
  2643. #       nh.length = 32760;
  2644. #     }
  2645. -     sprintf(s,"%sP0.NET",syscfg.datadir);
  2646. #     f=open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  2647. #     lseek(f,0L,SEEK_END);
  2648. #     write(f,(void *)&nh,sizeof(net_header_rec));
  2649. And insert these 4 lines:
  2650. #       npr("Message truncated by %lu bytes for the network.\r\n",nh.length-32760L);
  2651. #       nh.length = 32760;
  2652. #     }
  2653. +     if (fwd)
  2654. +       sprintf(s,"%sP1.NET",net_data);
  2655. +     else
  2656. +       sprintf(s,"%sP0.NET",net_data);
  2657. #     f=open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  2658. #     lseek(f,0L,SEEK_END);
  2659. #     write(f,(void *)&nh,sizeof(net_header_rec));
  2660.  
  2661. Starting at line #978, add this one line:
  2662. #       strcat(s,">UNKNOWN<");
  2663. #     }
  2664. #   } else {
  2665. +     if (net_num_max>1) {
  2666. #       if (un==0)
  2667. #         sprintf(s1,"%s %s @%u",net_name, net_email_name,sy);
  2668. #       else
  2669.  
  2670. Starting at line #979, add these 5 lines:
  2671. #   } else {
  2672. #     if (net_num_max>1) {
  2673. #       if (un==0)
  2674. +         sprintf(s1,"%s %s @%u",net_name, net_email_name,sy);
  2675. +       else
  2676. +         sprintf(s1,"%s %u @%u",net_name, un,sy);
  2677. +     } else {
  2678. +       if (un==0)
  2679. #         sprintf(s1,"%s @%u",net_email_name,sy);
  2680. #       else
  2681. #         sprintf(s1,"%u @%u",un,sy);
  2682.  
  2683. Starting at line #982, delete this one line:
  2684. #     if (un==0)
  2685. #       sprintf(s1,"%s @%u",net_email_name,sy);
  2686. #     else
  2687. -       sprintf(s1,"User %u @%u",un,sy);
  2688. #     strcat(s,s1);
  2689. #     sysoplog(s);
  2690. #   }
  2691. And insert these 2 lines:
  2692. #       if (un==0)
  2693. #         sprintf(s1,"%s @%u",net_email_name,sy);
  2694. #       else
  2695. +         sprintf(s1,"%u @%u",un,sy);
  2696. +     }
  2697. #     strcat(s,s1);
  2698. #     sysoplog(s);
  2699. #   }
  2700.  
  2701. Starting at line #1018, delete this one line:
  2702. #   slrec ss;
  2703. #   ss=syscfg.sl[actsl];
  2704. -   if ((sy!=0) && (syscfg.systemnumber==0)) {
  2705. #     nl();
  2706. #     pl("Sorry, this system is not a part of WWIVnet.");
  2707. #     nl();
  2708. And insert this one line:
  2709. #   slrec ss;
  2710. #   ss=syscfg.sl[actsl];
  2711. +   if ((sy!=0) && (net_sysnum==0)) {
  2712. #     nl();
  2713. #     pl("Sorry, this system is not a part of WWIVnet.");
  2714. #     nl();
  2715.  
  2716. Starting at line #1119, add this one line:
  2717. #     else
  2718. #       an=1;
  2719. #   if (sy==0) {
  2720. +     set_net_num(0);
  2721. #     if (an) {
  2722. #       read_user(un,&ur);
  2723. #       strcpy(s2,nam(&ur,un));
  2724.  
  2725. Starting at line #1125, add this one line:
  2726. #     } else
  2727. #       strcpy(s2,">UNKNOWN<");
  2728. #   } else {
  2729. +     if (net_num_max>1) {
  2730. #       if (un==0)
  2731. #         sprintf(s2,"%s %s @%u",net_name, net_email_name,sy);
  2732. #       else
  2733.  
  2734. Starting at line #1126, add these 5 lines:
  2735. #   } else {
  2736. #     if (net_num_max>1) {
  2737. #       if (un==0)
  2738. +         sprintf(s2,"%s %s @%u",net_name, net_email_name,sy);
  2739. +       else
  2740. +         sprintf(s2,"%s %u @%u",net_name, un,sy);
  2741. +     } else {
  2742. +       if (un==0)
  2743. #         sprintf(s2,"%s @%u",net_email_name,sy);
  2744. #       else
  2745. #         sprintf(s2,"%u @%u",un,sy);
  2746.  
  2747. Starting at line #1129, delete this one line:
  2748. #     if (un==0)
  2749. #       sprintf(s2,"%s @%u",net_email_name,sy);
  2750. #     else
  2751. -       sprintf(s2,"User %u @%u",un,sy);
  2752. #   }
  2753. #   npr("E-mailing %s\r\n",s2);
  2754. #   if (ss.ability & ability_email_anony)
  2755. And insert this one line:
  2756. #       if (un==0)
  2757. #         sprintf(s2,"%s @%u",net_email_name,sy);
  2758. #       else
  2759. +         sprintf(s2,"%u @%u",un,sy);
  2760. #     }
  2761. #   }
  2762. #   npr("E-mailing %s\r\n",s2);
  2763.  
  2764. Starting at line #1130, add this one line:
  2765. #       else
  2766. #         sprintf(s2,"%u @%u",un,sy);
  2767. #     }
  2768. +   }
  2769. #   npr("E-mailing %s\r\n",s2);
  2770. #   if (ss.ability & ability_email_anony)
  2771. #     i=anony_enable_anony;
  2772.  
  2773. Starting at line #1153, delete this one line:
  2774. #     nl();
  2775. #   }
  2776. #   msg.storage_type=EMAIL_STORAGE;
  2777. -   inmsg(&msg,t,&i,!forceit,"EMAIL",ALLOW_FULLSCREEN);
  2778. #   if (msg.stored_as==0xffffffff)
  2779. #     return;
  2780. #   if (anony & anony_sender)
  2781. And insert this one line:
  2782. #     nl();
  2783. #   }
  2784. #   msg.storage_type=EMAIL_STORAGE;
  2785. +   inmsg(&msg,t,&i,!forceit,"EMAIL",ALLOW_FULLSCREEN, s2, 0);
  2786. #   if (msg.stored_as==0xffffffff)
  2787. #     return;
  2788. #   if (anony & anony_sender)
  2789.  
  2790. Starting at line #1163, delete this one line:
  2791. #   if (anony & anony_sender_pp)
  2792. #     i|=anony_receiver_pp;
  2793. -   sendout_email(t, &msg, i, un, sy, an);
  2794. # }
  2795. And insert this one line:
  2796. #   if (anony & anony_sender_pp)
  2797. #     i|=anony_receiver_pp;
  2798. +   sendout_email(t, &msg, i, un, sy, an, usernum, net_sysnum, 0);
  2799. # }
  2800.  
  2801. Starting at line #1195, add this one line:
  2802. #     if (yn()==0)
  2803. #       i=0;
  2804. #   }
  2805. +   grab_quotes(NULL, NULL);
  2806. #   if (i)
  2807. #     email(u,s,0,0);
  2808. # }
  2809.  
  2810. Starting at line #1205, add these 10 lines:
  2811. #   int f;
  2812. #   char s[81];
  2813. +   if (subboards[usub[b].subnum].type) {
  2814. +     if (subboards[usub[b].subnum].age & 0x80) {
  2815. +       set_net_num(subboards[usub[b].subnum].name[40]);
  2816. +     } else {
  2817. +       set_net_num(0);
  2818. +     }
  2819. +   } else {
  2820. +     set_net_num(0);
  2821. +   }
  2822. #   if (usub[b].subnum==curlsub)
  2823. #     return;
  2824. #   curlsub=usub[b].subnum;
  2825.  
  2826. Starting at line #1261, delete this one line:
  2827. # }
  2828. - void savebase()
  2829. # {
  2830. #   int f;
  2831. #   char s[81];
  2832. And insert this one line:
  2833. # }
  2834. + void savebase(void)
  2835. # {
  2836. #   int f;
  2837. #   char s[81];
  2838.  
  2839.  
  2840. /*****************************************************************************/
  2841. msgbase1.c:
  2842.  
  2843.  
  2844. Starting at line #41, delete this one line:
  2845. #   unsigned int ui=0,ui1;
  2846. #   long len1,len2;
  2847. -   sprintf(s,"%sNNALL.NET", syscfg.datadir);
  2848. #   fi=fopen(s,"r");
  2849. #   if (fi) {
  2850. #     while (fgets(s,120,fi)) {
  2851. And insert this one line:
  2852. #   unsigned int ui=0,ui1;
  2853. #   long len1,len2;
  2854. +   sprintf(s,"%sNNALL.NET", net_data);
  2855. #   fi=fopen(s,"r");
  2856. #   if (fi) {
  2857. #     while (fgets(s,120,fi)) {
  2858.  
  2859. Starting at line #60, delete this one line:
  2860. #   }
  2861. #   if (!ui) {
  2862. -     sprintf(s,"%sNN%u.NET",syscfg.datadir,type);
  2863. #     f=open(s,O_RDONLY | O_BINARY);
  2864. #     if (f>0) {
  2865. #       len1=filelength(f);
  2866. And insert this one line:
  2867. #   }
  2868. #   if (!ui) {
  2869. +     sprintf(s,"%sNN%u.NET",net_data,type);
  2870. #     f=open(s,O_RDONLY | O_BINARY);
  2871. #     if (f>0) {
  2872. #       len1=filelength(f);
  2873.  
  2874. Starting at line #75, delete this one line:
  2875. #             ++len2;
  2876. #           if ((b[len2]>='0') && (b[len2]<='9') && (len2<len1)) {
  2877. #             ui=atoi(&(b[len2]));
  2878. -             if (ui==syscfg.systemnumber)
  2879. #               ui=0;
  2880. #             while ((len2<len1) && (b[len2]>='0') && (b[len2]<='9'))
  2881. #               ++len2;
  2882. And insert this one line:
  2883. #             ++len2;
  2884. #           if ((b[len2]>='0') && (b[len2]<='9') && (len2<len1)) {
  2885. #             ui=atoi(&(b[len2]));
  2886. +             if (ui==net_sysnum)
  2887. #               ui=0;
  2888. #             while ((len2<len1) && (b[len2]>='0') && (b[len2]<='9'))
  2889. #               ++len2;
  2890.  
  2891. Starting at line #111, delete this one line:
  2892. #   if (p -> ownersys)
  2893. #     nh.fromsys=p -> ownersys;
  2894. #   else
  2895. -     nh.fromsys =syscfg.systemnumber;
  2896. #   nh.fromuser=p -> owneruser;
  2897. #   nh.main_type=main_type_post;
  2898. #   nh.minor_type=type;
  2899. And insert this one line:
  2900. #   if (p -> ownersys)
  2901. #     nh.fromsys=p -> ownersys;
  2902. #   else
  2903. +     nh.fromsys =net_sysnum;
  2904. #   nh.fromuser=p -> owneruser;
  2905. #   nh.main_type=main_type_post;
  2906. #   nh.minor_type=type;
  2907.  
  2908. Starting at line #135, delete this one line:
  2909. #     farfree(b1);
  2910. #     return;
  2911. #   }
  2912. -   sprintf(s,"%sN%u.NET",syscfg.datadir,type);
  2913. #   f=open(s,O_RDONLY | O_BINARY);
  2914. #   if (f>0) {
  2915. #     len1=filelength(f);
  2916. And insert this one line:
  2917. #     farfree(b1);
  2918. #     return;
  2919. #   }
  2920. +   sprintf(s,"%sN%u.NET",net_data,type);
  2921. #   f=open(s,O_RDONLY | O_BINARY);
  2922. #   if (f>0) {
  2923. #     len1=filelength(f);
  2924.  
  2925. Starting at line #154, delete this one line:
  2926. #         ++len2;
  2927. #       if ((b[len2]>='0') && (b[len2]<='9') && (len2<len1)) {
  2928. #         i=atoi(&(b[len2]));
  2929. -         if ((i!=syscfg.systemnumber) && (i != p -> ownersys))
  2930. #           list[nh.list_len++]=i;
  2931. #         while ((len2<len1) && (b[len2]>='0') && (b[len2]<='9'))
  2932. #           ++len2;
  2933. And insert this one line:
  2934. #         ++len2;
  2935. #       if ((b[len2]>='0') && (b[len2]<='9') && (len2<len1)) {
  2936. #         i=atoi(&(b[len2]));
  2937. +         if ((i!=net_sysnum) && (i != p -> ownersys))
  2938. #           list[nh.list_len++]=i;
  2939. #         while ((len2<len1) && (b[len2]>='0') && (b[len2]<='9'))
  2940. #           ++len2;
  2941.  
  2942. Starting at line #181, delete this one line:
  2943. # /****************************************************************************/
  2944. - void post()
  2945. # {
  2946. #   messagerec m;
  2947. #   postrec p;
  2948. And insert this one line:
  2949. # /****************************************************************************/
  2950. + void post(void)
  2951. # {
  2952. #   messagerec m;
  2953. #   postrec p;
  2954.  
  2955. Starting at line #242, delete this one line:
  2956. #       nl();
  2957. #       return;
  2958. #     }
  2959. -     if (syscfg.systemnumber) {
  2960. #       nl();
  2961. #       pl("This post will go out on WWIVnet.");
  2962. #       nl();
  2963. And insert this one line:
  2964. #       nl();
  2965. #       return;
  2966. #     }
  2967. +     if (net_sysnum) {
  2968. #       nl();
  2969. #       npr("This post will go out on %s.\r\n",net_name);
  2970. #       nl();
  2971.  
  2972. Starting at line #244, delete this one line:
  2973. #     }
  2974. #     if (syscfg.systemnumber) {
  2975. #       nl();
  2976. -       pl("This post will go out on WWIVnet.");
  2977. #       nl();
  2978. #     }
  2979. #   }
  2980. And insert this one line:
  2981. #     }
  2982. #     if (net_sysnum) {
  2983. #       nl();
  2984. +       npr("This post will go out on %s.\r\n",net_name);
  2985. #       nl();
  2986. #     }
  2987. #   }
  2988.  
  2989. Starting at line #248, delete this one line:
  2990. #       nl();
  2991. #     }
  2992. #   }
  2993. -   inmsg(&m,p.title,&a,1,(subboards[curlsub].filename),ALLOW_FULLSCREEN);
  2994. #   if (m.stored_as!=0xffffffff) {
  2995. #     p.anony=a;
  2996. #     p.msg=m;
  2997. And insert these 2 lines:
  2998. #       nl();
  2999. #     }
  3000. #   }
  3001. +   inmsg(&m,p.title,&a,1,(subboards[curlsub].filename),ALLOW_FULLSCREEN,
  3002. +     subboards[curlsub].name, (subboards[curlsub].anony&anony_no_tag)?1:0);
  3003. #   if (m.stored_as!=0xffffffff) {
  3004. #     p.anony=a;
  3005. #     p.msg=m;
  3006.  
  3007. Starting at line #263, delete this one line:
  3008. #         p.status=status_unvalidated;
  3009. #       else
  3010. #         p.status=0;
  3011. -     if ((subboards[curlsub].type) && (syscfg.systemnumber) &&
  3012. #       (subboards[curlsub].anony & anony_val_net) && (!lcs() || irt[0])) {
  3013. #       p.status |= status_pending_net;
  3014. #       dm=1;
  3015. And insert this one line:
  3016. #         p.status=status_unvalidated;
  3017. #       else
  3018. #         p.status=0;
  3019. +     if ((subboards[curlsub].type) && (net_sysnum) &&
  3020. #       (subboards[curlsub].anony & anony_val_net) && (!lcs() || irt[0])) {
  3021. #       p.status |= status_pending_net;
  3022. #       dm=1;
  3023.  
  3024. Starting at line #302, delete this one line:
  3025. #     sprintf(s,"Posted on %s",subboards[curlsub].name);
  3026. #     save_status();
  3027. #     pl(s);
  3028. -     if ((subboards[curlsub].type) && (syscfg.systemnumber)) {
  3029. #       ++thisuser.postnet;
  3030. #       if (!(p.status & status_pending_net))
  3031. #         send_net_post(&p, subboards[curlsub].type, subboards[curlsub].filename);
  3032. And insert this one line:
  3033. #     sprintf(s,"Posted on %s",subboards[curlsub].name);
  3034. #     save_status();
  3035. #     pl(s);
  3036. +     if ((subboards[curlsub].type) && (net_sysnum)) {
  3037. #       ++thisuser.postnet;
  3038. #       if (!(p.status & status_pending_net))
  3039. #         send_net_post(&p, subboards[curlsub].type, subboards[curlsub].filename);
  3040.  
  3041. Starting at line #406, add these 9 lines:
  3042. #   }
  3043. #   do {
  3044. #     tleft(1);
  3045. +     if (subboards[curlsub].type) {
  3046. +       if (subboards[curlsub].age & 0x80) {
  3047. +         set_net_num(subboards[curlsub].name[40]);
  3048. +       } else {
  3049. +         set_net_num(0);
  3050. +       }
  3051. +     } else {
  3052. +       set_net_num(0);
  3053. +     }
  3054. #     switch(optype) {
  3055. #       case 0: /* Read Prompt */
  3056. #         sprintf(s,"Read:(1-%u,^%u),? :",nummsgs,msgnum);
  3057.  
  3058. Starting at line #457, add this one line:
  3059. #               case 'A':
  3060. #                 if ((msgs[msgnum].ownersys) && (!msgs[msgnum].owneruser))
  3061. #                   grab_user_name(&(msgs[msgnum].msg),subboards[curlsub].filename);
  3062. +                 grab_quotes(&(msgs[msgnum].msg),subboards[curlsub].filename);
  3063. #                 ss=syscfg.sl[actsl];
  3064. #                 if ((lcs()) || (ss.ability & ability_read_post_anony) || (msgs[msgnum].anony==0))
  3065. #                   email(msgs[msgnum].owneruser,msgs[msgnum].ownersys,0,0);
  3066.  
  3067. Starting at line #462, add this one line:
  3068. #                   email(msgs[msgnum].owneruser,msgs[msgnum].ownersys,0,0);
  3069. #                 else
  3070. #                   email(msgs[msgnum].owneruser,msgs[msgnum].ownersys,0,msgs[msgnum].anony);
  3071. +                 grab_quotes(NULL, NULL);
  3072. #                 break;
  3073. #               case 'P':
  3074. #                 irt[0]=0;
  3075.  
  3076. Starting at line #468, add this one line:
  3077. #                 irt_name[0]=0;
  3078. #               case 'W':
  3079. #                 deleted_flag=0;
  3080. +                 grab_quotes(&(msgs[msgnum].msg),subboards[curlsub].filename);
  3081. #                 post();
  3082. #                 if (deleted_flag && (deleted_flag<=msgnum))
  3083. #                   --msgnum;
  3084.  
  3085. Starting at line #471, add this one line:
  3086. #                 post();
  3087. #                 if (deleted_flag && (deleted_flag<=msgnum))
  3088. #                   --msgnum;
  3089. +                 grab_quotes(NULL, NULL);
  3090. #                 break;
  3091. #               case '?':
  3092. #         if (lcs())
  3093.  
  3094. Starting at line #564, delete this one line:
  3095. #           i=-1;
  3096. #           if (ss1[0]==0)
  3097. #             break;
  3098. -                   for (i1=0; i1<MAX_SUBS; i1++)
  3099. #                     if (strcmp(usub[i1].keys,ss1)==0)
  3100. #                       i=i1;
  3101. #                   if (i!=-1) {
  3102. And insert this one line:
  3103. #           i=-1;
  3104. #           if (ss1[0]==0)
  3105. #             break;
  3106. +                   for (i1=0; (i1<max_subs) && (usub[i1].subnum!=-1); i1++)
  3107. #                     if (strcmp(usub[i1].keys,ss1)==0)
  3108. #                       i=i1;
  3109. #                   if (i!=-1) {
  3110.  
  3111. Starting at line #605, add these 18 lines:
  3112. #           }
  3113. #         }
  3114. #         break;
  3115. +               case 'L':
  3116. +                 if (!so())
  3117. +                   break;
  3118. +                 nl();
  3119. +                 prt(2,"Filename? ");
  3120. +                 input(s,50);
  3121. +                 if (s[0]) {
  3122. +                   nl();
  3123. +                   prt(5,"Allow editing? ");
  3124. +                   if (yn()) {
  3125. +                     nl();
  3126. +                     load_workspace(s,0);
  3127. +                   } else {
  3128. +                     nl();
  3129. +                     load_workspace(s,1);
  3130. +                   }
  3131. +                 }
  3132. +                 break;
  3133. # /*************/
  3134. #             }
  3135. #       } else {
  3136.  
  3137. Starting at line #710, add this one line:
  3138. #       prt(5,s);
  3139. #       irt[0]=0;
  3140. #       irt_name[0]=0;
  3141. +       grab_quotes(NULL, NULL);
  3142. #       if (yn())
  3143. #         post();
  3144. #     }
  3145.  
  3146. Starting at line #777, delete this one line:
  3147. #   nextsub=1;
  3148. #   prt(3,"<< Q-Scan All >>");
  3149. #   nl();
  3150. -   for (i=ss; (usub[i].subnum!=-1) && (i<MAX_SUBS) && (nextsub) && (!hangup); i++) {
  3151. # #if MAX_SUBS>32
  3152. #     if (((usub[i].subnum<32) && (thisuser.qscn & (1L<<(usub[i].subnum)))) ||
  3153. #         ((usub[i].subnum>=32) && (thisuser.qscn2 & (1L<<(usub[i].subnum-32)))))
  3154. And insert this one line:
  3155. #   nextsub=1;
  3156. #   prt(3,"<< Q-Scan All >>");
  3157. #   nl();
  3158. +   for (i=ss; (usub[i].subnum!=-1) && (i<max_subs) && (nextsub) && (!hangup); i++) {
  3159. # #if MAX_SUBS>32
  3160. #     if (((usub[i].subnum<32) && (thisuser.qscn & (1L<<(usub[i].subnum)))) ||
  3161. #         ((usub[i].subnum>=32) && (thisuser.qscn2 & (1L<<(usub[i].subnum-32)))))
  3162.  
  3163. Starting at line #799, delete this one line:
  3164. #     nscanall();
  3165. # }
  3166. - void scan2()
  3167. # {
  3168. #   char s[81];
  3169. #   int i,i1;
  3170. And insert this one line:
  3171. #     nscanall();
  3172. # }
  3173. + void scan2(void)
  3174. # {
  3175. #   char s[81];
  3176. #   int i,i1;
  3177.  
  3178. Starting at line #927, add these 3 lines:
  3179. #   int i;
  3180. #   mailrec m;
  3181. +   if (m1->fromuser==65535)
  3182. +     return;
  3183. #   ansic(5);
  3184. #   if ((m1->anony & anony_sender) && ((ss->ability & ability_read_email_anony)==0)) {
  3185. #     npr("Delete all mail to you from this user? ");
  3186.  
  3187. Starting at line #957, delete this one line:
  3188. # }
  3189. - void readmail()
  3190. # {
  3191. #   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail;
  3192. #   unsigned short x,xx;
  3193. And insert this one line:
  3194. # }
  3195. + void readmail(void)
  3196. # {
  3197. #   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail,tp,nn;
  3198. #   unsigned short x,xx;
  3199.  
  3200. Starting at line #959, delete this one line:
  3201. # void readmail()
  3202. # {
  3203. -   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail;
  3204. #   unsigned short x,xx;
  3205. #   char s[81],s1[81],s2[81],fn[81],*b;
  3206. #   mailrec m;
  3207. And insert this one line:
  3208. # void readmail(void)
  3209. # {
  3210. +   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail,tp,nn;
  3211. #   unsigned short x,xx;
  3212. #   char s[81],s1[81],s2[81],fn[81],*b,*ss1;
  3213. #   mailrec m;
  3214.  
  3215. Starting at line #961, delete this one line:
  3216. # {
  3217. #   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail;
  3218. #   unsigned short x,xx;
  3219. -   char s[81],s1[81],s2[81],fn[81],*b;
  3220. #   mailrec m;
  3221. #   slrec ss;
  3222. #   userrec u;
  3223. And insert this one line:
  3224. # {
  3225. #   int i,i1,i2,i3,f,mw,mloc[256],mfl,curmail,done,abort,next,okmail,tp,nn;
  3226. #   unsigned short x,xx;
  3227. +   char s[81],s1[81],s2[81],fn[81],*b,*ss1;
  3228. #   mailrec m;
  3229. #   slrec ss;
  3230. #   userrec u;
  3231.  
  3232. Starting at line #967, add this one line:
  3233. #   char ch;
  3234. #   long len,num_mail,num_mail1;
  3235. #   unsigned short un, sy;
  3236. +   net_system_list_rec *csne;
  3237. #   ss=syscfg.sl[actsl];
  3238. #   sprintf(fn,"%sEMAIL.DAT",syscfg.datadir);
  3239.  
  3240. Starting at line #1006, add these 11 lines:
  3241. #     for (i=0; i<mw; i++) {
  3242. #       lseek(f,((long) mloc[i]) * sizeof(mailrec),SEEK_SET);
  3243. #       read(f,(void *) (&m),sizeof(mailrec));
  3244. +       tp=80;
  3245. +       if (m.status & status_source_verified)
  3246. +         tp -= 2;
  3247. +       if (m.status & status_new_net) {
  3248. +         tp -= 1;
  3249. +         if (strlen(m.title)<=tp) {
  3250. +           nn=m.title[tp+1];
  3251. +         } else
  3252. +           nn=0;
  3253. +       } else
  3254. +         nn=0;
  3255. #       sprintf(s,"%d. ",i+1);
  3256. #       if ((m.anony & anony_sender) && ((ss.ability & ability_read_email_anony)==0)) {
  3257. #         strcat(s,">UNKNOWN<");
  3258.  
  3259. Starting at line #1013, delete this one line:
  3260. #       } else {
  3261. #         if (m.fromsys==0) {
  3262. #       if (m.fromuser==65535)
  3263. -         strcat(s,"WWIVnet");
  3264. #       else {
  3265. #             read_user(m.fromuser,&u);
  3266. #             strcat(s,nam(&u,m.fromuser));
  3267. And insert this one line:
  3268. #       } else {
  3269. #         if (m.fromsys==0) {
  3270. #       if (m.fromuser==65535)
  3271. +             strcat(s,net_networks[nn].name);
  3272. #       else {
  3273. #             read_user(m.fromuser,&u);
  3274. #             strcat(s,nam(&u,m.fromuser));
  3275.  
  3276. Starting at line #1019, delete this one line:
  3277. #             strcat(s,nam(&u,m.fromuser));
  3278. #       }
  3279. #         } else {
  3280. -           sprintf(s1,"User %u @%u",m.fromuser,m.fromsys);
  3281. #           strcat(s,s1);
  3282. #         }
  3283. #       }
  3284. And insert these 11 lines:
  3285. #             strcat(s,nam(&u,m.fromuser));
  3286. #       }
  3287. #         } else {
  3288. +           set_net_num(nn);
  3289. +           csne=next_system(m.fromsys);
  3290. +           if (csne)
  3291. +             ss1=csne->name;
  3292. +           else
  3293. +             ss1="Unknown System";
  3294. +           if (net_num_max>1)
  3295. +             sprintf(s1,"%s #%u @%u (%s)",
  3296. +               net_networks[nn].name,m.fromuser,m.fromsys,ss1);
  3297. +           else
  3298. +             sprintf(s1,"User %u @%u (%s)",m.fromuser,m.fromsys,ss1);
  3299. #           strcat(s,s1);
  3300. #         }
  3301. #       }
  3302.  
  3303. Starting at line #1081, delete this one line:
  3304. #           grab_user_name(&(m.msg),"EMAIL");
  3305. #         else
  3306. #           net_email_name[0]=0;
  3307. -         setorigin(m.fromsys, m.fromuser);
  3308. #         if (m.status & status_source_verified) {
  3309. #           if (strlen(m.title)<=78) {
  3310. #             xx=*(short *) (m.title+79);
  3311. And insert this one line:
  3312. #           grab_user_name(&(m.msg),"EMAIL");
  3313. #         else
  3314. #           net_email_name[0]=0;
  3315. +         tp=80;
  3316. #         if (m.status & status_source_verified) {
  3317. #           tp -= 2;
  3318. #           if (strlen(m.title)<=tp) {
  3319.  
  3320. Starting at line #1083, delete these 2 lines:
  3321. #           net_email_name[0]=0;
  3322. #         setorigin(m.fromsys, m.fromuser);
  3323. #         if (m.status & status_source_verified) {
  3324. -           if (strlen(m.title)<=78) {
  3325. -             xx=*(short *) (m.title+79);
  3326. #             sprintf(s,"-=-=: Type %u Source Verified",xx);
  3327. #             if (xx==1) {
  3328. #               strcat(s," (From NC)");
  3329. And insert these 3 lines:
  3330. #           net_email_name[0]=0;
  3331. #         tp=80;
  3332. #         if (m.status & status_source_verified) {
  3333. +           tp -= 2;
  3334. +           if (strlen(m.title)<=tp) {
  3335. +             xx=*(short *) (m.title+tp+1);
  3336. #             sprintf(s,"-=-=: Type %u Source Verified",xx);
  3337. #             if (xx==1) {
  3338. #               strcat(s," (From NC)");
  3339.  
  3340. Starting at line #1099, add these 10 lines:
  3341. #             pla(s,&abort);
  3342. #           }
  3343. #         }
  3344. +         if (m.status & status_new_net) {
  3345. +           tp -= 1;
  3346. +           if (strlen(m.title)<=tp) {
  3347. +             nn=m.title[tp+1];
  3348. +           } else
  3349. +             nn=0;
  3350. +         } else
  3351. +           nn=0;
  3352. +         set_net_num(nn);
  3353. +         setorigin(m.fromsys, m.fromuser);
  3354. #         if (!abort)
  3355. #           read_message1(&m.msg, (m.anony & 0x0f), i, &next, "EMAIL");
  3356. #       }
  3357.  
  3358. Starting at line #1104, add this one line:
  3359. #       }
  3360. #     }
  3361. #     do {
  3362. +       set_net_num(nn);
  3363. #       i2=1;
  3364. #       irt_name[0]=0;
  3365. #       prt(2,"Mail {?} : ");
  3366.  
  3367. Starting at line #1113, delete this one line:
  3368. #     ch=onek("QI?-+G");
  3369. #       else
  3370. #         if (so())
  3371. -             ch=onek("QSRIDAF?-+GEZPVUOL");
  3372. #         else
  3373. #           if (cs())
  3374. #             ch=onek("QSRIDAF?-+GZPVUO");
  3375. And insert this one line:
  3376. #     ch=onek("QI?-+G");
  3377. #       else
  3378. #         if (so())
  3379. +             ch=onek("QSRIDAF?-+GEZPVUOLC");
  3380. #         else
  3381. #           if (cs())
  3382. #             ch=onek("QSRIDAF?-+GZPVUOC");
  3383.  
  3384. Starting at line #1116, delete this one line:
  3385. #             ch=onek("QSRIDAF?-+GEZPVUOL");
  3386. #         else
  3387. #           if (cs())
  3388. -             ch=onek("QSRIDAF?-+GZPVUO");
  3389. #           else
  3390. #             ch=onek("QSRIDAF?+-G");
  3391. #       switch (ch) {
  3392. And insert this one line:
  3393. #             ch=onek("QSRIDAF?-+GEZPVUOLC");
  3394. #         else
  3395. #           if (cs())
  3396. +             ch=onek("QSRIDAF?-+GZPVUOC");
  3397. #           else
  3398. #             ch=onek("QSRIDAF?+-G");
  3399. #       switch (ch) {
  3400.  
  3401. Starting at line #1141, add this one line:
  3402. #               num_mail=((long) thisuser.feedbacksent) +
  3403. #                        ((long) thisuser.emailsent) +
  3404. #                        ((long) thisuser.emailnet);
  3405. +               grab_quotes(NULL, NULL);
  3406. #               if (m.fromuser!=65535)
  3407. #                 email(m.fromuser,m.fromsys,0,m.anony);
  3408. #               f=open(fn,O_RDWR | O_BINARY);
  3409.  
  3410. Starting at line #1150, delete this one line:
  3411. #                         ((long) thisuser.emailnet);
  3412. #               if (num_mail != num_mail1) {
  3413. -                 strcpy(s,nam1(&thisuser,usernum,syscfg.systemnumber));
  3414. #                 if (m.anony & anony_receiver)
  3415. #                   strcpy(s,">UNKNOWN<");
  3416. #                 strcat(s," read your mail on ");
  3417. And insert this one line:
  3418. #                         ((long) thisuser.emailnet);
  3419. #               if (num_mail != num_mail1) {
  3420. +                 strcpy(s,nam1(&thisuser,usernum,net_sysnum));
  3421. #                 if (m.anony & anony_receiver)
  3422. #                   strcpy(s,">UNKNOWN<");
  3423. #                 strcat(s," read your mail on ");
  3424.  
  3425. Starting at line #1206, delete this one line:
  3426. #         case 'D':
  3427. #       if (!okmail)
  3428. #         break;
  3429. -           strcpy(s,nam1(&thisuser,usernum,syscfg.systemnumber));
  3430. #       if (m.anony & anony_receiver)
  3431. #         strcpy(s,">UNKNOWN<");
  3432. #           strcat(s," read your mail on ");
  3433. And insert this one line:
  3434. #         case 'D':
  3435. #       if (!okmail)
  3436. #         break;
  3437. +           strcpy(s,nam1(&thisuser,usernum,net_sysnum));
  3438. #       if (m.anony & anony_receiver)
  3439. #         strcpy(s,">UNKNOWN<");
  3440. #           strcat(s," read your mail on ");
  3441.  
  3442. Starting at line #1256, add this one line:
  3443. #             }
  3444. #             if (un || sy) {
  3445. #               if (sy) {
  3446. +                 if (net_num_max>1) {
  3447. #                   if (un) {
  3448. #                     sprintf(s1,"%s #%u @%u",net_name, un, sy);
  3449. #                   } else {
  3450.  
  3451. Starting at line #1258, delete this one line:
  3452. #             if (un || sy) {
  3453. #               if (sy) {
  3454. #                 if (un) {
  3455. -                   sprintf(s1,"#%u @%u",un, sy);
  3456. #                 } else {
  3457. #                   sprintf(s1,"%s @%u",net_email_name, sy);
  3458. #                 }
  3459. And insert this one line:
  3460. #               if (sy) {
  3461. #                 if (net_num_max>1) {
  3462. #                   if (un) {
  3463. +                     sprintf(s1,"%s #%u @%u",net_name, un, sy);
  3464. #                   } else {
  3465. #                     sprintf(s1,"%s %s @%u",net_name, net_email_name, sy);
  3466. #                   }
  3467.  
  3468. Starting at line #1260, delete this one line:
  3469. #                 if (un) {
  3470. #                   sprintf(s1,"#%u @%u",un, sy);
  3471. #                 } else {
  3472. -                   sprintf(s1,"%s @%u",net_email_name, sy);
  3473. #                 }
  3474. #               } else {
  3475. #                 read_user(un,&u);
  3476. And insert this one line:
  3477. #                   if (un) {
  3478. #                     sprintf(s1,"%s #%u @%u",net_name, un, sy);
  3479. #                   } else {
  3480. +                     sprintf(s1,"%s %s @%u",net_name, net_email_name, sy);
  3481. #                   }
  3482. #                 } else {
  3483. #                   if (un) {
  3484.  
  3485. Starting at line #1262, add these 7 lines:
  3486. #                     sprintf(s1,"%s %s @%u",net_name, net_email_name, sy);
  3487. #                   }
  3488. #                 } else {
  3489. +                   if (un) {
  3490. +                     sprintf(s1,"#%u @%u", un, sy);
  3491. +                   } else {
  3492. +                     sprintf(s1,"%s @%u", net_email_name, sy);
  3493. +                   }
  3494. +                 }
  3495. +               } else {
  3496. #                 read_user(un,&u);
  3497. #                 strcpy(s1,nam1(&u,un,net_sysnum));
  3498. #               }
  3499.  
  3500. Starting at line #1264, delete this one line:
  3501. #                 }
  3502. #               } else {
  3503. #                 read_user(un,&u);
  3504. -                 strcpy(s1,nam1(&u,un,syscfg.systemnumber));
  3505. #               }
  3506. #               if (ok_to_mail(un, sy, 0)) {
  3507. #                 sprintf(s,"Forward to %s? ",s1);
  3508. And insert this one line:
  3509. #                 }
  3510. #               } else {
  3511. #                 read_user(un,&u);
  3512. +                 strcpy(s1,nam1(&u,un,net_sysnum));
  3513. #               }
  3514. #               if (ok_to_mail(un, sy, 0)) {
  3515. #                 sprintf(s,"Forward to %s? ",s1);
  3516.  
  3517. Starting at line #1269, add these 2 lines:
  3518. #                 sprintf(s,"Forward to %s? ",s1);
  3519. #                 prt(5,s);
  3520. #                 if (yn()) {
  3521. +                   i=net_num;
  3522. +                   set_net_num(nn);
  3523. #                   sprintf(s,"\r\nForwarded from: %s",
  3524. #                       nam1(&thisuser,usernum,net_sysnum));
  3525. #                   lineadd(&m.msg,s,"EMAIL");
  3526.  
  3527. Starting at line #1271, delete this one line:
  3528. #                 prt(5,s);
  3529. #                 if (yn()) {
  3530. #                   sprintf(s,"\r\nForwarded from: %s",
  3531. -                       nam1(&thisuser,usernum,syscfg.systemnumber));
  3532. #                   lineadd(&m.msg,s,"EMAIL");
  3533. #                   sprintf(s,"%s forwarded your mail to %s",
  3534. #                       nam1(&thisuser,usernum,syscfg.systemnumber),s1);
  3535. And insert this one line:
  3536. #                   i=net_num;
  3537. #                   set_net_num(nn);
  3538. #                   sprintf(s,"\r\nForwarded from: %s",
  3539. +                       nam1(&thisuser,usernum,net_sysnum));
  3540. #                   lineadd(&m.msg,s,"EMAIL");
  3541. #                   sprintf(s,"%s forwarded your mail to %s",
  3542. #                       nam1(&thisuser,usernum,net_sysnum),s1);
  3543.  
  3544. Starting at line #1274, delete this one line:
  3545. #                       nam1(&thisuser,usernum,syscfg.systemnumber));
  3546. #                   lineadd(&m.msg,s,"EMAIL");
  3547. #                   sprintf(s,"%s forwarded your mail to %s",
  3548. -                       nam1(&thisuser,usernum,syscfg.systemnumber),s1);
  3549. #                   if (!(m.status & status_source_verified))
  3550. #                     ssm(m.fromuser,m.fromsys,s);
  3551. #                   sysoplog("Forwarded mail.");
  3552. And insert this one line:
  3553. #                       nam1(&thisuser,usernum,net_sysnum));
  3554. #                   lineadd(&m.msg,s,"EMAIL");
  3555. #                   sprintf(s,"%s forwarded your mail to %s",
  3556. +                       nam1(&thisuser,usernum,net_sysnum),s1);
  3557. #                   if (!(m.status & status_source_verified))
  3558. #                     ssm(m.fromuser,m.fromsys,s);
  3559. #                   set_net_num(i);
  3560.  
  3561. Starting at line #1276, add this one line:
  3562. #                       nam1(&thisuser,usernum,net_sysnum),s1);
  3563. #                   if (!(m.status & status_source_verified))
  3564. #                     ssm(m.fromuser,m.fromsys,s);
  3565. +                   set_net_num(i);
  3566. #                   sysoplog("Forwarded mail.");
  3567. #                   --thisuser.waiting;
  3568. #                   if (usernum==1)
  3569.  
  3570. Starting at line #1282, delete this one line:
  3571. #                   if (usernum==1)
  3572. #                     --fwaiting;
  3573. #                   outstr("Forwarding: ");
  3574. -                   sendout_email(m.title, &m.msg, m.anony, un, sy, 1);
  3575. #                   m.touser=0;
  3576. #                   m.tosys=0;
  3577. #                   m.daten=0xffffffff;
  3578. And insert these 6 lines:
  3579. #                   if (usernum==1)
  3580. #                     --fwaiting;
  3581. #                   outstr("Forwarding: ");
  3582. +                   close(f);
  3583. +                   if ((nn != net_num) && (m.fromsys))
  3584. +                     sendout_email(m.title, &m.msg, m.anony, un, sy, 1, usernum, net_sysnum, 1);
  3585. +                   else
  3586. +                     sendout_email(m.title, &m.msg, m.anony, un, sy, 1, m.fromuser, m.fromsys, 1);
  3587. +                   f=open(fn,O_RDWR | O_BINARY);
  3588. #                   m.touser=0;
  3589. #                   m.tosys=0;
  3590. #                   m.daten=0xffffffff;
  3591.  
  3592. Starting at line #1310, delete this one line:
  3593. #           num_mail=((long) thisuser.feedbacksent) +
  3594. #                    ((long) thisuser.emailsent) +
  3595. #                    ((long) thisuser.emailnet);
  3596. -       if (m.fromuser!=65535)
  3597. #             email(m.fromuser,m.fromsys,0,m.anony);
  3598. #           f=open(fn,O_RDWR | O_BINARY);
  3599. #           num_mail1=((long) thisuser.feedbacksent) +
  3600. And insert these 2 lines:
  3601. #           num_mail=((long) thisuser.feedbacksent) +
  3602. #                    ((long) thisuser.emailsent) +
  3603. #                    ((long) thisuser.emailnet);
  3604. +           if (m.fromuser!=65535) {
  3605. +             grab_quotes(&(m.msg),"EMAIL");
  3606. #             email(m.fromuser,m.fromsys,0,m.anony);
  3607. #             grab_quotes(NULL, NULL);
  3608. #           }
  3609.  
  3610. Starting at line #1311, add these 2 lines:
  3611. #           if (m.fromuser!=65535) {
  3612. #             grab_quotes(&(m.msg),"EMAIL");
  3613. #             email(m.fromuser,m.fromsys,0,m.anony);
  3614. +             grab_quotes(NULL, NULL);
  3615. +           }
  3616. #           f=open(fn,O_RDWR | O_BINARY);
  3617. #           num_mail1=((long) thisuser.feedbacksent) +
  3618. #                     ((long) thisuser.emailsent) +
  3619.  
  3620. Starting at line #1318, delete this one line:
  3621. #                     ((long) thisuser.emailnet);
  3622. #           if (ch=='A') {
  3623. #             if (num_mail!=num_mail1) {
  3624. -               strcpy(s,nam1(&thisuser,usernum,syscfg.systemnumber));
  3625. #               if (m.anony & anony_receiver)
  3626. #                 strcpy(s,">UNKNOWN<");
  3627. #               strcat(s," read your mail on ");
  3628. And insert this one line:
  3629. #                     ((long) thisuser.emailnet);
  3630. #           if (ch=='A') {
  3631. #             if (num_mail!=num_mail1) {
  3632. +               strcpy(s,nam1(&thisuser,usernum,net_sysnum));
  3633. #               if (m.anony & anony_receiver)
  3634. #                 strcpy(s,">UNKNOWN<");
  3635. #               strcat(s," read your mail on ");
  3636.  
  3637. Starting at line #1349, add this one line:
  3638. #           break;
  3639. #         case 'U':
  3640. #         case 'V':
  3641. +         case 'C':
  3642. #       if (!okmail)
  3643. #         break;
  3644. #           if ((m.fromsys==0) && (cs()) && (m.fromuser!=65535))
  3645.  
  3646. Starting at line #1355, delete this one line:
  3647. #           if ((m.fromsys==0) && (cs()) && (m.fromuser!=65535))
  3648. #             if (ch=='V')
  3649. #               valuser(m.fromuser);
  3650. -             else
  3651. #               uedit(m.fromuser,0);
  3652. #       else
  3653. #         if (cs()) {
  3654. And insert this one line:
  3655. #           if ((m.fromsys==0) && (cs()) && (m.fromuser!=65535))
  3656. #             if (ch=='V')
  3657. #               valuser(m.fromuser);
  3658. +             else if (ch=='U')
  3659. #               uedit(m.fromuser,0);
  3660. #             else
  3661. #               uedit(m.fromuser,3);
  3662.  
  3663. Starting at line #1357, add these 2 lines:
  3664. #             else if (ch=='U')
  3665. #               uedit(m.fromuser,0);
  3666. #             else
  3667. +               uedit(m.fromuser,3);
  3668. +       else
  3669. #         if (cs()) {
  3670. #           nl();
  3671. #           pl("Mail from another system.");
  3672.  
  3673. Starting at line #1381, add this one line:
  3674. #               load_workspace(s,1);
  3675. #             }
  3676. #           }
  3677. +           break;
  3678. #       }
  3679. #     } while ((!i2) && (!hangup));
  3680. #   } while ((!hangup) && (!done));
  3681.  
  3682. Starting at line #1389, delete this one line:
  3683. # }
  3684. - void remove_post()
  3685. # {
  3686. #   int i,i1,any,abort;
  3687. #   char s[161];
  3688. And insert this one line:
  3689. # }
  3690. + void remove_post(void)
  3691. # {
  3692. #   int i,i1,any,abort;
  3693. #   char s[161];
  3694.  
  3695. Starting at line #1438, delete this one line:
  3696. - int external_edit(char *fn1, char *direc, int ednum, int numlines)
  3697. # {
  3698. #   char s[255],s1[128],fn[128],s2[128],s3[81],sx1[21],sx2[21],sx3[21],ch;
  3699. #   int i,i1,i2,r,w,filethere,mod,newtl;
  3700. And insert this one line:
  3701. + int external_edit(char *fn1, char *direc, int ednum, int numlines, char *dest, char *title, int flags)
  3702. # {
  3703. #   char s[255],s1[128],fn[128],s2[128],s3[81],sx1[21],sx2[21],sx3[21],ch;
  3704. #   int i,i1,i2,r,w,filethere,mod,newtl;
  3705.  
  3706. Starting at line #1442, add this one line:
  3707. #   char s[255],s1[128],fn[128],s2[128],s3[81],sx1[21],sx2[21],sx3[21],ch;
  3708. #   int i,i1,i2,r,w,filethere,mod,newtl;
  3709. #   struct ftime ftimep,ftimep1;
  3710. +   FILE *f;
  3711. #   unlink("editor.inf");
  3712. #   unlink("result.ed");
  3713.  
  3714. Starting at line #1443, add these 3 lines:
  3715. #   struct ftime ftimep,ftimep1;
  3716. #   FILE *f;
  3717. +   unlink("editor.inf");
  3718. +   unlink("result.ed");
  3719. #   if ((ednum>=numed) || (!okansi())) {
  3720. #     nl();
  3721. #     pl("You can't use that full screen editor.");
  3722.  
  3723. Starting at line #1490, add these 25 lines:
  3724. #     itoa(defscreenbottom+1-newtl,sx2,10);
  3725. #   itoa(numlines,sx3,10);
  3726. #   stuff_in(s,s1,fn,sx1,sx2,sx3,"");
  3727. +   if ((f=fopen("EDITOR.INF","wt"))!=NULL) {
  3728. +     fprintf(f,"%s\n%s\n%u\n%s\n%s\n%u\n%u\n%u\n",
  3729. +       title,
  3730. +       dest,
  3731. +       usernum,
  3732. +       thisuser.name,
  3733. +       thisuser.realname,
  3734. +       thisuser.sl,
  3735. +       flags,
  3736. +       topline);
  3737. +     fclose(f);
  3738. +   }
  3739. +   if (flags&1) {
  3740. +     /* disable tag lines */
  3741. +     f=fopen("disable.tag","w");
  3742. +     if (f) fclose(f);
  3743. +   } else {
  3744. +     unlink("disable.tag");
  3745. +   }
  3746. +   if (!irt[0]) {
  3747. +     unlink("quotes.txt");
  3748. +     unlink("quotes.ind");
  3749. +   }
  3750. +   in_fsed=1;
  3751. #   full_external(s,0,1);
  3752. #   in_fsed=0;
  3753. #   unlink("editor.inf");
  3754.  
  3755. Starting at line #1491, add these 5 lines:
  3756. #   in_fsed=1;
  3757. #   full_external(s,0,1);
  3758. +   in_fsed=0;
  3759. +   unlink("editor.inf");
  3760. +   unlink("disable.tag");
  3761. +   unlink("quotes.txt");
  3762. +   unlink("quotes.ind");
  3763. #   if (!wfc)
  3764. #     topscreen();
  3765. #   mod=0;
  3766.  
  3767. Starting at line #1509, add these 119 lines:
  3768. #       mod=1;
  3769. #   }
  3770. #   return(mod);
  3771. + }
  3772. + #define LINELEN 79
  3773. + #define NL {if (!cp) fwrite(pfx,1,pfxlen,f);fwrite("\r\n",1,2,f); cp=ns=ctlc=0;}
  3774. + #define FLSH {if (ss1) { if (cp && (l3+cp>=LINELEN)) NL else if (ns) cp+=fwrite(" ",1,1,f);\
  3775. +               if (!cp) {if (ctld) fprintf(f,"\004%c",ctld);ctld=0;cp=fwrite(pfx,1,pfxlen,f);}\
  3776. +               fwrite(ss1,1,l2,f); cp+=l3; ss1=NULL;l2=l3=0;ns=1;}}
  3777. + void grab_quotes(messagerec *m, char *aux)
  3778. + {
  3779. +   char *ss,*ss1;
  3780. +   long l,l1,l2,l3;
  3781. +   FILE *f;
  3782. +   char *pfx="> ";
  3783. +   int cp=0,ctla=0,ctlc=0,ns=0,ctld=0,ff;
  3784. +   int pfxlen=strlen(pfx);
  3785. +   unlink("quotes.txt");
  3786. +   unlink("quotes.ind");
  3787. +   if (quotes_nrm)
  3788. +     farfree(quotes_nrm);
  3789. +   if (quotes_ind)
  3790. +     farfree(quotes_ind);
  3791. +   quotes_nrm=quotes_ind=NULL;
  3792. +   quotes_nrm_l=quotes_ind_l=0;
  3793. +   if (m && aux) {
  3794. +     ss=readfile(m, aux, &l);
  3795. +     if (ss) {
  3796. +       quotes_nrm=ss;
  3797. +       quotes_nrm_l=l;
  3798. +       f=fopen("quotes.txt", "wb");
  3799. +       if (f) {
  3800. +         fwrite(ss, 1, l, f);
  3801. +         fclose(f);
  3802. +       }
  3803. +       f=fopen("quotes.ind", "wb");
  3804. +       if (f) {
  3805. +         l3=l2=0;
  3806. +         ss1=NULL;
  3807. +         for (l1=0; l1<l; l1++) {
  3808. +           if (ctld==-1)
  3809. +             ctld=ss[l1];
  3810. +           else switch(ss[l1]) {
  3811. +             case 1:
  3812. +               ctla=1;
  3813. +               break;
  3814. +             case 2:
  3815. +               break;
  3816. +             case 3:
  3817. +               if (!ss1)
  3818. +                 ss1=ss+l1;
  3819. +               l2++;
  3820. +               ctlc=1;
  3821. +               break;
  3822. +             case 4:
  3823. +               ctld=-1;
  3824. +               break;
  3825. +             case '\n':
  3826. +               if (ctla) {
  3827. +                 ctla=0;
  3828. +               } else {
  3829. +                 FLSH;
  3830. +                 NL;
  3831. +               }
  3832. +               break;
  3833. +             case ' ':
  3834. +             case '\r':
  3835. +               if (ss1) {
  3836. +                 FLSH;
  3837. +               } else {
  3838. +                 if (ss[l1]==' ') {
  3839. +                   if (cp+1>=LINELEN)
  3840. +                     NL;
  3841. +                   if (!cp) {
  3842. +                     if (ctld)
  3843. +                       fprintf(f,"\004%c",ctld);
  3844. +                     ctld=0;
  3845. +                     cp=fwrite(pfx,1,pfxlen,f);
  3846. +                   }
  3847. +                   cp++;
  3848. +                   fwrite(" ",1,1,f);
  3849. +                 }
  3850. +               }
  3851. +               break;
  3852. +             default:
  3853. +               if (!ss1)
  3854. +                 ss1=ss+l1;
  3855. +               l2++;
  3856. +               if (ctlc)
  3857. +                 ctlc=0;
  3858. +               else
  3859. +                 l3++;
  3860. +               break;
  3861. +           }
  3862. +         }
  3863. +         FLSH;
  3864. +         if (cp)
  3865. +           fwrite("\r\n",1,2,f);
  3866. +         fclose(f);
  3867. +         ff=open("quotes.ind",O_RDONLY|O_BINARY);
  3868. +         if (ff>0) {
  3869. +           quotes_ind_l=filelength(ff);
  3870. +           quotes_ind=(char *)farmalloc(quotes_ind_l);
  3871. +           if (quotes_ind) {
  3872. +             read(ff,quotes_ind, quotes_ind_l);
  3873. +           } else
  3874. +             quotes_ind_l=0;
  3875. +           close(ff);
  3876. +         }
  3877. +       }
  3878. +     }
  3879. +   }
  3880. # }
  3881.  
  3882.  
  3883. /*****************************************************************************/
  3884. multmail.c:
  3885.  
  3886.  
  3887. Starting at line #54, delete this one line:
  3888. #   m.msg.storage_type=EMAIL_STORAGE;
  3889. #   strcpy(irt,"Multi-Mail");
  3890. #   irt_name[0]=0;
  3891. -   inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);
  3892. #   if (m.msg.stored_as==0xffffffff)
  3893. #     return;
  3894. #   strcpy(m.title,t);
  3895. And insert these 2 lines:
  3896. #   m.msg.storage_type=EMAIL_STORAGE;
  3897. #   strcpy(irt,"Multi-Mail");
  3898. #   irt_name[0]=0;
  3899. +   unlink("quotes.txt");
  3900. +   inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN, "Multi-Mail", 0);
  3901. #   if (m.msg.stored_as==0xffffffff)
  3902. #     return;
  3903. #   strcpy(m.title,t);
  3904.  
  3905. Starting at line #136, delete this one line:
  3906. # int mml_started;
  3907. - int oneuser()
  3908. # {
  3909. #   char s[81],*ss;
  3910. #   unsigned short un,sn,i;
  3911. And insert this one line:
  3912. # int mml_started;
  3913. + int oneuser(void)
  3914. # {
  3915. #   char s[81],*ss;
  3916. #   unsigned short un,sn,i;
  3917.  
  3918. Starting at line #160, delete this one line:
  3919. #     prt(2,">");
  3920. #     input(s,40);
  3921. #   }
  3922. -   un=finduser(s);
  3923. #   if (un==65535)
  3924. #     return(-1);
  3925. #   if (s[0]==0)
  3926. And insert this one line:
  3927. #     prt(2,">");
  3928. #     input(s,40);
  3929. #   }
  3930. +   un=finduser1(s);
  3931. #   if (un==65535)
  3932. #     return(-1);
  3933. #   if (s[0]==0)
  3934.  
  3935. Starting at line #248, delete this one line:
  3936. # #define MAX_LIST 40
  3937. - void slash_e()
  3938. # {
  3939. #   int un[MAX_LIST],numu,done,i,i1,f1;
  3940. #   char s[81],s1[81],ch,*sss;
  3941. And insert this one line:
  3942. # #define MAX_LIST 40
  3943. + void slash_e(void)
  3944. # {
  3945. #   int un[MAX_LIST],numu,done,i,i1,f1;
  3946. #   char s[81],s1[81],ch,*sss;
  3947.  
  3948.  
  3949.  
  3950. /*****************************************************************************/
  3951. newuser.c:
  3952.  
  3953.  
  3954. Starting at line #80, delete this one line:
  3955. #   return(ok);
  3956. # }
  3957. - void input_name()
  3958. # {
  3959. #   int ok,count;
  3960. And insert this one line:
  3961. #   return(ok);
  3962. # }
  3963. + void input_name(void)
  3964. # {
  3965. #   int ok,count;
  3966.  
  3967. Starting at line #107, delete this one line:
  3968. #   } while ((!ok) && (!hangup));
  3969. # }
  3970. - void input_realname()
  3971. # {
  3972. #   do {
  3973. #     nl();
  3974. And insert this one line:
  3975. #   } while ((!ok) && (!hangup));
  3976. # }
  3977. + void input_realname(void)
  3978. # {
  3979. #   do {
  3980. #     nl();
  3981.  
  3982. Starting at line #131, delete this one line:
  3983. #   } while ((thisuser.realname[0]==0) && (!hangup));
  3984. # }
  3985. - void input_callsign()
  3986. # {
  3987. #   nl();
  3988. #   ansic(3);
  3989. And insert this one line:
  3990. #   } while ((thisuser.realname[0]==0) && (!hangup));
  3991. # }
  3992. + void input_callsign(void)
  3993. # {
  3994. #   nl();
  3995. #   ansic(3);
  3996.  
  3997. Starting at line #143, delete this one line:
  3998. #   input(thisuser.callsign,6);
  3999. # }
  4000. - void input_phone()
  4001. # {
  4002. #   int ok,i;
  4003. And insert this one line:
  4004. #   input(thisuser.callsign,6);
  4005. # }
  4006. + void input_phone(void)
  4007. # {
  4008. #   int ok,i;
  4009.  
  4010. Starting at line #181, delete this one line:
  4011. #   } while ((!ok) && (!hangup));
  4012. # }
  4013. - void input_sex()
  4014. # {
  4015. #   nl();
  4016. #   prt(2,"Your gender (M,F) :");
  4017. And insert this one line:
  4018. #   } while ((!ok) && (!hangup));
  4019. # }
  4020. + void input_sex(void)
  4021. # {
  4022. #   nl();
  4023. #   prt(2,"Your gender (M,F) :");
  4024.  
  4025. Starting at line #241, delete this one line:
  4026. #   nl();
  4027. # }
  4028. - void input_comptype()
  4029. # {
  4030. #   int i,ok,ct;
  4031. #   char c[5];
  4032. And insert this one line:
  4033. #   nl();
  4034. # }
  4035. + void input_comptype(void)
  4036. # {
  4037. #   int i,ok,ct;
  4038. #   char c[5];
  4039.  
  4040. Starting at line #274, delete this one line:
  4041. #     thisuser.comp_type=0;
  4042. # }
  4043. - void input_screensize()
  4044. # {
  4045. #   int ok,x,y;
  4046. #   char s[5];
  4047. And insert this one line:
  4048. #     thisuser.comp_type=0;
  4049. # }
  4050. + void input_screensize(void)
  4051. # {
  4052. #   int ok,x,y;
  4053. #   char s[5];
  4054.  
  4055. Starting at line #318, delete this one line:
  4056. #   screenlinest=y;
  4057. # }
  4058. - void input_pw()
  4059. # {
  4060. #   int ok;
  4061. #   char s[81];
  4062. And insert this one line:
  4063. #   screenlinest=y;
  4064. # }
  4065. + void input_pw(void)
  4066. # {
  4067. #   int ok;
  4068. #   char s[81];
  4069.  
  4070. Starting at line #342, delete this one line:
  4071. # }
  4072. - void input_ansistat()
  4073. # {
  4074. #   int i,c,c2;
  4075. #   char ch;
  4076. And insert this one line:
  4077. # }
  4078. + void input_ansistat(void)
  4079. # {
  4080. #   int i,c,c2;
  4081. #   char ch;
  4082.  
  4083. Starting at line #387, delete this one line:
  4084. # }
  4085. - void newuser()
  4086. # {
  4087. #   int i,ok;
  4088. #   char s[255],s1[81],ch;
  4089. And insert this one line:
  4090. # }
  4091. + void newuser(void)
  4092. # {
  4093. #   int i,ok;
  4094. #   char s[255],s1[81],ch;
  4095.  
  4096. Starting at line #601, add this one line:
  4097. #         sl1(0,"#Aborted FEEDBACK.MSG");
  4098. #       sprintf(irt,"Validation Feedback (%d slots left)",syscfg.maxusers-status.users);
  4099. #       irt_name[0]=0;
  4100. +       grab_quotes(NULL, NULL);
  4101. #       email(1,0,1,0);
  4102. #     }
  4103. #     if (syscfg.newuser_c[0]) {
  4104.  
  4105.  
  4106. /*****************************************************************************/
  4107. return.c:
  4108.  
  4109.  
  4110. Starting at line #36, delete these 12 lines:
  4111. # void far *funcs[25];
  4112. # /****************************************************************************/
  4113. - void ansic(int n);
  4114. - unsigned char getkey();
  4115. - char inkey();
  4116. - void pausescr();
  4117. - void backspace();
  4118. - void nl();
  4119. - void outstr(char *s);
  4120. - void outchr(char c);
  4121. - void checkhangup();
  4122. - void outcomch(char ch);
  4123. - long timer1();
  4124. # void checka(int *abort, int *next);
  4125. # /****************************************************************************/
  4126. # char *xenviron[50],newprompt[161];
  4127. And insert these 5 lines:
  4128. # void far *funcs[25];
  4129. # /****************************************************************************/
  4130. + void my_video_int(void);
  4131. + int okansi(void);
  4132. + void wait1(long l);
  4133. + void setbeep(int i);
  4134. + void pla(char *s, int *abort);
  4135. # void checka(int *abort, int *next);
  4136. # void inli(char *s, char *rollover, int maxlen, int crend);
  4137. # long timer1(void);
  4138.  
  4139. Starting at line #48, add these 62 lines:
  4140. # void setbeep(int i);
  4141. # void pla(char *s, int *abort);
  4142. # void checka(int *abort, int *next);
  4143. + void inli(char *s, char *rollover, int maxlen, int crend);
  4144. + long timer1(void);
  4145. + void movecsr(int x,int y);
  4146. + int wherex(void);
  4147. + int wherey(void);
  4148. + void lf(void);
  4149. + void cr(void);
  4150. + void clrscrb(void);
  4151. + void bs(void);
  4152. + void out1chx(unsigned char ch);
  4153. + void out1ch(unsigned char ch);
  4154. + void far interrupt async_isr(void);
  4155. + void outcomch(char ch);
  4156. + char get1c(void);
  4157. + int comhit(void);
  4158. + void dump(void);
  4159. + void set_baud(unsigned int rate);
  4160. + void initport(int portnum);
  4161. + void closeport(void);
  4162. + int cdet(void);
  4163. + void checkhangup(void);
  4164. + void addto(char *s, int i);
  4165. + void makeansi(unsigned char attr, char *s, int forceit);
  4166. + void setfgc(int i);
  4167. + void setbgc(int i);
  4168. + void execute_ansi(void);
  4169. + void outchr(char c);
  4170. + void outstr(char *s);
  4171. + void nl(void);
  4172. + void backspace(void);
  4173. + void setc(unsigned char ch);
  4174. + void pausescr(void);
  4175. + void pl(char *s);
  4176. + int kbhitb(void);
  4177. + int empty(void);
  4178. + void skey1(char *ch);
  4179. + char getchd(void);
  4180. + char getchd1(void);
  4181. + char inkey(void);
  4182. + void mpl(int i);
  4183. + char upcase(char ch);
  4184. + unsigned char getkey(void);
  4185. + void input1(char *s, int maxlen, int lc, int crend);
  4186. + void input(char *s, int len);
  4187. + void inputl(char *s, int len);
  4188. + int yn(void);
  4189. + int ny(void);
  4190. + void ansic(int n);
  4191. + char onek(char *s);
  4192. + void prt(int i, char *s);
  4193. + unsigned char getkeyext(void);
  4194. + int do_it(char *cl);
  4195. + int do_remote(char *s, int ccc);
  4196. + void checka2(void);
  4197. + void outdosstr(char *s);
  4198. + int full_external(char *s, int ccc);
  4199. + int init_r(void);
  4200. + void get_dir(char *s, int be);
  4201. + void cd_to(char *s);
  4202. + void setup_stuff(void);
  4203. + void main(int argc, char *argv[]);
  4204. # /****************************************************************************/
  4205. # char *xenviron[50],newprompt[161];
  4206. # char ver_no1[51], ver_no2[51];
  4207.  
  4208. Starting at line #85, delete this one line:
  4209. # /****************************************************************************/
  4210. - void my_video_int()
  4211. # {
  4212. # #if __TURBOC__ >= 0x0200
  4213. #   /* TC 2.0 or TC++ here */
  4214. And insert this one line:
  4215. # /****************************************************************************/
  4216. + void my_video_int(void)
  4217. # {
  4218. # #if __TURBOC__ >= 0x0200
  4219. #   /* TC 2.0 or TC++ here */
  4220.  
  4221. Starting at line #105, delete this one line:
  4222. # /****************************************************************************/
  4223. - int okansi()
  4224. # /* This function checks the status of the current user's record to see if
  4225. #  * the user has specified that he wants ANSI graphics displayed.
  4226. #  */
  4227. And insert this one line:
  4228. # /****************************************************************************/
  4229. + int okansi(void)
  4230. # /* This function checks the status of the current user's record to see if
  4231. #  * the user has specified that he wants ANSI graphics displayed.
  4232. #  */
  4233.  
  4234. Starting at line #335, delete this one line:
  4235. - long timer1()
  4236. # /* This function returns the time, in seconds since midnight. */
  4237. # {
  4238. #   unsigned short h,m;
  4239. And insert this one line:
  4240. + long timer1(void)
  4241. # /* This function returns the time, in seconds since midnight. */
  4242. # {
  4243. #   unsigned short h,m;
  4244.  
  4245. Starting at line #381, delete this one line:
  4246. - int wherex()
  4247. # /* This function returns the current X cursor position, as the number of
  4248. #  * characters from the left hand side of the screen.  An X position of zero
  4249. #  * means the cursor is at the left-most position
  4250. And insert this one line:
  4251. + int wherex(void)
  4252. # /* This function returns the current X cursor position, as the number of
  4253. #  * characters from the left hand side of the screen.  An X position of zero
  4254. #  * means the cursor is at the left-most position
  4255.  
  4256. Starting at line #396, delete this one line:
  4257. - int wherey()
  4258. # /* This function returns the Y cursor position, as the line number from
  4259. #  * the top of the logical window.  The offset due to the protected top
  4260. #  * of the screen display is taken into account.  A wherey() of zero means
  4261. And insert this one line:
  4262. + int wherey(void)
  4263. # /* This function returns the Y cursor position, as the line number from
  4264. #  * the top of the logical window.  The offset due to the protected top
  4265. #  * of the screen display is taken into account.  A wherey() of zero means
  4266.  
  4267. Starting at line #412, delete this one line:
  4268. - void lf()
  4269. # /* This function performs a linefeed to the screen (but not remotely) by
  4270. #  * either moving the cursor down one line, or scrolling the logical screen
  4271. #  * up one line.
  4272. And insert this one line:
  4273. + void lf(void)
  4274. # /* This function performs a linefeed to the screen (but not remotely) by
  4275. #  * either moving the cursor down one line, or scrolling the logical screen
  4276. #  * up one line.
  4277.  
  4278. Starting at line #439, delete this one line:
  4279. - void cr()
  4280. # /* This short function returns the local cursor to the left-most position
  4281. #  * on the screen.
  4282. #  */
  4283. And insert this one line:
  4284. + void cr(void)
  4285. # /* This short function returns the local cursor to the left-most position
  4286. #  * on the screen.
  4287. #  */
  4288.  
  4289. Starting at line #452, delete this one line:
  4290. #   my_video_int();
  4291. # }
  4292. - void clrscrb()
  4293. # /* This clears the local logical screen */
  4294. # {
  4295. #   SCROLL_UP(topline,screenbottom,0);
  4296. And insert this one line:
  4297. #   my_video_int();
  4298. # }
  4299. + void clrscrb(void)
  4300. # /* This clears the local logical screen */
  4301. # {
  4302. #   SCROLL_UP(topline,screenbottom,0);
  4303.  
  4304. Starting at line #462, delete this one line:
  4305. - void bs()
  4306. # /* This function moves the cursor one position to the left, or if the cursor
  4307. #  * is currently at its left-most position, the cursor is moved to the end of
  4308. #  * the previous line, except if it is on the top line, in which case nothing
  4309. And insert this one line:
  4310. + void bs(void)
  4311. # /* This function moves the cursor one position to the left, or if the cursor
  4312. #  * is currently at its left-most position, the cursor is moved to the end of
  4313. #  * the previous line, except if it is on the top line, in which case nothing
  4314.  
  4315. Starting at line #563, delete this one line:
  4316. # /****************************************************************************/
  4317. - void far interrupt async_isr ()
  4318. # /* This function is called every time a char is received on the com port.
  4319. #  * The character is stored in the buffer[] array, and the head pointer is
  4320. #  * updated.
  4321. And insert this one line:
  4322. # /****************************************************************************/
  4323. + void far interrupt async_isr(void)
  4324. # /* This function is called every time a char is received on the com port.
  4325. #  * The character is stored in the buffer[] array, and the head pointer is
  4326. #  * updated.
  4327.  
  4328. Starting at line #591, delete this one line:
  4329. - char get1c()
  4330. # /* This function returns one character from the com port, or a zero if
  4331. #  * no character is waiting
  4332. #  */
  4333. And insert this one line:
  4334. + char get1c(void)
  4335. # /* This function returns one character from the com port, or a zero if
  4336. #  * no character is waiting
  4337. #  */
  4338.  
  4339. Starting at line #611, delete this one line:
  4340. - int comhit()
  4341. # /* This returns a value telling if there is a character waiting in the com
  4342. #  * buffer.
  4343. #  */
  4344. And insert this one line:
  4345. + int comhit(void)
  4346. # /* This returns a value telling if there is a character waiting in the com
  4347. #  * buffer.
  4348. #  */
  4349.  
  4350. Starting at line #621, delete this one line:
  4351. - void dump()
  4352. # /* This function clears the com buffer */
  4353. # {
  4354. #   disable();
  4355. And insert this one line:
  4356. + void dump(void)
  4357. # /* This function clears the com buffer */
  4358. # {
  4359. #   disable();
  4360.  
  4361. Starting at line #674, delete this one line:
  4362. - void closeport()
  4363. # /* This function closes out the com port, removing the interrupt routine,
  4364. #  * etc.
  4365. #  */
  4366. And insert this one line:
  4367. + void closeport(void)
  4368. # /* This function closes out the com port, removing the interrupt routine,
  4369. #  * etc.
  4370. #  */
  4371.  
  4372. Starting at line #692, delete this one line:
  4373. # }
  4374. - int cdet()
  4375. # /* This returns the status of the carrier detect lead from the modem */
  4376. # {
  4377. #   return((inportb(base + 6) & 0x80) ? 1 : 0);
  4378. And insert this one line:
  4379. # }
  4380. + int cdet(void)
  4381. # /* This returns the status of the carrier detect lead from the modem */
  4382. # {
  4383. #   return((inportb(base + 6) & 0x80) ? 1 : 0);
  4384.  
  4385. Starting at line #700, delete this one line:
  4386. - void checkhangup()
  4387. # /* This function checks to see if the user logged on to the com port has
  4388. #  * hung up.  Obviously, if no user is logged on remotely, this does nothing.
  4389. #  * If carrier detect is detected to be low, it is checked 100 times
  4390. And insert this one line:
  4391. + void checkhangup(void)
  4392. # /* This function checks to see if the user logged on to the com port has
  4393. #  * hung up.  Obviously, if no user is logged on remotely, this does nothing.
  4394. #  * If carrier detect is detected to be low, it is checked 100 times
  4395.  
  4396. Starting at line #791, delete this one line:
  4397. # }
  4398. - void execute_ansi()
  4399. # /* This function executes an ANSI string to change color, position the
  4400. #  * cursor, etc.
  4401. #  */
  4402. And insert this one line:
  4403. # }
  4404. + void execute_ansi(void)
  4405. # /* This function executes an ANSI string to change color, position the
  4406. #  * cursor, etc.
  4407. #  */
  4408.  
  4409. Starting at line #965, delete this one line:
  4410. - void nl()
  4411. # /* This function performs a CR/LF sequence to move the cursor to the next
  4412. #  * line.  If any end-of-line ANSI codes are set (such as changing back to
  4413. #  * the default color) are specified, those are executed first.
  4414. And insert this one line:
  4415. + void nl(void)
  4416. # /* This function performs a CR/LF sequence to move the cursor to the next
  4417. #  * line.  If any end-of-line ANSI codes are set (such as changing back to
  4418. #  * the default color) are specified, those are executed first.
  4419.  
  4420. Starting at line #980, delete this one line:
  4421. - void backspace()
  4422. # /* This function executes a backspace, space, backspace sequence. */
  4423. # {
  4424. #   int i;
  4425. And insert this one line:
  4426. + void backspace(void)
  4427. # /* This function executes a backspace, space, backspace sequence. */
  4428. # {
  4429. #   int i;
  4430.  
  4431. Starting at line #1006, delete this one line:
  4432. - void pausescr()
  4433. # /* This will pause output, displaying the [PAUSE] message, and wait for
  4434. #  * a key to be hit.
  4435. #  */
  4436. And insert this one line:
  4437. + void pausescr(void)
  4438. # /* This will pause output, displaying the [PAUSE] message, and wait for
  4439. #  * a key to be hit.
  4440. #  */
  4441.  
  4442. Starting at line #1038, delete this one line:
  4443. # }
  4444. - int kbhitb()
  4445. # {
  4446. #   union REGS r;
  4447. And insert this one line:
  4448. # }
  4449. + int kbhitb(void)
  4450. # {
  4451. #   union REGS r;
  4452.  
  4453. Starting at line #1048, delete this one line:
  4454. # }
  4455. - int empty()
  4456. # {
  4457. #   if (kbhitb() || (incom && (head != tail)) ||
  4458. #       (charbufferpointer && charbuffer[charbufferpointer]) ||
  4459. And insert this one line:
  4460. # }
  4461. + int empty(void)
  4462. # {
  4463. #   if (kbhitb() || (incom && (head != tail)) ||
  4464. #       (charbufferpointer && charbuffer[charbufferpointer]) ||
  4465.  
  4466. Starting at line #1087, delete this one line:
  4467. #   *ch = c;
  4468. # }
  4469. - char getchd()
  4470. # {
  4471. #   union REGS r;
  4472. And insert this one line:
  4473. #   *ch = c;
  4474. # }
  4475. + char getchd(void)
  4476. # {
  4477. #   union REGS r;
  4478.  
  4479. Starting at line #1097, delete this one line:
  4480. # }
  4481. - char getchd1()
  4482. # {
  4483. #   union REGS r;
  4484. And insert this one line:
  4485. # }
  4486. + char getchd1(void)
  4487. # {
  4488. #   union REGS r;
  4489.  
  4490. Starting at line #1108, delete this one line:
  4491. # }
  4492. - char inkey()
  4493. # /* This function checks both the local keyboard, and the remote terminal
  4494. #  * (if any) for input.  If there is input, the key is returned.  If there
  4495. #  * is no input, a zero is returned.  Function keys hit are interpreted as
  4496. And insert this one line:
  4497. # }
  4498. + char inkey(void)
  4499. # /* This function checks both the local keyboard, and the remote terminal
  4500. #  * (if any) for input.  If there is input, the key is returned.  If there
  4501. #  * is no input, a zero is returned.  Function keys hit are interpreted as
  4502.  
  4503. Starting at line #1175, delete this one line:
  4504. # }
  4505. - unsigned char getkey()
  4506. # /* This function returns one character from either the local keyboard or
  4507. #  * remote com port (if applicable).  After 1.5 minutes of inactivity, a
  4508. #  * beep is sounded.  After 3 minutes of inactivity, the user is hung up.
  4509. And insert this one line:
  4510. # }
  4511. + unsigned char getkey(void)
  4512. # /* This function returns one character from either the local keyboard or
  4513. #  * remote com port (if applicable).  After 1.5 minutes of inactivity, a
  4514. #  * beep is sounded.  After 3 minutes of inactivity, the user is hung up.
  4515.  
  4516. Starting at line #1286, delete this one line:
  4517. - int yn()
  4518. # /* The keyboard is checked for either a Y, N, or C/R to be hit.  C/R is
  4519. #  * assumed to be the same as a N.  Yes or No is output, and yn is set to
  4520. #  * zero if No was returned, and yn() is non-zero if Y was hit.
  4521. And insert this one line:
  4522. + int yn(void)
  4523. # /* The keyboard is checked for either a Y, N, or C/R to be hit.  C/R is
  4524. #  * assumed to be the same as a N.  Yes or No is output, and yn is set to
  4525. #  * zero if No was returned, and yn() is non-zero if Y was hit.
  4526.  
  4527. Starting at line #1304, delete this one line:
  4528. - int ny()
  4529. # /* This is the same as yn(), except C/R is assumed to be "Y" */
  4530. # {
  4531. #   char ch=0;
  4532. And insert this one line:
  4533. + int ny(void)
  4534. # /* This is the same as yn(), except C/R is assumed to be "Y" */
  4535. # {
  4536. #   char ch=0;
  4537.  
  4538. Starting at line #1535, delete this one line:
  4539. # /****************************************************************************/
  4540. - unsigned char getkeyext()
  4541. # {
  4542. #   unsigned char ch;
  4543. #   static int holding=0;
  4544. And insert this one line:
  4545. # /****************************************************************************/
  4546. + unsigned char getkeyext(void)
  4547. # {
  4548. #   unsigned char ch;
  4549. #   static int holding=0;
  4550.  
  4551. Starting at line #1635, delete this one line:
  4552. # long ca_d1;
  4553. - void checka2()
  4554. # {
  4555. #   ca_pause=0;
  4556. #   ca_ctrl_c=0;
  4557. And insert this one line:
  4558. # long ca_d1;
  4559. + void checka2(void)
  4560. # {
  4561. #   ca_pause=0;
  4562. #   ca_ctrl_c=0;
  4563.  
  4564. Starting at line #1926, delete this one line:
  4565. # #define READ(x) read(i,&(x),sizeof(x))
  4566. - int init_r()
  4567. # {
  4568. #   int i;
  4569. And insert this one line:
  4570. # #define READ(x) read(i,&(x),sizeof(x))
  4571. + int init_r(void)
  4572. # {
  4573. #   int i;
  4574.  
  4575. Starting at line #2007, delete this one line:
  4576. #     setdisk(s[0]-'A');
  4577. # }
  4578. - void setup_stuff()
  4579. # {
  4580. #   char s[161];
  4581. #   int i,i1;
  4582. And insert this one line:
  4583. #     setdisk(s[0]-'A');
  4584. # }
  4585. + void setup_stuff(void)
  4586. # {
  4587. #   char s[161];
  4588. #   int i,i1;
  4589.  
  4590.  
  4591. /*****************************************************************************/
  4592. shrink.c:
  4593.  
  4594.  
  4595. Starting at line #189, add these 23 lines:
  4596. # /****************************************************************************/
  4597. + char *findit(char *cmd,char *ext)
  4598. + {
  4599. +   char *ss;
  4600. +   static char s[81];
  4601. +   if (ext)
  4602. +     sprintf(s,"%s.%s",cmd,ext);
  4603. +   else
  4604. +     strcpy(s,cmd);
  4605. +   if (exist(s))
  4606. +     return(s);
  4607. +   if (strchr(s,'/') || strchr(s,'\\'))
  4608. +     ss=NULL;
  4609. +   else
  4610. +     ss=searchpath(s);
  4611. +   return(ss);
  4612. + }
  4613. + /****************************************************************************/
  4614. # void do_it_1(char *cl)
  4615. # {
  4616. #   int i,i1,l,sp;
  4617.  
  4618. Starting at line #192, delete these 2 lines:
  4619. # void do_it_1(char *cl)
  4620. # {
  4621. -   int i,i1,l;
  4622. -   char *ss,*ss1;
  4623. #   char t[81];
  4624. #   sl1(1,"");
  4625. And insert these 2 lines:
  4626. # void do_it_1(char *cl)
  4627. # {
  4628. +   int i,i1,l,sp;
  4629. +   char *ss,*ss1,*ss2;
  4630. #   char t[81];
  4631. #   sl1(1,"");
  4632.  
  4633. Starting at line #210, delete this one line:
  4634. #   close_user();
  4635. #   *ss1=1;
  4636. #   ss1++;
  4637. -   strcpy(ss1,searchpath(cl));
  4638. #   ss1=MK_FP(FP_SEG(ss1),0x0080);
  4639. #   strcpy(t," ");
  4640. #   strcat(t,ss);
  4641. And insert these 10 lines:
  4642. #   close_user();
  4643. #   *ss1=1;
  4644. #   ss1++;
  4645. +   ss2=findit(cl,NULL);
  4646. +   if (!ss2) {
  4647. +     ss2=findit(cl,"COM");
  4648. +     if (!ss2) {
  4649. +       ss2=findit(cl,"EXE");
  4650. +       if (!ss2)
  4651. +         return;
  4652. +     }
  4653. +   }
  4654. +   strcpy(ss1,ss2);
  4655. #   ss1=MK_FP(FP_SEG(ss1),0x0080);
  4656. #   strcpy(t," ");
  4657. #   strcat(t,ss);
  4658.  
  4659. Starting at line #226, delete this one line:
  4660. # void shrink_out(char *command, int state, int intercept,int ctc,int ccc)
  4661. # {
  4662. -   char s[81],s1[10];
  4663. #   int ok_shrink;
  4664. #   ok_shrink=1;
  4665. And insert this one line:
  4666. # void shrink_out(char *command, int state, int intercept,int ctc,int ccc)
  4667. # {
  4668. +   char s[81],t[81],s1[10];
  4669. #   int ok_shrink;
  4670. #   ok_shrink=1;
  4671.  
  4672. Starting at line #242, add these 9 lines:
  4673. #     nl();
  4674. #   }
  4675. +   strcpy(s,command);
  4676. +   strtok(s," \t");
  4677. +   if ((!findit(s,NULL)) && (!findit(s,"COM")) && (!findit(s,"EXE"))) {
  4678. +     if (findit(s,"BAT"))
  4679. +       ccc=1;
  4680. +     else
  4681. +       return;
  4682. +   }
  4683. #   if (ok_shrink) {
  4684. #     if (state>0) {
  4685. #       write_user(usernum,&thisuser);
  4686.  
  4687. Starting at line #244, delete this one line:
  4688. #   }
  4689. #   if (ok_shrink) {
  4690. -     if (state) {
  4691. #       write_user(usernum,&thisuser);
  4692. #       if (state>1)
  4693. #         thisuser.sysstatus &= ~sysstatus_pause_on_page;
  4694. And insert this one line:
  4695. #   }
  4696. #   if (ok_shrink) {
  4697. +     if (state>0) {
  4698. #       write_user(usernum,&thisuser);
  4699. #       if (state>1)
  4700. #         thisuser.sysstatus &= ~sysstatus_pause_on_page;
  4701.  
  4702. Starting at line #255, add these 2 lines:
  4703. #     else
  4704. #       sprintf(s,"%s /C %s",getenv("COMSPEC"), command);
  4705. #     do_it_1(s);
  4706. +     unlink("restore.wwv");
  4707. +     unlink("stat.wwv");
  4708. #   } else {
  4709. #     if (intercept)
  4710. #       full_external(command,ctc,ccc);
  4711.  
  4712.  
  4713. /*****************************************************************************/
  4714. sr.c:
  4715.  
  4716.  
  4717. Starting at line #158, add this one line:
  4718. #     outs(s);
  4719. #     outs("\r\n");
  4720. #     if (incom) {
  4721. +       create_chain_file("CHAIN.TXT");
  4722. #       i=run_external1(s);
  4723. #       topscreen();
  4724. #       return(i);
  4725.  
  4726. Starting at line #179, delete this one line:
  4727. #   if (xt==xf_none)
  4728. #     return(0);
  4729. -   if ((pn>0) || (pn<(numextrn+6))) {
  4730. #     switch(pn) {
  4731. #       case 1:
  4732. And insert this one line:
  4733. #   if (xt==xf_none)
  4734. #     return(0);
  4735. +   if ((pn>0) && (pn<(numextrn+6))) {
  4736. #     switch(pn) {
  4737. #       case 1:
  4738.  
  4739. Starting at line #582, delete this one line:
  4740. - char end_batch1()
  4741. # {
  4742. #   char b[128],ch;
  4743. #   int i,i1,done,nerr;
  4744. And insert this one line:
  4745. + char end_batch1(void)
  4746. # {
  4747. #   char b[128],ch;
  4748. #   int i,i1,done,nerr;
  4749.  
  4750. Starting at line #611, delete this one line:
  4751. # }
  4752. - void endbatch()
  4753. # {
  4754. #   char ch;
  4755. #   int abort,ucrc,terr,xx1,yy1;
  4756. And insert this one line:
  4757. # }
  4758. + void endbatch(void)
  4759. # {
  4760. #   char ch;
  4761. #   int abort,ucrc,terr,xx1,yy1;
  4762.  
  4763.  
  4764. /*****************************************************************************/
  4765. subedit.c:
  4766.  
  4767.  
  4768. Starting at line #46, delete these 2 lines:
  4769. #     k=32;
  4770. #   else
  4771. #     k=r.key;
  4772. -   sprintf(s,"%2d %1c %1c  %-40s  %-8s %-3d %-3d %-3d %-3d %1c",
  4773. -             n,k,x,r.name,r.filename,r.readsl,r.postsl,r.age,r.maxmsgs,y);
  4774. # }
  4775. # void showsubs()
  4776. And insert these 3 lines:
  4777. #     k=32;
  4778. #   else
  4779. #     k=r.key;
  4780. +   sprintf(s,"%2d %1c  %-40s  %-8s %-3d %-3d %-3d %-3d %5u",
  4781. +             n,x,r.name,r.filename,r.readsl,r.postsl,r.age&0x7f,r.maxmsgs,r.type);
  4782. +   x=k; x=y; /* leave in old code but ignore warning */
  4783. # }
  4784. # void showsubs(void)
  4785.  
  4786. Starting at line #50, delete this one line:
  4787. #             n,k,x,r.name,r.filename,r.readsl,r.postsl,r.age,r.maxmsgs,y);
  4788. # }
  4789. - void showsubs()
  4790. # {
  4791. #   int abort,i;
  4792. #   char s[180];
  4793. And insert this one line:
  4794. #   x=k; x=y; /* leave in old code but ignore warning */
  4795. # }
  4796. + void showsubs(void)
  4797. # {
  4798. #   int abort,i;
  4799. #   char s[180];
  4800.  
  4801. Starting at line #57, delete this one line:
  4802. #   outchr(12);
  4803. #   abort=0;
  4804. -   pla("NN K AR Name                                      FN       RSL PSL AGE MSG ANON",
  4805. #       &abort);
  4806. #   pla("== - == ----------------------------------------  ======== --- === --- === ----",
  4807. #       &abort);
  4808. And insert this one line:
  4809. #   outchr(12);
  4810. #   abort=0;
  4811. +   pla("NN AR Name                                      FN       RSL PSL AGE MSG SUBTY",
  4812. #       &abort);
  4813. #   pla("== == ----------------------------------------  ======== --- === --- === -----",
  4814. #       &abort);
  4815.  
  4816. Starting at line #59, delete this one line:
  4817. #   abort=0;
  4818. #   pla("NN K AR Name                                      FN       RSL PSL AGE MSG ANON",
  4819. #       &abort);
  4820. -   pla("== - == ----------------------------------------  ======== --- === --- === ----",
  4821. #       &abort);
  4822. #   for (i=0; (i<num_subs) && (!abort); i++) {
  4823. #     boarddata(i,s);
  4824. And insert this one line:
  4825. #   abort=0;
  4826. #   pla("NN AR Name                                      FN       RSL PSL AGE MSG SUBTY",
  4827. #       &abort);
  4828. +   pla("== == ----------------------------------------  ======== --- === --- === -----",
  4829. #       &abort);
  4830. #   for (i=0; (i<num_subs) && (!abort); i++) {
  4831. #     boarddata(i,s);
  4832.  
  4833. Starting at line #73, add this one line:
  4834. #   subboardrec r;
  4835. #   char s[81],s1[81],ch,ch2;
  4836. #   int i,i1,done;
  4837. +   char *name;
  4838. #   r=subboards[n];
  4839. #   done=0;
  4840.  
  4841. Starting at line #99, delete this one line:
  4842. #       default: strcpy(s,"Real screwed up."); break;
  4843. #     }
  4844. #     npr("F. Anony      : %s\r\n",s);
  4845. -     npr("G. Min. Age   : %d\r\n",r.age);
  4846. #     npr("H. Max Msgs   : %d\r\n",r.maxmsgs);
  4847. #     strcpy(s,"None.");
  4848. #     if (r.ar!=0) {
  4849. And insert this one line:
  4850. #       default: strcpy(s,"Real screwed up."); break;
  4851. #     }
  4852. #     npr("F. Anony      : %s\r\n",s);
  4853. +     npr("G. Min. Age   : %d\r\n",r.age&0x7f);
  4854. #     npr("H. Max Msgs   : %d\r\n",r.maxmsgs);
  4855. #     strcpy(s,"None.");
  4856. #     if (r.ar!=0) {
  4857.  
  4858. Starting at line #108, add these 8 lines:
  4859. #       s[1]=0;
  4860. #     }
  4861. #     npr("I. AR         : %s\r\n",s);
  4862. +     if (r.type && (net_num_max>1)) {
  4863. +       if (r.age&0x80) {
  4864. +         name=net_networks[r.name[40]].name;
  4865. +       } else {
  4866. +         name=net_networks[0].name;
  4867. +       }
  4868. +       npr("J. Sub Type   : %u (%s)\r\n",r.type,name);
  4869. +     } else {
  4870. #       npr("J. Sub Type   : %u\r\n",r.type);
  4871. #     }
  4872. #     npr("K. Storage typ: %d\r\n",r.storage_type);
  4873.  
  4874. Starting at line #109, add this one line:
  4875. #       npr("J. Sub Type   : %u (%s)\r\n",r.type,name);
  4876. #     } else {
  4877. #       npr("J. Sub Type   : %u\r\n",r.type);
  4878. +     }
  4879. #     npr("K. Storage typ: %d\r\n",r.storage_type);
  4880. #     npr("L. Val network: %s\r\n",(r.anony & anony_val_net)?"Yes":"No");
  4881. #     npr("M. Req ANSI   : %s\r\n",(r.anony & anony_ansi_only)?"Yes":"No");
  4882.  
  4883. Starting at line #122, delete this one line:
  4884. #       case 'A':
  4885. #         nl();
  4886. #         prt(2,"New name? ");
  4887. -         inputl(s,40);
  4888. #         if (s[0])
  4889. #           strcpy(r.name,s);
  4890. #         break;
  4891. And insert this one line:
  4892. #       case 'A':
  4893. #         nl();
  4894. #         prt(2,"New name? ");
  4895. +         inputl(s,39);
  4896. #         if (s[0])
  4897. #           strcpy(r.name,s);
  4898. #         break;
  4899.  
  4900. Starting at line #177, delete this one line:
  4901. #         input(s,3);
  4902. #         i=atoi(s);
  4903. #         if ((i>=0) && (i<128) && (s[0]))
  4904. -           r.age=i;
  4905. #         break;
  4906. #       case 'H':
  4907. #         nl();
  4908. And insert this one line:
  4909. #         input(s,3);
  4910. #         i=atoi(s);
  4911. #         if ((i>=0) && (i<128) && (s[0]))
  4912. +           r.age=(r.age&0x80)|(i&0x7f);
  4913. #         break;
  4914. #       case 'H':
  4915. #         nl();
  4916.  
  4917. Starting at line #292, add this one line:
  4918. #         if (u.sysopsub>=n)
  4919. #           ++u.sysopsub;
  4920. # #if MAX_SUBS>32
  4921. +       if (max_subs>32) {
  4922. #         u.qscn2=(u.qscn2 << 1) | (u.qscn >> 31);
  4923. #         for (i1=num_subs-1-32; i1>0; i1--)
  4924. #           u.qscnptr2[i1]=u.qscnptr2[i1-1];
  4925.  
  4926. Starting at line #296, add this one line:
  4927. #         for (i1=num_subs-1-32; i1>0; i1--)
  4928. #           u.qscnptr2[i1]=u.qscnptr2[i1-1];
  4929. #         u.qscnptr2[0]=u.qscnptr[31];
  4930. +       }
  4931. # #endif
  4932. #       for (i1=((num_subs<32)?num_subs:32)-1; i1>n; i1--)
  4933. #         u.qscnptr[i1]=u.qscnptr[i1-1];
  4934.  
  4935. Starting at line #336, delete this one line:
  4936. #           --u.sysopsub;
  4937. #       for (i1=n-32; i1<num_subs-32; i1++)
  4938. #         u.qscnptr2[i1]=u.qscnptr2[i1+1];
  4939. -       u.qscnptr[MAX_SUBS-1]=0L;
  4940. #       u.qscn2=(u.qscn2 & l1) | ((u.qscn2 >> 1) & l2);
  4941. #       write_user(i,&u);
  4942. #     }
  4943.  
  4944. Starting at line #357, add this one line:
  4945. #       for (i1=n; i1<i2; i1++)
  4946. #         u.qscnptr[i1]=u.qscnptr[i1+1];
  4947. # #if MAX_SUBS>32
  4948. +       if (max_subs>32) {
  4949. #         u.qscnptr[31]=u.qscnptr2[0];
  4950. #         for (i1=0; i1<num_subs-32; i1++)
  4951. #           u.qscnptr2[i1]=u.qscnptr2[i1+1];
  4952.  
  4953. Starting at line #360, delete these 2 lines:
  4954. # #if MAX_SUBS>32
  4955. #       u.qscnptr[31]=u.qscnptr2[0];
  4956. #       for (i1=0; i1<num_subs-32; i1++)
  4957. -         u.qscnptr2[i1]=u.qscnptr[i1+1];
  4958. -       u.qscnptr2[MAX_SUBS-33]=0L;
  4959. #       u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2) | (u.qscn2 << 31);
  4960. #       u.qscn2=u.qscn2 >> 1;
  4961. # #else
  4962. And insert this one line:
  4963. #       if (max_subs>32) {
  4964. #         u.qscnptr[31]=u.qscnptr2[0];
  4965. #         for (i1=0; i1<num_subs-32; i1++)
  4966. +           u.qscnptr2[i1]=u.qscnptr2[i1+1];
  4967. #         u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2) | (u.qscn2 << 31);
  4968. #         u.qscn2=u.qscn2 >> 1;
  4969. #       } else {
  4970.  
  4971. Starting at line #363, add these 3 lines:
  4972. #           u.qscnptr2[i1]=u.qscnptr2[i1+1];
  4973. #         u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2) | (u.qscn2 << 31);
  4974. #         u.qscn2=u.qscn2 >> 1;
  4975. +       } else {
  4976. +         u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2);
  4977. +       }
  4978. # #else
  4979. #       u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2);
  4980. # #endif
  4981.  
  4982. Starting at line #366, delete this one line:
  4983. #       u.qscn2=u.qscn2 >> 1;
  4984. # #else
  4985. #       u.qscn=(u.qscn & l1) | ((u.qscn >> 1) & l2);
  4986. -       u.qscnptr[MAX_SUBS-1]=0L;
  4987. # #endif
  4988. #       write_user(i,&u);
  4989. #     }
  4990.  
  4991. Starting at line #374, delete this one line:
  4992. # }
  4993. - void boardedit()
  4994. # {
  4995. #   int i,i1,i2,done,f;
  4996. #   char s[81],s1[81],s2[81],ch;
  4997. And insert this one line:
  4998. # }
  4999. + void boardedit(void)
  5000. # {
  5001. #   int i,i1,i2,done,f;
  5002. #   char s[81],s1[81],s2[81],ch;
  5003.  
  5004. Starting at line #403, delete this one line:
  5005. #           modify_sub(i);
  5006. #         break;
  5007. #       case 'I':
  5008. -         if (num_subs<MAX_SUBS) {
  5009. #           nl();
  5010. #           prt(2,"Insert before which sub? ");
  5011. #           input(s,2);
  5012. And insert this one line:
  5013. #           modify_sub(i);
  5014. #         break;
  5015. #       case 'I':
  5016. +         if (num_subs<max_subs) {
  5017. #           nl();
  5018. #           prt(2,"Insert before which sub? ");
  5019. #           input(s,2);
  5020.  
  5021.  
  5022. /*****************************************************************************/
  5023. subreq.c:
  5024.  
  5025.  
  5026. Starting at line #28, delete this one line:
  5027. #   nh.tosys=tosys;
  5028. #   nh.touser=1;
  5029. -   nh.fromsys=syscfg.systemnumber;
  5030. #   nh.fromuser=1;
  5031. #   nh.main_type=main_type;
  5032. #   nh.minor_type=minor_type;
  5033. And insert this one line:
  5034. #   nh.tosys=tosys;
  5035. #   nh.touser=1;
  5036. +   nh.fromsys=net_sysnum;
  5037. #   nh.fromuser=1;
  5038. #   nh.main_type=main_type;
  5039. #   nh.minor_type=minor_type;
  5040.  
  5041. Starting at line #48, delete this one line:
  5042. #   int found=0;
  5043. #   unsigned short ui;
  5044. -   sprintf(s,"%sNN%u.NET",syscfg.datadir,type);
  5045. #   unlink(s);
  5046. #   sprintf(fn1,"%sNNALL.NET", syscfg.datadir);
  5047. And insert this one line:
  5048. #   int found=0;
  5049. #   unsigned short ui;
  5050. +   sprintf(s,"%sNN%u.NET",net_data,type);
  5051. #   unlink(s);
  5052. #   sprintf(fn1,"%sNNALL.NET", net_data);
  5053.  
  5054. Starting at line #51, delete these 2 lines:
  5055. #   sprintf(s,"%sNN%u.NET",syscfg.datadir,type);
  5056. #   unlink(s);
  5057. -   sprintf(fn1,"%sNNALL.NET", syscfg.datadir);
  5058. -   sprintf(fn2,"%sNNALL.NEW", syscfg.datadir);
  5059. #   fi=fopen(fn1,"r");
  5060. #   if (fi) {
  5061. #     fo=fopen(fn2,"w");
  5062. And insert these 2 lines:
  5063. #   sprintf(s,"%sNN%u.NET",net_data,type);
  5064. #   unlink(s);
  5065. +   sprintf(fn1,"%sNNALL.NET", net_data);
  5066. +   sprintf(fn2,"%sNNALL.NEW", net_data);
  5067. #   fi=fopen(fn1,"r");
  5068. #   if (fi) {
  5069. #     fo=fopen(fn2,"w");
  5070.  
  5071. Starting at line #88, delete this one line:
  5072. #   FILE *f;
  5073. #   char s[100];
  5074. -   sprintf(s,"%sNNALL.NET",syscfg.datadir);
  5075. #   f=fopen(s,"a");
  5076. #   if (f) {
  5077. #     fprintf(f,"%-6u  %-6u          %s\n",type,host,desc);
  5078. And insert this one line:
  5079. #   FILE *f;
  5080. #   char s[100];
  5081. +   sprintf(s,"%sNNALL.NET",net_data);
  5082. #   f=fopen(s,"a");
  5083. #   if (f) {
  5084. #     fprintf(f,"%-6u  %-6u          %s\n",type,host,desc);
  5085.  
  5086. Starting at line #112, delete this one line:
  5087. #   for (i=0; (i<256) && (!done); i++) {
  5088. #     if (i)
  5089. -       sprintf(s,"%sSUBS.%d",syscfg.datadir,i);
  5090. #     else
  5091. #       sprintf(s,"%sSUBS.LST",syscfg.datadir);
  5092. #     f=fopen(s,"r");
  5093. And insert this one line:
  5094. #   for (i=0; (i<256) && (!done); i++) {
  5095. #     if (i)
  5096. +       sprintf(s,"%sSUBS.%d",net_data,i);
  5097. #     else
  5098. #       sprintf(s,"%sSUBS.LST",net_data);
  5099. #     f=fopen(s,"r");
  5100.  
  5101. Starting at line #114, delete this one line:
  5102. #     if (i)
  5103. #       sprintf(s,"%sSUBS.%d",syscfg.datadir,i);
  5104. #     else
  5105. -       sprintf(s,"%sSUBS.LST",syscfg.datadir);
  5106. #     f=fopen(s,"r");
  5107. #     if (f) {
  5108. #       while ((!done) && fgets(s,160,f)) {
  5109. And insert this one line:
  5110. #     if (i)
  5111. #       sprintf(s,"%sSUBS.%d",net_data,i);
  5112. #     else
  5113. +       sprintf(s,"%sSUBS.LST",net_data);
  5114. #     f=fopen(s,"r");
  5115. #     if (f) {
  5116. #       while ((!done) && fgets(s,160,f)) {
  5117.  
  5118. Starting at line #184, delete these 2 lines:
  5119. # void sub_type_change(subboardrec *r, unsigned int type)
  5120. # {
  5121. -   unsigned short ui, opt,ok;
  5122. -   char desc[81];
  5123. #   if (r->type) {
  5124. #     ok=1;
  5125. And insert these 3 lines:
  5126. # void sub_type_change(subboardrec *r, unsigned int type)
  5127. # {
  5128. +   unsigned short ui, opt, ok, i;
  5129. +   char desc[100],s[10],onx[20],*mmk,ch;
  5130. +   int onxi, odci,ii;
  5131. #   if (r->type) {
  5132. #     if (!r->age & 0x80) {
  5133.  
  5134. Starting at line #187, add these 6 lines:
  5135. #   int onxi, odci,ii;
  5136. #   if (r->type) {
  5137. +     if (!r->age & 0x80) {
  5138. +       r->age |= 0x80;
  5139. +       r->name[39]=0;
  5140. +       r->name[40]=0;
  5141. +     }
  5142. +     set_net_num(r->name[40]);
  5143. #     ok=1;
  5144. #     ui=find_host(r->type);
  5145. #     if (ui) {
  5146.  
  5147. Starting at line #191, delete this one line:
  5148. #     ok=1;
  5149. #     ui=find_host(r->type);
  5150. #     if (ui) {
  5151. -       if (next_system(ui) && (ui!=syscfg.systemnumber)) {
  5152. #         ok=0;
  5153. #         if (status.net_version>=29) {
  5154. #           if (find_hostfor(r->type, &ui, desc, &opt)) {
  5155. And insert this one line:
  5156. #     ok=1;
  5157. #     ui=find_host(r->type);
  5158. #     if (ui) {
  5159. +       if (next_system(ui) && (ui!=net_sysnum)) {
  5160. #         ok=0;
  5161. #         if (status.net_version>=29) {
  5162. #           if (find_hostfor(r->type, &ui, desc, &opt)) {
  5163.  
  5164. Starting at line #221, add these 44 lines:
  5165. #   }
  5166. #   if (type) {
  5167. +     if (!r->age & 0x80) {
  5168. +       r->age |= 0x80;
  5169. +       r->name[39]=0;
  5170. +       r->name[40]=0;
  5171. +     }
  5172. +     if (net_num_max>1) {
  5173. +       odc[0]=0;
  5174. +       odci=0;
  5175. +       onx[0]='Q';
  5176. +       onx[1]=0;
  5177. +       onxi=1;
  5178. +       nl();
  5179. +       for (ii=0; ii<net_num_max; ii++) {
  5180. +         if (ii<9) {
  5181. +           onx[onxi++]=ii+'1';
  5182. +           onx[onxi]=0;
  5183. +         } else {
  5184. +           odci=(ii+1)/10;
  5185. +           odc[odci-1]=odci+'0';
  5186. +           odc[odci]=0;
  5187. +         }
  5188. +         npr("%d. %s\r\n",ii+1,net_networks[ii].name);
  5189. +       }
  5190. +       pl("Q. Quit");
  5191. +       nl();
  5192. +       prt(2,"Which network (number)? ");
  5193. +       if (net_num_max<9) {
  5194. +         ch=onek(onx);
  5195. +         if (ch=='Q')
  5196. +           ii=-1;
  5197. +         else
  5198. +           ii=ch-'1';
  5199. +       } else {
  5200. +         mmk=mmkey(2);
  5201. +         if (*mmk=='Q')
  5202. +           ii=-1;
  5203. +         else
  5204. +           ii=atoi(mmk)-1;
  5205. +       }
  5206. +       if ((ii>=0) && (ii<net_num_max)) {
  5207. +         set_net_num(ii);
  5208. +       } else
  5209. +         return;
  5210. +     }
  5211. #     ui=0;
  5212. #     ok=find_hostfor(type, &ui, desc, &opt);
  5213. #     if (!ok) {
  5214.  
  5215. Starting at line #231, delete this one line:
  5216. #       ui=(unsigned short) atol(desc);
  5217. #       strcpy(desc,r->name);
  5218. #     }
  5219. -     if (ui==syscfg.systemnumber)
  5220. #       ui=0;
  5221. #     if (ui) {
  5222. #       add_nnall(type, ui, desc);
  5223. And insert this one line:
  5224. #       ui=(unsigned short) atol(desc);
  5225. #       strcpy(desc,r->name);
  5226. #     }
  5227. +     if (ui==net_sysnum)
  5228. #       ui=0;
  5229. #     if (ui) {
  5230. #       add_nnall(type, ui, desc);
  5231.  
  5232. Starting at line #272, add these 6 lines:
  5233. #       /* user will have to set it up himself */
  5234. #     }
  5235. #     r->type=type;
  5236. +   }
  5237. +   if (r->type) {
  5238. +     r->age |= 0x80;
  5239. +     r->name[40]=net_num;
  5240. +   } else {
  5241. +     r->age &= 0x7f;
  5242. #   }
  5243. # }
  5244.  
  5245.  
  5246. /*****************************************************************************/
  5247. sysopf.c:
  5248.  
  5249.  
  5250. Starting at line #41, delete this one line:
  5251. - void reset_files()
  5252. # {
  5253. #   int i,i1;
  5254. #   userrec u;
  5255. And insert this one line:
  5256. + void reset_files(void)
  5257. # {
  5258. #   int i,i1;
  5259. #   userrec u;
  5260.  
  5261. Starting at line #76, delete this one line:
  5262. # }
  5263. - void get_status()
  5264. # {
  5265. #   char s[81];
  5266. #   int statusfile;
  5267. And insert this one line:
  5268. # }
  5269. + void get_status(void)
  5270. # {
  5271. #   char s[81];
  5272. #   int statusfile;
  5273.  
  5274. Starting at line #93, delete this one line:
  5275. - void prstatus()
  5276. # {
  5277. #   int i;
  5278. #   long l;
  5279. And insert this one line:
  5280. + void prstatus(void)
  5281. # {
  5282. #   int i;
  5283. #   long l;
  5284.  
  5285. Starting at line #284, delete this one line:
  5286. # void print_net_listing(unsigned int ss)
  5287. # {
  5288. #   int i,i1,i2,abort,f;
  5289. -   char s[161],ch;
  5290. #   net_system_list_rec csne;
  5291. #   ss = ss%10000;
  5292. And insert these 2 lines:
  5293. # void print_net_listing(unsigned int ss)
  5294. # {
  5295. #   int i,i1,i2,abort,f;
  5296. +   char s[161],ch,onx[20],*mmk;
  5297. +   int onxi,odci;
  5298. #   net_system_list_rec csne;
  5299.  
  5300. Starting at line #286, add these 43 lines:
  5301. #   int onxi,odci;
  5302. #   net_system_list_rec csne;
  5303. +   if (net_num_max>1) {
  5304. +     odc[0]=0;
  5305. +     odci=0;
  5306. +     onx[0]='Q';
  5307. +     onx[1]=0;
  5308. +     onxi=1;
  5309. +     nl();
  5310. +     for (i=0; i<net_num_max; i++) {
  5311. +       if (i<9) {
  5312. +         onx[onxi++]=i+'1';
  5313. +         onx[onxi]=0;
  5314. +       } else {
  5315. +         odci=(i+1)/10;
  5316. +         odc[odci-1]=odci+'0';
  5317. +         odc[odci]=0;
  5318. +       }
  5319. +       npr("%d. %s\r\n",i+1,net_networks[i].name);
  5320. +     }
  5321. +     pl("Q. Quit");
  5322. +     nl();
  5323. +     prt(2,"Which network (number)? ");
  5324. +     if (net_num_max<9) {
  5325. +       ch=onek(onx);
  5326. +       if (ch=='Q')
  5327. +         i=-1;
  5328. +       else
  5329. +         i=ch-'1';
  5330. +     } else {
  5331. +       mmk=mmkey(2);
  5332. +       if (*mmk=='Q')
  5333. +         i=-1;
  5334. +       else
  5335. +         i=atoi(mmk)-1;
  5336. +     }
  5337. +     if ((i>=0) && (i<net_num_max)) {
  5338. +       set_net_num(i);
  5339. +     } else
  5340. +       return;
  5341. +   }
  5342. +   read_bbs_list_index();
  5343. #   ss = ss%10000;
  5344. #   abort=0;
  5345.  
  5346. Starting at line #290, add this one line:
  5347. #   abort=0;
  5348. #   nl();
  5349. +   npr("%s network listing:\r\n\r\n",net_name);
  5350. #   pla("  Num  Phone         Name                                     Hop  Next Grp",&abort);
  5351. #   pla("-----  ============  ---------------------------------------- === ----- ===",&abort);
  5352. #   sprintf(s,"%sBBSDATA.NET",net_data);
  5353.  
  5354. Starting at line #293, delete this one line:
  5355. #   nl();
  5356. #   pla("  Num  Phone         Name                                     Hop  Next Grp",&abort);
  5357. #   pla("-----  ============  ---------------------------------------- === ----- ===",&abort);
  5358. -   sprintf(s,"%sBBSDATA.NET",syscfg.datadir);
  5359. #   f=open(s,O_RDONLY | O_BINARY);
  5360. #   for (i=0; (i<num_sys_list) && (!abort); i++) {
  5361. #     read(f,&csne,sizeof(net_system_list_rec));
  5362. And insert this one line:
  5363. #   npr("%s network listing:\r\n\r\n",net_name);
  5364. #   pla("  Num  Phone         Name                                     Hop  Next Grp",&abort);
  5365. #   pla("-----  ============  ---------------------------------------- === ----- ===",&abort);
  5366. +   sprintf(s,"%sBBSDATA.NET",net_data);
  5367. #   f=open(s,O_RDONLY | O_BINARY);
  5368. #   for (i=0; (i<num_sys_list) && (!abort); i++) {
  5369. #     read(f,&csne,sizeof(net_system_list_rec));
  5370.  
  5371. Starting at line #306, delete this one line:
  5372. #         ch='^';
  5373. #       else
  5374. #         ch=' ';
  5375. -       sprintf(s,"%5d%c %12s  %-40s %3d %5d %3d",
  5376. #         csne.sysnum,ch,csne.phone,csne.name,csne.numhops,
  5377. #         csne.forsys, csne.group);
  5378. #       pla(s,&abort);
  5379. And insert this one line:
  5380. #         ch='^';
  5381. #       else
  5382. #         ch=' ';
  5383. +       sprintf(s,"%5u%c %12s  %-40s %3d %5d %3d",
  5384. #         csne.sysnum,ch,csne.phone,csne.name,csne.numhops,
  5385. #         csne.forsys, csne.group);
  5386. #       pla(s,&abort);
  5387.  
  5388. Starting at line #317, delete this one line:
  5389. # }
  5390. - void read_new_stuff()
  5391. # {
  5392. #   int i;
  5393. #   char s[81];
  5394. And insert this one line:
  5395. # }
  5396. + void read_new_stuff(void)
  5397. # {
  5398. #   int i;
  5399. #   char s[81];
  5400.  
  5401. Starting at line #322, delete these 12 lines:
  5402. #   int i;
  5403. #   char s[81];
  5404. -   if (ncn!=NULL)
  5405. -     farfree(ncn);
  5406. -   if (cnn!=NULL)
  5407. -     farfree(cnn);
  5408. -   if (csn!=NULL)
  5409. -     farfree((void far *) csn);
  5410. -   if (con!=NULL)
  5411. -     farfree(con);
  5412. -   ncn=NULL;
  5413. -   cnn=NULL;
  5414. -   csn=NULL;
  5415. -   con=NULL;
  5416. #   read_in_file("MENUS.MSG",(menus),30);
  5417. #   read_in_file("HELP.MSG",(helps),50);
  5418. #   for (i=0; i<30; i++) {
  5419. And insert these 7 lines:
  5420. #   int i;
  5421. #   char s[81];
  5422. +   zap_bbs_list();
  5423. +   for (i=0; i<net_num_max; i++) {
  5424. +     zap_call_out_list();
  5425. +     zap_contacts();
  5426. +   }
  5427. #   read_in_file("MENUS.MSG",(menus),30);
  5428. #   read_in_file("HELP.MSG",(helps),50);
  5429. #   for (i=0; i<30; i++) {
  5430.  
  5431. Starting at line #349, delete these 8 lines:
  5432. #   if (exist(s))
  5433. #     read_in_file("MENUS40.MSG",(menus2),30);
  5434. -   if (csn!=NULL)
  5435. -     farfree((void far *)csn);
  5436. -   if (cnn!=NULL)
  5437. -     farfree(cnn);
  5438. -   if (con!=NULL)
  5439. -     farfree(con);
  5440. -   read_bbs_list_index();
  5441. -   read_contacts();
  5442. # }
  5443.  
  5444. Starting at line #360, delete this one line:
  5445. # }
  5446. - void mailr()
  5447. # {
  5448. #   int i,abort,a,f,next;
  5449. #   mailrec m;
  5450. And insert this one line:
  5451. # }
  5452. + void mailr(void)
  5453. # {
  5454. #   int i,abort,a,f,next;
  5455. #   mailrec m;
  5456.  
  5457. Starting at line #410, delete this one line:
  5458. # }
  5459. - void chuser()
  5460. # {
  5461. #   char s[81];
  5462. #   int i;
  5463. And insert this one line:
  5464. # }
  5465. + void chuser(void)
  5466. # {
  5467. #   char s[81];
  5468. #   int i;
  5469.  
  5470. Starting at line #435, delete this one line:
  5471. #     pl("Unknown user.");
  5472. # }
  5473. - void zlog()
  5474. # {
  5475. #   zlogrec z;
  5476. #   char s[81];
  5477. And insert this one line:
  5478. #     pl("Unknown user.");
  5479. # }
  5480. + void zlog(void)
  5481. # {
  5482. #   zlogrec z;
  5483. #   char s[81];
  5484.  
  5485. Starting at line #468, delete this one line:
  5486. # }
  5487. - void beginday()
  5488. # {
  5489. #   char s[255];
  5490. #   zlogrec z,z1;
  5491. And insert this one line:
  5492. # }
  5493. + void beginday(void)
  5494. # {
  5495. #   char s[255];
  5496. #   zlogrec z,z1;
  5497.  
  5498. Starting at line #496, delete this one line:
  5499. #   strcpy(status.log2,status.log1);
  5500. #   sl1(3,status.log1);
  5501. #   sl1(2,date());
  5502. -   if (1) {
  5503. #     sprintf(s,"%s%s",syscfg.gfilesdir, status.log2);
  5504. #     unlink(s);
  5505. #   }
  5506. And insert this one line:
  5507. #   strcpy(status.log2,status.log1);
  5508. #   sl1(3,status.log1);
  5509. #   sl1(2,date());
  5510. #   sprintf(s,"%s%s",syscfg.gfilesdir, status.log2);
  5511. #   unlink(s);
  5512.  
  5513. Starting at line #499, delete this one line:
  5514. #   if (1) {
  5515. #     sprintf(s,"%s%s",syscfg.gfilesdir, status.log2);
  5516. #     unlink(s);
  5517. -   }
  5518. #   sprintf(s,"%sUSER.LOG",syscfg.gfilesdir);
  5519. #   unlink(s);
  5520. #   save_status();
  5521. And insert this one line:
  5522. #   sprintf(s,"%s%s",syscfg.gfilesdir, status.log2);
  5523. #   unlink(s);
  5524. #   sprintf(s,"%sUSER.LOG",syscfg.gfilesdir);
  5525. #   unlink(s);
  5526. #   save_status();
  5527.  
  5528.  
  5529. /*****************************************************************************/
  5530. uedit.c:
  5531.  
  5532.  
  5533. Starting at line #75, delete this one line:
  5534. # }
  5535. - void print_data(int un, userrec *u, int lng)
  5536. # {
  5537. #   char s[81],s1[81],s2[81],s3[81],s4[81];
  5538. #   int i;
  5539. And insert this one line:
  5540. # }
  5541. + void print_data(int un, userrec *u, int lng, int cls)
  5542. # {
  5543. #   char s[81],s1[81],s2[81],s3[81],s4[81];
  5544. #   int i;
  5545.  
  5546. Starting at line #79, add this one line:
  5547. #   char s[81],s1[81],s2[81],s3[81],s4[81];
  5548. #   int i;
  5549. +   if (cls)
  5550. #     outchr(12);
  5551. #   if ((u->inact) & inact_deleted) {
  5552. #     pl(">>> DELETED <<<");
  5553.  
  5554. Starting at line #94, delete this one line:
  5555. #     u->month, u->day, u->year);
  5556. #   npr("Comp: %s\r\n",&(ctypes[u->comp_type][0]));
  5557. #   if (u->forwardusr) {
  5558. -     if (u->forwardsys)
  5559. #       npr("Forw: #%d @%d\r\n",u->forwardusr, u->forwardsys);
  5560. #     else
  5561. #       npr("Forw: #%d\r\n",u->forwardusr);
  5562. And insert these 5 lines:
  5563. #     u->month, u->day, u->year);
  5564. #   npr("Comp: %s\r\n",&(ctypes[u->comp_type][0]));
  5565. #   if (u->forwardusr) {
  5566. +     if (u->forwardsys) {
  5567. +       if (net_num_max>1) {
  5568. +         npr("Forw: %s #%d @%d\r\n", net_networks[u->net_num].name,
  5569. +           u->forwardusr, u->forwardsys);
  5570. +       } else {
  5571. #         npr("Forw: #%d @%d\r\n",u->forwardusr, u->forwardsys);
  5572. #       }
  5573. #     } else {
  5574.  
  5575. Starting at line #96, delete this one line:
  5576. #   if (u->forwardusr) {
  5577. #     if (u->forwardsys)
  5578. #       npr("Forw: #%d @%d\r\n",u->forwardusr, u->forwardsys);
  5579. -     else
  5580. #       npr("Forw: #%d\r\n",u->forwardusr);
  5581. #   }
  5582. #   if (lng) {
  5583. And insert these 2 lines:
  5584. #           u->forwardusr, u->forwardsys);
  5585. #       } else {
  5586. #         npr("Forw: #%d @%d\r\n",u->forwardusr, u->forwardsys);
  5587. +       }
  5588. +     } else {
  5589. #       npr("Forw: #%d\r\n",u->forwardusr);
  5590. #     }
  5591. #   }
  5592.  
  5593. Starting at line #98, add this one line:
  5594. #     } else {
  5595. #       npr("Forw: #%d\r\n",u->forwardusr);
  5596. #     }
  5597. +   }
  5598. #   if (lng) {
  5599. #     sprintf(s,"PW  : %s\r\n",u->pw);
  5600. #     if (lecho)
  5601.  
  5602. Starting at line #311, delete this one line:
  5603. # /****************************************************************************/
  5604. - void changeopt()
  5605. # {
  5606. #   helpl=42;
  5607. #   outchr(12);
  5608. And insert this one line:
  5609. # /****************************************************************************/
  5610. + void changeopt(void)
  5611. # {
  5612. #   helpl=42;
  5613. #   outchr(12);
  5614.  
  5615. Starting at line #339, delete this one line:
  5616. # void uedit(int usern, int other)
  5617. # {
  5618. #   char s[81],s1[81],s2[81],ch,ch1;
  5619. -   int i,i1,i2,i3,un,done,nu,done1,full,temp_full,tempu;
  5620. #   userrec u;
  5621. #   if (incom)
  5622. And insert this one line:
  5623. # void uedit(int usern, int other)
  5624. # {
  5625. #   char s[81],s1[81],s2[81],ch,ch1;
  5626. +   int i,i1,i2,i3,un,done,nu,done1,full,temp_full,tempu,cls=1;
  5627. #   userrec u;
  5628. #   if (incom)
  5629.  
  5630. Starting at line #345, add these 4 lines:
  5631. #     full=0;
  5632. #   else
  5633. #     full=1;
  5634. +   if (other&1)
  5635. +     full=0;
  5636. +   if (other&2)
  5637. +     cls=0;
  5638. #   un=usern;
  5639. #   done=0;
  5640. #   read_user(un,&u);
  5641.  
  5642. Starting at line #355, delete this one line:
  5643. #     done1=0;
  5644. #     temp_full=0;
  5645. #     do {
  5646. -       print_data(un,&u, ((full) || (temp_full)));
  5647. #       nl();
  5648. #       prt(2,"Uedit : ");
  5649. #       if ((thisuser.sl==255) || (wfc))
  5650. And insert this one line:
  5651. #     done1=0;
  5652. #     temp_full=0;
  5653. #     do {
  5654. +       print_data(un,&u, ((full) || (temp_full)), cls);
  5655. #       nl();
  5656. #       prt(2,"Uedit : ");
  5657. #       if ((thisuser.sl==255) || (wfc))
  5658.  
  5659. Starting at line #408, add this one line:
  5660. #         case '.':
  5661. #           full=(!full);
  5662. #           temp_full=full;
  5663. +           cls=0;
  5664. #           break;
  5665. #         case ',':
  5666. #           temp_full=(!temp_full);
  5667.  
  5668.  
  5669. /*****************************************************************************/
  5670. utility.c:
  5671.  
  5672.  
  5673. Starting at line #210, delete this one line:
  5674. # /* end of functions for external programs to call */
  5675. - void reset_act_sl()
  5676. # {
  5677. #   actsl = thisuser.sl;
  5678. # }
  5679. And insert this one line:
  5680. # /* end of functions for external programs to call */
  5681. + void reset_act_sl(void)
  5682. # {
  5683. #   actsl = thisuser.sl;
  5684. # }
  5685.  
  5686. Starting at line #237, delete this one line:
  5687. #   }
  5688. # }
  5689. - void check_event()
  5690. # {
  5691. #   double tl;
  5692. And insert this one line:
  5693. #   }
  5694. # }
  5695. + void check_event(void)
  5696. # {
  5697. #   double tl;
  5698.  
  5699. Starting at line #243, delete this one line:
  5700. #   if (syscfg.executetime) {
  5701. #     tl=time_event-timer();
  5702. -     if (tl<0.0)
  5703. #       tl += 24.0*3600.0;
  5704. #     if ((tl-last_time)>2.0)
  5705. #       do_event=1;
  5706. And insert this one line:
  5707. #   if (syscfg.executetime) {
  5708. #     tl=time_event-timer();
  5709. +     if (tl<-30.0)
  5710. #       tl += 24.0*3600.0;
  5711. #     if ((tl-last_time)>2.0)
  5712. #       do_event=1;
  5713.  
  5714. Starting at line #252, delete this one line:
  5715. # }
  5716. - void run_event()
  5717. # {
  5718. #   if ((do_event) && (syscfg.executetime)) {
  5719. #     do_event=0;
  5720. And insert this one line:
  5721. # }
  5722. + void run_event(void)
  5723. # {
  5724. #   if ((do_event) && (syscfg.executetime)) {
  5725. #     do_event=0;
  5726.  
  5727. Starting at line #304, delete this one line:
  5728. - void itimer()
  5729. # /* This function initializes the high-resolution timer */
  5730. # {
  5731. #   outportb(0x43,0x34);
  5732. And insert this one line:
  5733. + void itimer(void)
  5734. # /* This function initializes the high-resolution timer */
  5735. # {
  5736. #   outportb(0x43,0x34);
  5737.  
  5738. Starting at line #313, delete this one line:
  5739. # }
  5740. - double timer()
  5741. # /* This function returns the time, in seconds since midnight. */
  5742. # {
  5743. #   double cputim;
  5744. And insert this one line:
  5745. # }
  5746. + double timer(void)
  5747. # /* This function returns the time, in seconds since midnight. */
  5748. # {
  5749. #   double cputim;
  5750.  
  5751. Starting at line #332, delete this one line:
  5752. # }
  5753. - long timer1()
  5754. # /* This function returns the time, in ticks since midnight. */
  5755. # {
  5756. #   unsigned short h,m;
  5757. And insert this one line:
  5758. # }
  5759. + long timer1(void)
  5760. # /* This function returns the time, in ticks since midnight. */
  5761. # {
  5762. #   unsigned short h,m;
  5763.  
  5764. Starting at line #345, delete this one line:
  5765. # }
  5766. - int sysop1()
  5767. # /* This function returns the status of scoll lock.  If scroll lock is active
  5768. #  * (ie, the user has hit scroll lock + the light is lit if there is a
  5769. #  * scoll lock LED), the sysop is assumed to be available.
  5770. And insert this one line:
  5771. # }
  5772. + int sysop1(void)
  5773. # /* This function returns the status of scoll lock.  If scroll lock is active
  5774. #  * (ie, the user has hit scroll lock + the light is lit if there is a
  5775. #  * scoll lock LED), the sysop is assumed to be available.
  5776.  
  5777. Starting at line #359, delete this one line:
  5778. - int okansi()
  5779. # /* This function checks the status of the current user's record to see if
  5780. #  * the user has specified that he wants ANSI graphics displayed.
  5781. #  */
  5782. And insert this one line:
  5783. + int okansi(void)
  5784. # /* This function checks the status of the current user's record to see if
  5785. #  * the user has specified that he wants ANSI graphics displayed.
  5786. #  */
  5787.  
  5788. Starting at line #373, delete this one line:
  5789. # }
  5790. - void frequent_init()
  5791. # /* This should be called after a user is logged off, and will initialize
  5792. #  * screen-access variables.
  5793. #  */
  5794. And insert this one line:
  5795. # }
  5796. + void frequent_init(void)
  5797. # /* This should be called after a user is logged off, and will initialize
  5798. #  * screen-access variables.
  5799. #  */
  5800.  
  5801. Starting at line #377, add this one line:
  5802. #  * screen-access variables.
  5803. #  */
  5804. # {
  5805. +   in_fsed=0;
  5806. #   curlsub=-1;
  5807. #   ansiptr=0;
  5808. #   curatr=0x07;
  5809.  
  5810. Starting at line #425, add this one line:
  5811. #   unlink(dszlog);
  5812. #   ltime=0;
  5813. #   set_x_only(0, NULL, 0);
  5814. +   set_net_num(0);
  5815. # }
  5816.  
  5817. Starting at line #478, delete these 14 lines:
  5818. # }
  5819. - void far *mallocx(unsigned long l)
  5820. - {
  5821. -   void *x;
  5822. -
  5823. -   x=farmalloc(l);
  5824. -   if (!x) {
  5825. -     printf("NOT ENOUGH MEMORY.\n");
  5826. -     end_bbs(noklevel);
  5827. -   }
  5828. -   return(x);
  5829. - }
  5830. # void fix_user_rec(userrec *u)
  5831. # {
  5832. #   u->name[30]=0;
  5833.  
  5834. Starting at line #506, delete this one line:
  5835. #   u->macros[2][80]=0;
  5836. # }
  5837. - void close_user()
  5838. # {
  5839. #   if (userfile!=-1) {
  5840. #     close(userfile);
  5841. And insert this one line:
  5842. #   u->macros[2][80]=0;
  5843. # }
  5844. + void close_user(void)
  5845. # {
  5846. #   if (userfile!=-1) {
  5847. #     close(userfile);
  5848.  
  5849. Starting at line #514, delete this one line:
  5850. #   }
  5851. # }
  5852. - void open_user()
  5853. # {
  5854. #   char s[81];
  5855. And insert this one line:
  5856. #   }
  5857. # }
  5858. + void open_user(void)
  5859. # {
  5860. #   char s[81];
  5861.  
  5862. Starting at line #528, delete this one line:
  5863. # }
  5864. - int number_userrecs()
  5865. # {
  5866. #   open_user();
  5867. #   return((int) (filelength(userfile)/syscfg.userreclen)-1);
  5868. And insert this one line:
  5869. # }
  5870. + int number_userrecs(void)
  5871. # {
  5872. #   open_user();
  5873. #   return((int) (filelength(userfile)/syscfg.userreclen)-1);
  5874.  
  5875. Starting at line #605, delete this one line:
  5876. # }
  5877. - void save_status()
  5878. # {
  5879. #   char s[80];
  5880. And insert this one line:
  5881. # }
  5882. + void save_status(void)
  5883. # {
  5884. #   char s[80];
  5885.  
  5886. Starting at line #619, delete this one line:
  5887. - double ratio()
  5888. # {
  5889. #   double r;
  5890. And insert this one line:
  5891. + double ratio(void)
  5892. # {
  5893. #   double r;
  5894.  
  5895. Starting at line #632, delete this one line:
  5896. # }
  5897. - double post_ratio()
  5898. # {
  5899. #   double r;
  5900. And insert this one line:
  5901. # }
  5902. + double post_ratio(void)
  5903. # {
  5904. #   double r;
  5905.  
  5906. Starting at line #688, delete this one line:
  5907. #   return(o);
  5908. # }
  5909. - double nsl()
  5910. # {
  5911. #   double tlt,tlc,tot,tpl,tpd,dd,rtn;
  5912. #   slrec xx;
  5913. And insert this one line:
  5914. #   return(o);
  5915. # }
  5916. + double nsl(void)
  5917. # {
  5918. #   double tlt,tlc,tot,tpl,tpd,dd,rtn;
  5919. #   slrec xx;
  5920.  
  5921. Starting at line #734, delete this one line:
  5922. # }
  5923. - char *date()
  5924. # {
  5925. #   static char ds[9];
  5926. #   struct date today;
  5927. And insert this one line:
  5928. # }
  5929. + char *date(void)
  5930. # {
  5931. #   static char ds[9];
  5932. #   struct date today;
  5933.  
  5934. Starting at line #744, delete this one line:
  5935. #   return(ds);
  5936. # }
  5937. - char *times()
  5938. # {
  5939. #   static char ti[9];
  5940. #   int h,m,s;
  5941. And insert this one line:
  5942. #   return(ds);
  5943. # }
  5944. + char *times(void)
  5945. # {
  5946. #   static char ti[9];
  5947. #   int h,m,s;
  5948.  
  5949. Starting at line #809, delete this one line:
  5950. # }
  5951. - void changedsl()
  5952. # {
  5953. #   int i,i1,i2,i3,i4,ok,dp,ddp;
  5954. #   subboardrec s;
  5955. And insert this one line:
  5956. # }
  5957. + void changedsl(void)
  5958. # {
  5959. #   int i,i1,i2,i3,i4,ok,dp,ddp;
  5960. #   subboardrec s;
  5961.  
  5962. Starting at line #825, delete this one line:
  5963. #     s1.keys[i]=0;
  5964. #   }
  5965. #   s1.subnum=-1;
  5966. -   for (i=0; i<MAX_SUBS; i++)
  5967. #     usub[i]=s1;
  5968. #   for (i=0; i<MAX_DIRS; i++)
  5969. #     udir[i]=s1;
  5970. And insert this one line:
  5971. #     s1.keys[i]=0;
  5972. #   }
  5973. #   s1.subnum=-1;
  5974. +   for (i=0; i<max_subs; i++)
  5975. #     usub[i]=s1;
  5976. #   for (i=0; i<MAX_DIRS; i++)
  5977. #     udir[i]=s1;
  5978.  
  5979. Starting at line #837, delete this one line:
  5980. #     s=subboards[i];
  5981. #     if (actsl<s.readsl)
  5982. #       ok=0;
  5983. -     if (thisuser.age<s.age)
  5984. #       ok=0;
  5985. #     if ((s.ar!=0) && (((thisuser.ar) & (s.ar))==0))
  5986. #       ok=0;
  5987. And insert this one line:
  5988. #     s=subboards[i];
  5989. #     if (actsl<s.readsl)
  5990. #       ok=0;
  5991. +     if (thisuser.age<(s.age&0x7f))
  5992. #       ok=0;
  5993. #     if ((s.ar!=0) && (((thisuser.ar) & (s.ar))==0))
  5994. #       ok=0;
  5995.  
  5996. Starting at line #1011, delete this one line:
  5997. # }
  5998. - int find_interrupt()
  5999. # {
  6000. #   long far *l;
  6001. #   int i;
  6002. And insert this one line:
  6003. # }
  6004. + int find_interrupt(void)
  6005. # {
  6006. #   long far *l;
  6007. #   int i;
  6008.  
  6009. Starting at line #1035, delete this one line:
  6010. #   int f;
  6011. #   char s[100];
  6012. -   sprintf(s,"%sP1.NET",syscfg.datadir);
  6013. #   f=open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  6014. #   lseek(f,0L,SEEK_END);
  6015. #   if (!list)
  6016. And insert this one line:
  6017. #   int f;
  6018. #   char s[100];
  6019. +   sprintf(s,"%sP1.NET",net_data);
  6020. #   f=open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  6021. #   lseek(f,0L,SEEK_END);
  6022. #   if (!list)
  6023.  
  6024.  
  6025. /*****************************************************************************/
  6026. version.c:
  6027.  
  6028.  
  6029. Starting at line #16, delete this one line:
  6030. # *****************************************************************************/
  6031. - char *wwiv_version = "WWIV v4.21";
  6032. # unsigned int wwiv_num_version=421;
  6033. And insert this one line:
  6034. # *****************************************************************************/
  6035. + char *wwiv_version = "WWIV v4.21a";
  6036. # unsigned int wwiv_num_version=421;
  6037.  
  6038.  
  6039. /*****************************************************************************/
  6040. voteedit.c:
  6041.  
  6042.  
  6043. Starting at line #91, delete this one line:
  6044. # }
  6045. - void ivotes()
  6046. # {
  6047. #   int i,f,abort,n,done;
  6048. #   char s[81];
  6049. And insert this one line:
  6050. # }
  6051. + void ivotes(void)
  6052. # {
  6053. #   int i,f,abort,n,done;
  6054. #   char s[81];
  6055.  
  6056. Starting at line #126, delete this one line:
  6057. # }
  6058. - void voteprint()
  6059. # {
  6060. #   int f,f1,i,i1,i2,i3,nu;
  6061. #   char s[81],s1[81],s2[81];
  6062. And insert this one line:
  6063. # }
  6064. + void voteprint(void)
  6065. # {
  6066. #   int f,f1,i,i1,i2,i3,nu;
  6067. #   char s[81],s1[81],s2[81];
  6068.  
  6069.  
  6070. /*****************************************************************************/
  6071. xfer.c:
  6072.  
  6073.  
  6074. Starting at line #123, delete this one line:
  6075. #   }
  6076. # }
  6077. - void find_devices()
  6078. # {
  6079. #   finddevs(NULL, &num_devices);
  6080. #   devices=farmalloc((num_devices+2)*9);
  6081. And insert this one line:
  6082. #   }
  6083. # }
  6084. + void find_devices(void)
  6085. # {
  6086. #   finddevs(NULL, &num_devices);
  6087. #   devices=farmalloc((num_devices+2)*9);
  6088.  
  6089. Starting at line #142, delete this one line:
  6090. #     ch=s[i];
  6091. #     if ((ch==' ') || (ch=='/') || (ch=='\\') || (ch==':') ||
  6092. #         (ch=='>') || (ch=='<') || (ch=='|')  || (ch=='+') ||
  6093. -         (ch==',') || (ch==';') || (ch=='^')  || (ch>126))
  6094. #       return(0);
  6095. #   }
  6096. And insert these 2 lines:
  6097. #     ch=s[i];
  6098. #     if ((ch==' ') || (ch=='/') || (ch=='\\') || (ch==':') ||
  6099. #         (ch=='>') || (ch=='<') || (ch=='|')  || (ch=='+') ||
  6100. +         (ch==',') || (ch==';') || (ch=='^')  || (ch=='\"') ||
  6101. +         (ch=='\'') || (ch>126))
  6102. #       return(0);
  6103. #   }
  6104.  
  6105. Starting at line #156, delete this one line:
  6106. #   return(1);
  6107. # }
  6108. - void print_devices()
  6109. # {
  6110. #   int i;
  6111. #   for (i=0; i<num_devices; i++)
  6112. And insert this one line:
  6113. #   return(1);
  6114. # }
  6115. + void print_devices(void)
  6116. # {
  6117. #   int i;
  6118. #   for (i=0; i<num_devices; i++)
  6119.  
  6120. Starting at line #261, delete this one line:
  6121. # }
  6122. - int ratio_ok()
  6123. # {
  6124. #   int ok=1;
  6125. #   char s[101];
  6126. And insert this one line:
  6127. # }
  6128. + int ratio_ok(void)
  6129. # {
  6130. #   int ok=1;
  6131. #   char s[101];
  6132.  
  6133. Starting at line #293, delete this one line:
  6134. # }
  6135. - int dcs()
  6136. # {
  6137. #   if (cs())
  6138. #     return(1);
  6139. And insert this one line:
  6140. # }
  6141. + int dcs(void)
  6142. # {
  6143. #   if (cs())
  6144. #     return(1);
  6145.  
  6146. Starting at line #376, delete this one line:
  6147. # }
  6148. - void dliscan()
  6149. # {
  6150. #   dliscan1(udir[curdir].subnum);
  6151. # }
  6152. And insert this one line:
  6153. # }
  6154. + void dliscan(void)
  6155. # {
  6156. #   dliscan1(udir[curdir].subnum);
  6157. # }
  6158.  
  6159. Starting at line #382, delete this one line:
  6160. # }
  6161. - void closedl()
  6162. # {
  6163. #   if (dlf>0) {
  6164. #     close(dlf);
  6165. And insert this one line:
  6166. # }
  6167. + void closedl(void)
  6168. # {
  6169. #   if (dlf>0) {
  6170. #     close(dlf);
  6171.  
  6172. Starting at line #506, delete this one line:
  6173. - void modify_extended_description(char **sss)
  6174. # {
  6175. #   char s[161],s1[161];
  6176. #   int f,ii,i,i1,i2;
  6177. And insert this one line:
  6178. + void modify_extended_description(char **sss, char *dest, char *title)
  6179. # {
  6180. #   char s[161],s1[161];
  6181. #   int f,ii,i,i1,i2;
  6182.  
  6183. Starting at line #543, delete this one line:
  6184. #       i=thisuser.screenchars;
  6185. #       if (thisuser.screenchars>(76-INDENTION))
  6186. #         thisuser.screenchars=76-INDENTION;
  6187. -       i1=external_edit("extended.dsc",syscfg.tempdir,(int) thisuser.defed-1,MAX_LINES);
  6188. #       thisuser.screenchars=i;
  6189. #       if (i1) {
  6190. #         if ((*sss=malloca(10240))==NULL)
  6191. And insert these 2 lines:
  6192. #       i=thisuser.screenchars;
  6193. #       if (thisuser.screenchars>(76-INDENTION))
  6194. #         thisuser.screenchars=76-INDENTION;
  6195. +       i1=external_edit("extended.dsc",syscfg.tempdir,(int) thisuser.defed-1,
  6196. +         MAX_LINES, dest, title, 1);
  6197. #       thisuser.screenchars=i;
  6198. #       if (i1) {
  6199. #         if ((*sss=malloca(10240))==NULL)
  6200.  
  6201. Starting at line #764, delete this one line:
  6202. # }
  6203. - void listfiles()
  6204. # {
  6205. #   char s[81];
  6206. #   int i,abort,next=0;
  6207. And insert this one line:
  6208. # }
  6209. + void listfiles(void)
  6210. # {
  6211. #   char s[81];
  6212. #   int i,abort,next=0;
  6213.  
  6214. Starting at line #827, delete this one line:
  6215. # }
  6216. - void nscanall()
  6217. # {
  6218. #   int abort,i,i1;
  6219. #   char s[81];
  6220. And insert this one line:
  6221. # }
  6222. + void nscanall(void)
  6223. # {
  6224. #   int abort,i,i1;
  6225. #   char s[81];
  6226.  
  6227. Starting at line #854, delete this one line:
  6228. # }
  6229. - void searchall()
  6230. # {
  6231. #   int i,i1,pts,abort,pty,ocd,next=0;
  6232. #   char s[81],s1[81];
  6233. And insert this one line:
  6234. # }
  6235. + void searchall(void)
  6236. # {
  6237. #   int i,i1,pts,abort,pty,ocd,next=0;
  6238. #   char s[81],s1[81];
  6239.  
  6240. Starting at line #1076, delete this one line:
  6241. #   u.numdloads=0;
  6242. #   u.filetype=0;
  6243. #   u.mask=0;
  6244. -   strcpy(u.upby,nam1(&thisuser,usernum,syscfg.systemnumber));
  6245. #   strcpy(u.date,date());
  6246. #   nl();
  6247. #   ok=1;
  6248. And insert this one line:
  6249. #   u.numdloads=0;
  6250. #   u.filetype=0;
  6251. #   u.mask=0;
  6252. +   strcpy(u.upby,nam(&thisuser,usernum));
  6253. #   strcpy(u.date,date());
  6254. #   nl();
  6255. #   ok=1;
  6256.  
  6257. Starting at line #1185, delete this one line:
  6258. #       inputl(u.description,58);
  6259. #       nl();
  6260. #       ss=NULL;
  6261. -       modify_extended_description(&ss);
  6262. #       if (ss) {
  6263. #         add_extended_description(u.filename,ss);
  6264. #         u.mask |= mask_extended;
  6265. And insert this one line:
  6266. #       inputl(u.description,58);
  6267. #       nl();
  6268. #       ss=NULL;
  6269. +       modify_extended_description(&ss, directories[dn].name,u.filename);
  6270. #       if (ss) {
  6271. #         add_extended_description(u.filename,ss);
  6272. #         u.mask |= mask_extended;
  6273.  
  6274. Starting at line #1362, delete this one line:
  6275. # /****************************************************************************/
  6276. - void download()
  6277. # {
  6278. #   char s[81];
  6279. #   int dn;
  6280. And insert this one line:
  6281. # /****************************************************************************/
  6282. + void download(void)
  6283. # {
  6284. #   char s[81];
  6285. #   int dn;
  6286.  
  6287. Starting at line #1396, delete this one line:
  6288. # }
  6289. - void setldate()
  6290. # {
  6291. #   struct date d;
  6292. #   struct time t;
  6293. And insert this one line:
  6294. # }
  6295. + void setldate(void)
  6296. # {
  6297. #   struct date d;
  6298. #   struct time t;
  6299.  
  6300. Starting at line #1434, delete this one line:
  6301. # }
  6302. - void finddescription()
  6303. # {
  6304. #   uploadsrec u;
  6305. #   int i,i1,i2,abort,pty,d,ocd,pts,next=0;
  6306. And insert this one line:
  6307. # }
  6308. + void finddescription(void)
  6309. # {
  6310. #   uploadsrec u;
  6311. #   int i,i1,i2,abort,pty,d,ocd,pts,next=0;
  6312.  
  6313. Starting at line #1498, delete this one line:
  6314. # }
  6315. - void arc_l()
  6316. # {
  6317. #   char s[81],s1[81],s2[81];
  6318. #   int i,abort,next,i1;
  6319. And insert this one line:
  6320. # }
  6321. + void arc_l(void)
  6322. # {
  6323. #   char s[81],s1[81],s2[81];
  6324. #   int i,abort,next,i1;
  6325.  
  6326. Starting at line #1534, delete this one line:
  6327. # /****************************************************************************/
  6328. - void yourinfodl()
  6329. # {
  6330. #   nl();
  6331. And insert this one line:
  6332. # /****************************************************************************/
  6333. + void yourinfodl(void)
  6334. # {
  6335. #   nl();
  6336.  
  6337. Starting at line #1546, delete this one line:
  6338. #   nl();
  6339. # }
  6340. - void l_config_nscan()
  6341. # {
  6342. #   int i,abort,i1;
  6343. #   char s[81], s2[81];
  6344. And insert this one line:
  6345. #   nl();
  6346. # }
  6347. + void l_config_nscan(void)
  6348. # {
  6349. #   int i,abort,i1;
  6350. #   char s[81], s2[81];
  6351.  
  6352. Starting at line #1575, delete this one line:
  6353. #   nl();
  6354. # }
  6355. - void config_nscan()
  6356. # {
  6357. #   char *s;
  6358. #   int i,done,i1;
  6359. And insert this one line:
  6360. #   nl();
  6361. # }
  6362. + void config_nscan(void)
  6363. # {
  6364. #   char *s;
  6365. #   int i,done,i1;
  6366.  
  6367. Starting at line #1604, delete this one line:
  6368. # }
  6369. - void xfer_defaults()
  6370. # {
  6371. #   char s[81],s1[81],ch;
  6372. #   int i,i1,i2,done;
  6373. And insert this one line:
  6374. # }
  6375. + void xfer_defaults(void)
  6376. # {
  6377. #   char s[81],s1[81],ch;
  6378. #   int i,i1,i2,done;
  6379.  
  6380. Starting at line #1674, delete this one line:
  6381. # }
  6382. - void removefile()
  6383. # {
  6384. #   int i,i1,ok,rm,abort,rdlp;
  6385. #   char ch,s[81],s1[81];
  6386. And insert this one line:
  6387. # }
  6388. + void removefile(void)
  6389. # {
  6390. #   int i,i1,ok,rm,abort,rdlp;
  6391. #   char ch,s[81],s1[81];
  6392.  
  6393.  
  6394. /*****************************************************************************/
  6395. xferovl.c:
  6396.  
  6397.  
  6398. Starting at line #28, delete this one line:
  6399. # #define SETREC(i)  lseek(dlf,((long) (i))*((long)sizeof(uploadsrec)),SEEK_SET);
  6400. - void move_file()
  6401. # {
  6402. #   char sx[81],s[81],s1[81],s2[81],ch,*ss;
  6403. #   int i,i1,ok,d1,d2,done,cp;
  6404. And insert this one line:
  6405. # #define SETREC(i)  lseek(dlf,((long) (i))*((long)sizeof(uploadsrec)),SEEK_SET);
  6406. + void move_file(void)
  6407. # {
  6408. #   char sx[81],s[81],s1[81],s2[81],ch,*ss;
  6409. #   int i,i1,ok,d1,d2,done,cp;
  6410.  
  6411. Starting at line #271, delete this one line:
  6412. # }
  6413. - void rename_file()
  6414. # {
  6415. #   char s[81],s1[81],s2[81],*ss,s3[81],ch;
  6416. #   int i,cp;
  6417. And insert this one line:
  6418. # }
  6419. + void rename_file(void)
  6420. # {
  6421. #   char s[81],s1[81],s2[81],*ss,s3[81],ch;
  6422. #   int i,cp;
  6423.  
  6424. Starting at line #355, delete this one line:
  6425. #           u.mask &= ~mask_extended;
  6426. #         } else {
  6427. #           u.mask |= mask_extended;
  6428. -           modify_extended_description(&ss);
  6429. #           if (ss) {
  6430. #             delete_extended_description(u.filename);
  6431. #             add_extended_description(u.filename,ss);
  6432. And insert these 2 lines:
  6433. #           u.mask &= ~mask_extended;
  6434. #         } else {
  6435. #           u.mask |= mask_extended;
  6436. +           modify_extended_description(&ss,
  6437. +             directories[udir[curdir].subnum].name,u.filename);
  6438. #           if (ss) {
  6439. #             delete_extended_description(u.filename);
  6440. #             add_extended_description(u.filename,ss);
  6441.  
  6442. Starting at line #363, delete this one line:
  6443. #           }
  6444. #         }
  6445. #       } else {
  6446. -         modify_extended_description(&ss);
  6447. #         if (ss) {
  6448. #           add_extended_description(u.filename,ss);
  6449. #           farfree(ss);
  6450. And insert these 2 lines:
  6451. #           }
  6452. #         }
  6453. #       } else {
  6454. +         modify_extended_description(&ss,
  6455. +             directories[udir[curdir].subnum].name,u.filename);
  6456. #         if (ss) {
  6457. #           add_extended_description(u.filename,ss);
  6458. #           farfree(ss);
  6459.  
  6460. Starting at line #419, delete this one line:
  6461. #     l=filelength(f);
  6462. #     u.numbytes=l;
  6463. #     close(f);
  6464. -     strcpy(u.upby,nam1(&thisuser,usernum,syscfg.systemnumber));
  6465. #     strcpy(u.date,date());
  6466. #     if (d.mask & mask_PD)
  6467. #       d.mask=mask_PD;
  6468. And insert this one line:
  6469. #     l=filelength(f);
  6470. #     u.numbytes=l;
  6471. #     close(f);
  6472. +     strcpy(u.upby, nam(&thisuser,usernum));
  6473. #     strcpy(u.date,date());
  6474. #     if (d.mask & mask_PD)
  6475. #       d.mask=mask_PD;
  6476.  
  6477. Starting at line #504, add these 4 lines:
  6478. #   f=fopen(fn,"r");
  6479. #   if (!f) {
  6480. +     sprintf(s,"%s%s",directories[dn].path,fn);
  6481. +     f=fopen(s,"r");
  6482. +   }
  6483. +   if (!f) {
  6484. #     npr("\r\nFile '%s' not found.\r\n\r\n",fn);
  6485. #   } else {
  6486. #     while (ok && fgets(s,250,f)) {
  6487.  
  6488. Starting at line #508, delete this one line:
  6489. #     npr("\r\nFile '%s' not found.\r\n\r\n",fn);
  6490. #   } else {
  6491. #     while (ok && fgets(s,250,f)) {
  6492. -       if ((s[0]<=32) || (s[0]>127))
  6493. #         continue;
  6494. #       ok1=0;
  6495. #       fn1=strtok(s," \t\n");
  6496. And insert this one line:
  6497. #     npr("\r\nFile '%s' not found.\r\n\r\n",fn);
  6498. #   } else {
  6499. #     while (ok && fgets(s,250,f)) {
  6500. +       if (s[0]<=32)
  6501. #         continue;
  6502. #       ok1=0;
  6503. #       fn1=strtok(s," \t\n");
  6504.  
  6505.  
  6506. /*****************************************************************************/
  6507. xfertmp.c:
  6508.  
  6509.  
  6510. Starting at line #452, add these 2 lines:
  6511. #   get_arc_cmd(s,s1,2,fn);
  6512. #   if (s[0]) {
  6513. #     cd_to(syscfg.tempdir);
  6514. +     outs(s);
  6515. +     outs("\r\n");
  6516. #     if (dos) {
  6517. #       do_external(s,0);
  6518. #     } else {
  6519.  
  6520. Starting at line #467, delete this one line:
  6521. #     pl("Sorry, can't add to temp archive.");
  6522. # }
  6523. - void add_temp_arc()
  6524. # {
  6525. #   char s[81],s2[81];
  6526. #   int i;
  6527. And insert this one line:
  6528. #     pl("Sorry, can't add to temp archive.");
  6529. # }
  6530. + void add_temp_arc(void)
  6531. # {
  6532. #   char s[81],s2[81];
  6533. #   int i;
  6534.  
  6535. Starting at line #491, delete this one line:
  6536. #   add_arc("TEMP", s2, 1);
  6537. # }
  6538. - void del_temp()
  6539. # {
  6540. #   char s[81],s1[81];
  6541. #   nl();
  6542. And insert this one line:
  6543. #   add_arc("TEMP", s2, 1);
  6544. # }
  6545. + void del_temp(void)
  6546. # {
  6547. #   char s[81],s1[81];
  6548. #   nl();
  6549.  
  6550. Starting at line #506, delete this one line:
  6551. #   }
  6552. # }
  6553. - void list_temp_dir()
  6554. # {
  6555. #   int i,i1,f1,abort;
  6556. #   char s[81],s1[81];
  6557. And insert this one line:
  6558. #   }
  6559. # }
  6560. + void list_temp_dir(void)
  6561. # {
  6562. #   int i,i1,f1,abort;
  6563. #   char s[81],s1[81];
  6564.  
  6565. Starting at line #539, delete this one line:
  6566. # }
  6567. - void temp_extract()
  6568. # {
  6569. #   int i,i1,i2,i3,ok,abort,ok1;
  6570. #   char s[255],s1[255],s2[81],s3[255],s4[129];
  6571. And insert this one line:
  6572. # }
  6573. + void temp_extract(void)
  6574. # {
  6575. #   int i,i1,i2,i3,ok,abort,ok1;
  6576. #   char s[255],s1[255],s2[81],s3[255],s4[129];
  6577.  
  6578. Starting at line #629, delete this one line:
  6579. #   closedl();
  6580. # }
  6581. - void list_temp_text()
  6582. # {
  6583. #   int i,i1,f1,ok,sent;
  6584. #   char s[81],s1[81];
  6585. And insert this one line:
  6586. #   closedl();
  6587. # }
  6588. + void list_temp_text(void)
  6589. # {
  6590. #   int i,i1,f1,ok,sent;
  6591. #   char s[81],s1[81];
  6592.  
  6593. Starting at line #669, delete this one line:
  6594. # }
  6595. - void list_temp_arc()
  6596. # {
  6597. #   char s1[81],s2[81];
  6598. And insert this one line:
  6599. # }
  6600. + void list_temp_arc(void)
  6601. # {
  6602. #   char s1[81],s2[81];
  6603.  
  6604. Starting at line #681, delete this one line:
  6605. - void temporary_stuff()
  6606. # {
  6607. #   char s[81],s1[81],ch;
  6608. #   int done;
  6609. And insert this one line:
  6610. + void temporary_stuff(void)
  6611. # {
  6612. #   char s[81],s1[81],ch;
  6613. #   int done;
  6614.  
  6615.  
  6616. /*****************************************************************************/
  6617. xinit.c:
  6618.  
  6619.  
  6620. Starting at line #45, delete this one line:
  6621. # void far interrupt mpli();
  6622. - void init()
  6623. # {
  6624. #   char s[161],*buf,ch,*ss;
  6625. #   int i,i1,i2,sm,cp,n,f;
  6626. And insert this one line:
  6627. # void far interrupt mpli();
  6628. + void far *mallocx(unsigned long l, char *where)
  6629. # {
  6630. #   void *x;
  6631.  
  6632. Starting at line #46, add these 15 lines:
  6633. # void far *mallocx(unsigned long l, char *where)
  6634. # {
  6635. +   void *x;
  6636. +   x=farmalloc(l);
  6637. +   if (!x) {
  6638. +     printf("Insufficient memory (%ld bytes) for %s.\n",l,where);
  6639. +     end_bbs(noklevel);
  6640. +   }
  6641. +   return(x);
  6642. + }
  6643. + void init(void)
  6644. + {
  6645. #   char s[161],*buf,ch,*ss;
  6646. #   int i,i1,i2,sm,cp,n,f;
  6647. #   long l;
  6648.  
  6649. Starting at line #94, add these 6 lines:
  6650. #   strcpy(cdir,"X:\\");
  6651. #   cdir[0]='A'+getdisk();
  6652. #   getcurdir(0,&(cdir[3]));
  6653. + #ifdef EMS_XMS
  6654. +   if (_OvrInitEms(0,0,16)!=0)
  6655. +     _OvrInitExt(0L,0);
  6656. + #endif
  6657. #   userfile=-1;
  6658. #   configfile=-1;
  6659. #   statusfile=-1;
  6660.  
  6661. Starting at line #126, delete these 2 lines:
  6662. #   chat_file=0;
  6663. #   do_event=0;
  6664. #   sysop_alert=0;
  6665. -   ncn=NULL;
  6666. -   num_ncn=0;
  6667. #   global_handle=0;
  6668. #   for (i=0; i<25; i++)
  6669.  
  6670. Starting at line #169, delete this one line:
  6671. #   close(configfile);
  6672. #   /* update user info data */
  6673. -   syscfg.userreclen=sizeof(userrec);
  6674. #   syscfg.waitingoffset=FP_OFF(&(thisuser.waiting))-FP_OFF(&thisuser);
  6675. #   syscfg.inactoffset=FP_OFF(&(thisuser.inact))-FP_OFF(&thisuser);
  6676. #   syscfg.sysstatusoffset=FP_OFF(&(thisuser.sysstatus))-FP_OFF(&thisuser);
  6677. And insert these 2 lines:
  6678. #   close(configfile);
  6679. #   /* update user info data */
  6680. +   if (!syscfg.userreclen)
  6681. +     syscfg.userreclen=700;
  6682. #   syscfg.waitingoffset=FP_OFF(&(thisuser.waiting))-FP_OFF(&thisuser);
  6683. #   syscfg.inactoffset=FP_OFF(&(thisuser.inact))-FP_OFF(&thisuser);
  6684. #   syscfg.sysstatusoffset=FP_OFF(&(thisuser.sysstatus))-FP_OFF(&thisuser);
  6685.  
  6686. Starting at line #172, add these 3 lines:
  6687. #   syscfg.waitingoffset=FP_OFF(&(thisuser.waiting))-FP_OFF(&thisuser);
  6688. #   syscfg.inactoffset=FP_OFF(&(thisuser.inact))-FP_OFF(&thisuser);
  6689. #   syscfg.sysstatusoffset=FP_OFF(&(thisuser.sysstatus))-FP_OFF(&thisuser);
  6690. +   syscfg.fuoffset=FP_OFF(&(thisuser.forwardusr))-FP_OFF(&thisuser);
  6691. +   syscfg.fsoffset=FP_OFF(&(thisuser.forwardsys))-FP_OFF(&thisuser);
  6692. +   syscfg.fnoffset=FP_OFF(&(thisuser.net_num))-FP_OFF(&thisuser);
  6693. #   /* check for changes in userrec - hack code */
  6694. # #pragma warn -rch
  6695.  
  6696. Starting at line #173, add these 6 lines:
  6697. #   syscfg.fsoffset=FP_OFF(&(thisuser.forwardsys))-FP_OFF(&thisuser);
  6698. #   syscfg.fnoffset=FP_OFF(&(thisuser.net_num))-FP_OFF(&thisuser);
  6699. +   /* check for changes in userrec - hack code */
  6700. + #pragma warn -rch
  6701. +   if (sizeof(userrec)!=832)
  6702. +     syscfg.userreclen=sizeof(userrec);
  6703. + #pragma warn +rch
  6704. #   /* store the new config.dat file */
  6705. #   configfile=open("CONFIG.DAT",O_RDWR | O_BINARY);
  6706. #   write(configfile,(void *) (&syscfg), sizeof(configrec));
  6707.  
  6708. Starting at line #181, add these 24 lines:
  6709. #   if (!syscfg.primaryport)
  6710. #     ok_modem_stuff=0;
  6711. +   net_networks=NULL;
  6712. +   net_num=0;
  6713. +   sprintf(s,"%sNETWORKS.DAT", syscfg.datadir);
  6714. +   f=open(s,O_RDONLY|O_BINARY);
  6715. +   if (f>0) {
  6716. +     net_num_max=filelength(f)/sizeof(net_networks_rec);
  6717. +     if (net_num_max) {
  6718. +       net_networks=mallocx(net_num_max*sizeof(net_networks_rec),"networks.dat");
  6719. +       read(f, net_networks, net_num_max*sizeof(net_networks_rec));
  6720. +     }
  6721. +     close(f);
  6722. +   }
  6723. +   if (!net_networks) {
  6724. +     net_networks=mallocx(sizeof(net_networks_rec), "networks.dat");
  6725. +     memset(net_networks, 0, sizeof(net_networks_rec));
  6726. +     net_num_max=1;
  6727. +     strcpy(net_networks->name,"WWIVnet");
  6728. +     strcpy(net_networks->dir, syscfg.datadir);
  6729. +     net_networks->sysnum=syscfg.systemnumber;
  6730. +   }
  6731. +   set_net_num(0);
  6732. #   strcpy(s,syscfg.tempdir);
  6733. #   i=strlen(s);
  6734. #   if (s[0]==0)
  6735.  
  6736. Starting at line #223, delete these 3 lines:
  6737. #   read(statusfile,(void *)(&status), sizeof(statusrec));
  6738. #   close(statusfile);
  6739. #   status.wwiv_version=wwiv_num_version;
  6740. -   gat=(short *) mallocx(2048 * sizeof(short));
  6741. -   smallist=(smalrec *) mallocx((long)syscfg.maxusers * (long)sizeof(smalrec));
  6742. -   gfilesec=(gfiledirrec *) mallocx((long) (32 * sizeof(gfiledirrec)));
  6743. #   screensave.scrn1=(char *)mallocx(screenlen);
  6744. And insert these 4 lines:
  6745. #   read(statusfile,(void *)(&status), sizeof(statusrec));
  6746. #   close(statusfile);
  6747. #   status.wwiv_version=wwiv_num_version;
  6748. +   gat=(short *) mallocx(2048 * sizeof(short), "gat");
  6749. +   smallist=(smalrec *) mallocx((long)syscfg.maxusers * (long)sizeof(smalrec),
  6750. +                                "names.lst - try decreasing max users in INIT");
  6751. +   gfilesec=(gfiledirrec *) mallocx((long) (32 * sizeof(gfiledirrec)), "gfiles");
  6752. #   screensave.scrn1=(char *)mallocx(screenlen, "screensave");
  6753.  
  6754. Starting at line #227, delete this one line:
  6755. #   smallist=(smalrec *) mallocx((long)syscfg.maxusers * (long)sizeof(smalrec));
  6756. #   gfilesec=(gfiledirrec *) mallocx((long) (32 * sizeof(gfiledirrec)));
  6757. -   screensave.scrn1=(char *)mallocx(screenlen);
  6758. #   read_in_file("MENUS.MSG",(menus),30);
  6759. #   read_in_file("HELP.MSG",(helps),50);
  6760. And insert this one line:
  6761. #                                "names.lst - try decreasing max users in INIT");
  6762. #   gfilesec=(gfiledirrec *) mallocx((long) (32 * sizeof(gfiledirrec)), "gfiles");
  6763. +   screensave.scrn1=(char *)mallocx(screenlen, "screensave");
  6764. #   read_in_file("MENUS.MSG",(menus),30);
  6765. #   read_in_file("HELP.MSG",(helps),50);
  6766.  
  6767. Starting at line #261, delete these 2 lines:
  6768. #   read(i,(void *) (smallist), (sizeof(smalrec) * status.users));
  6769. #   close(i);
  6770. -   subboards=(subboardrec *) mallocx(MAX_SUBS*sizeof(subboardrec));
  6771. -   directories=(directoryrec *)mallocx(MAX_DIRS*sizeof(directoryrec));
  6772. #   sprintf(s,"%sSUBS.DAT",syscfg.datadir);
  6773. #   i=open(s,O_RDWR | O_BINARY);
  6774. And insert these 4 lines:
  6775. #   read(i,(void *) (smallist), (sizeof(smalrec) * status.users));
  6776. #   close(i);
  6777. +   if (syscfg.userreclen == sizeof(userrec))
  6778. +     max_subs=MAX_SUBS;
  6779. +   else
  6780. +     max_subs=32;
  6781. #   subboards=(subboardrec *) mallocx(max_subs*sizeof(subboardrec), "subboards");
  6782. #   directories=(directoryrec *)mallocx(MAX_DIRS*sizeof(directoryrec), "directories");
  6783.  
  6784. Starting at line #263, add these 3 lines:
  6785. #   else
  6786. #     max_subs=32;
  6787. +   subboards=(subboardrec *) mallocx(max_subs*sizeof(subboardrec), "subboards");
  6788. +   directories=(directoryrec *)mallocx(MAX_DIRS*sizeof(directoryrec), "directories");
  6789. #   sprintf(s,"%sSUBS.DAT",syscfg.datadir);
  6790. #   i=open(s,O_RDWR | O_BINARY);
  6791. #   if (i<0) {
  6792.  
  6793. Starting at line #270, delete this one line:
  6794. #     printf("%s NOT FOUND.\n",s);
  6795. #     end_bbs(noklevel);
  6796. #   }
  6797. -   num_subs=(read(i,subboards, (MAX_SUBS*sizeof(subboardrec))))/
  6798. #            sizeof(subboardrec);
  6799. #   close(i);
  6800. And insert this one line:
  6801. #     printf("%s NOT FOUND.\n",s);
  6802. #     end_bbs(noklevel);
  6803. #   }
  6804. +   num_subs=(read(i,subboards, (max_subs*sizeof(subboardrec))))/
  6805. #            sizeof(subboardrec);
  6806. #   close(i);
  6807.  
  6808. Starting at line #284, delete this one line:
  6809. #            sizeof(directoryrec);
  6810. #   close(i);
  6811. -   chains=(chainfilerec *) mallocx(50 * sizeof(chainfilerec));
  6812. #   numextrn=0;
  6813. #   numchain=0;
  6814. #   numed=0;
  6815. And insert this one line:
  6816. #            sizeof(directoryrec);
  6817. #   close(i);
  6818. +   chains=(chainfilerec *) mallocx(50 * sizeof(chainfilerec), "chains");
  6819. #   numextrn=0;
  6820. #   numchain=0;
  6821. #   numed=0;
  6822.  
  6823. Starting at line #299, delete this one line:
  6824. #   i=open(s,O_RDWR | O_BINARY);
  6825. #   if (i>0) {
  6826. #     l=filelength(i);
  6827. -     modem_i = mallocx(l);
  6828. #     read(i,modem_i, (unsigned) l);
  6829. #     close(i);
  6830. #   } else {
  6831. And insert this one line:
  6832. #   i=open(s,O_RDWR | O_BINARY);
  6833. #   if (i>0) {
  6834. #     l=filelength(i);
  6835. +     modem_i = mallocx(l, "modem.dat");
  6836. #     read(i,modem_i, (unsigned) l);
  6837. #     close(i);
  6838. #   } else {
  6839.  
  6840. Starting at line #313, delete this one line:
  6841. #     l=filelength(i);
  6842. #     if (l>15*sizeof(newexternalrec))
  6843. #       l=15*sizeof(newexternalrec);
  6844. -     externs=mallocx(l+10);
  6845. #     numextrn=(read(i,(void *)externs, (unsigned) l))/sizeof(newexternalrec);
  6846. #     close(i);
  6847. #   } else
  6848. And insert this one line:
  6849. #     l=filelength(i);
  6850. #     if (l>15*sizeof(newexternalrec))
  6851. #       l=15*sizeof(newexternalrec);
  6852. +     externs=mallocx(l+10, "external protocols");
  6853. #     numextrn=(read(i,(void *)externs, (unsigned) l))/sizeof(newexternalrec);
  6854. #     close(i);
  6855. #   } else
  6856.  
  6857. Starting at line #326, delete this one line:
  6858. #     l=filelength(i);
  6859. #     if (l>10*sizeof(editorrec))
  6860. #       l=10*sizeof(editorrec);
  6861. -     editors=mallocx(l+10);
  6862. #     numed=(read(i,(void *)editors, (unsigned) l))/sizeof(editorrec);
  6863. #     numed=numed;
  6864. #     close(i);
  6865. And insert this one line:
  6866. #     l=filelength(i);
  6867. #     if (l>10*sizeof(editorrec))
  6868. #       l=10*sizeof(editorrec);
  6869. +     editors=mallocx(l+10, "external editors");
  6870. #     numed=(read(i,(void *)editors, (unsigned) l))/sizeof(editorrec);
  6871. #     numed=numed;
  6872. #     close(i);
  6873.  
  6874. Starting at line #331, delete this one line:
  6875. #     numed=numed;
  6876. #     close(i);
  6877. #   }
  6878. -   batch=mallocx(MAX_BATCH * sizeof(batchrec));
  6879. #   read_user(1,&thisuser);
  6880. #   if (thisuser.inact & inact_deleted)
  6881. And insert this one line:
  6882. #     numed=numed;
  6883. #     close(i);
  6884. #   }
  6885. +   batch=mallocx(MAX_BATCH * sizeof(batchrec), "batch list");
  6886. #   read_user(1,&thisuser);
  6887. #   if (thisuser.inact & inact_deleted)
  6888.  
  6889. Starting at line #363, delete this one line:
  6890. #       if (strncmp(environ[i],"DSZLOG=",7)==0)
  6891. #         xenviron[i1++]=strdup(s);
  6892. #       else {
  6893. -         if (strncmp(environ[i],"BBS=",4) && (strncmp(environ[i],"WWIV_FP=",8)))
  6894. #           xenviron[i1++]=environ[i];
  6895. #       }
  6896. #     ++i;
  6897. And insert these 3 lines:
  6898. #       if (strncmp(environ[i],"DSZLOG=",7)==0)
  6899. #         xenviron[i1++]=strdup(s);
  6900. #       else {
  6901. +         if ((strncmp(environ[i],"BBS=",4)) &&
  6902. +             (strncmp(environ[i],"WWIV_FP=",8)) &&
  6903. +             (strncmp(environ[i],"WWIV_NET=",8)))
  6904. #           xenviron[i1++]=environ[i];
  6905. #       }
  6906. #     ++i;
  6907.  
  6908. Starting at line #373, add this one line:
  6909. #     xenviron[i1++]=newprompt;
  6910. #   xenviron[i1++]=ver_no1;
  6911. #   xenviron[i1++]=ver_no2;
  6912. +   xenviron[i1++]=wwiv_net_no;
  6913. #   xenviron[i1]=NULL;
  6914. #   for (i=0; i<20; i++)
  6915. #     questused[i]=0;
  6916.  
  6917. Starting at line #403, delete this one line:
  6918. #     status.callernum=65535;
  6919. #     save_status();
  6920. #   }
  6921. -   msgs=(postrec *) mallocx((long)(255 * sizeof(postrec)));
  6922. #   read_bbs_list_index();
  6923. #   frequent_init();
  6924. #   read_contacts();
  6925. And insert this one line:
  6926. #     status.callernum=65535;
  6927. #     save_status();
  6928. #   }
  6929. +   msgs=(postrec *) mallocx((long)(255 * sizeof(postrec)), "posts");
  6930. #   read_bbs_list_index();
  6931. #   frequent_init();
  6932. #   if (!restoring_shrink && !already_on) {
  6933.  
  6934. Starting at line #406, delete this one line:
  6935. #   msgs=(postrec *) mallocx((long)(255 * sizeof(postrec)));
  6936. #   read_bbs_list_index();
  6937. #   frequent_init();
  6938. -   read_contacts();
  6939. #   if (!restoring_shrink && !already_on) {
  6940. #     remove_from_temp("*.*", syscfg.tempdir, 1);
  6941. #     remove_from_temp("*.*", syscfg.batchdir, 1);
  6942.  
  6943. Starting at line #418, delete this one line:
  6944. #   find_devices();
  6945. #   if (!restoring_shrink) {
  6946. -     sprintf(s,"BBS brought up at %s on %s.",times(), date());
  6947. #     sl1(0,"");
  6948. #     sl1(0,s);
  6949. #     sl1(0,"");
  6950. And insert this one line:
  6951. #   find_devices();
  6952. #   if (!restoring_shrink) {
  6953. +     sprintf(s,"%s brought up at %s on %s.",wwiv_version, times(), date());
  6954. #     sl1(0,"");
  6955. #     sl1(0,s);
  6956. #     sl1(0,"");
  6957.  
  6958.  
  6959. /*****************************************************************************/
  6960. net.h:
  6961.  
  6962.  
  6963. Starting at line #218, add these 11 lines:
  6964. # } sys_for_rec;
  6965. + typedef struct {
  6966. +         unsigned char   type;           /* type of network */
  6967. +         char            name[16];       /* network name */
  6968. +         char            dir[69];        /* directory for net data */
  6969. +         unsigned short  sysnum;         /* system number */
  6970. +         net_call_out_rec *con;          /* ptr to callout data */
  6971. +         net_contact_rec *ncn;           /* ptr to contact info */
  6972. +         int             num_con;        /* number in array */
  6973. +         int             num_ncn;        /* number in array */
  6974. + } net_networks_rec;
  6975. # #endif
  6976.  
  6977.  
  6978. /*****************************************************************************/
  6979. vardec.h:
  6980.  
  6981.  
  6982. Starting at line #46, delete these 5 lines:
  6983. # /****************************************************************************/
  6984. # /*
  6985. #  * BE CAREFUL with this stuff.  DO NOT try to change MAX_DIRS - you'll have
  6986. -  * to do a lot of additional programming to support more than 64.  Changing
  6987. -  * MAX_SUBS to 64 SHOULD work.
  6988. -  *
  6989. -  * HOWEVER: if you #define EXTENDED (do it BEFORE the #ifdef STANDARD),
  6990. -  * be forewarned that you WILL have to reformat your userlist.
  6991. #  */
  6992. # #ifdef STANDARD
  6993. And insert this one line:
  6994. # /****************************************************************************/
  6995. # /*
  6996. #  * BE CAREFUL with this stuff.  DO NOT try to change MAX_DIRS - you'll have
  6997. +  * to do a lot of additional programming to support more than 64.
  6998. #  */
  6999. # #define EXTENDED
  7000.  
  7001. Starting at line #52, add these 2 lines:
  7002. #  * to do a lot of additional programming to support more than 64.
  7003. #  */
  7004. + #define EXTENDED
  7005. # #ifdef STANDARD
  7006. # #undef EXTENDED
  7007. # #endif
  7008.  
  7009. Starting at line #138, delete this one line:
  7010. #         unsigned char   num_extended;           /* num lines of ext desc */
  7011. #         unsigned char   optional_val;           /* optional lines in msgs */
  7012. #         unsigned long   wwiv_regnum;            /* users WWIV reg number */
  7013. -         char            res[29];                /* reserved bytes */
  7014. # #if MAX_SUBS>32
  7015. #         unsigned long   qscn2;                  /* additional qscan ptr */
  7016. #         unsigned long   qscnptr2[MAX_SUBS-32];  /* additional quickscan ptrs */
  7017. And insert these 2 lines:
  7018. #         unsigned char   num_extended;           /* num lines of ext desc */
  7019. #         unsigned char   optional_val;           /* optional lines in msgs */
  7020. #         unsigned long   wwiv_regnum;            /* users WWIV reg number */
  7021. +         unsigned char   net_num;                /* net_num for forwarding */
  7022. +         char            res[28];                /* reserved bytes */
  7023. # #if MAX_SUBS>32
  7024. #         unsigned long   qscn2;                  /* additional qscan ptr */
  7025. #         unsigned long   qscnptr2[MAX_SUBS-32];  /* additional quickscan ptrs */
  7026.  
  7027. Starting at line #245, delete this one line:
  7028. #         char            batchdir[81];
  7029. #         int             sysstatusoffset;
  7030. #         char            network_type;
  7031. -         char            res[36];               /* RESERVED */
  7032. # } configrec;
  7033. And insert these 4 lines:
  7034. #         char            batchdir[81];
  7035. #         int             sysstatusoffset;
  7036. #         char            network_type;
  7037. +         short           fuoffset,
  7038. +                         fsoffset,
  7039. +                         fnoffset;
  7040. +         char            res[30];               /* RESERVED */
  7041. # } configrec;
  7042.  
  7043. Starting at line #557, add this one line:
  7044. # /* mailrec.status */
  7045. # #define status_multimail 0x01
  7046. # #define status_source_verified 0x02
  7047. + #define status_new_net 0x04
  7048. # /* configrec.sysconfig */
  7049. # #define sysconfig_no_local 0x0001
  7050.  
  7051. Starting at line #574, add this one line:
  7052. # #define sysconfig_shrink_term 0x1000
  7053. # #define sysconfig_free_phone 0x2000
  7054. # #define sysconfig_log_dl 0x4000
  7055. + #define sysconfig_standard_userrec 0x8000
  7056. # /* editorrec.config */
  7057. # #define config_80_25 0x0001
  7058.  
  7059. Starting at line #637, delete this one line:
  7060. # } resultrec;
  7061. - #define VERSION_NUMBER "WWIV v4.21"
  7062. # #define max_buf 1024
  7063. # #define MSG_COLOR 0
  7064. # #define MAX_BATCH 50
  7065.  
  7066.  
  7067.