home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-39A.ZIP / FMD-39A.MOD < prev   
Encoding:
Text File  |  1995-06-22  |  7.9 KB  |  250 lines

  1. Nicolas Leblanc #2 @20302
  2. Sun Jun 18 23:42:05 1995
  3.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  4.    ││                    Alternative Worlds Presents                      │
  5.    └┼─────────────────────────────────────────────────────────────────────┐
  6.    ││ Mod Name       » FMD-39a.MOD                                        │∙
  7.    ││ Difficulty     » ███▒▒▒▒▒▒▒▒ (3/10)                                 │:
  8.    ││ WWIV Version   » 4.24                                               ││
  9.    ││ Date Affected  » 06/01/95                                           ││
  10.    :│ Files Affected » MSGBASE.C / BBSUTL.C / VARS.H                      ││
  11.    ∙│ Description    » Keep Color In Internal Editor                      ││
  12.     └─────────────────────────────────────────────────────────────────────┼┐
  13.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  14. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  15.  
  16.  
  17.  ┌┬══════════════════┐
  18.  ││ Long Description ││
  19.   └══════════════════┴┘
  20.  
  21.    This modification will fix the bug WWIV has when changing line in the normal
  22. WWIV editor, it will keep the color selected on previous lines.
  23.  
  24. Revision A:
  25.  
  26.  - Updated for WWIV v4.24
  27.  
  28.  ┌┬═══════┐
  29.  ││ Tests ││
  30.   └═══════┴┘
  31.  
  32.   This modification has been tested on a virgin WWIV v4.24 source using
  33.   Borland C++ v4.5
  34.  
  35. ──────────────────────────────────────────────────────────────────────────────
  36.                                    Legend
  37.                           ╔═══╤══════════════════┐
  38.                           │ + │ Add This Line    │
  39.                           │ - │ Delete This Line │
  40.                           │ * │ Modify This Line │
  41.                           │ = │ Existing Line    │
  42.                           └═══╧══════════════════╝
  43. ───[Step 1]────────────────────────────────────────────────────────────────────
  44.  
  45. In VARS.H add these to the extern declarations:
  46.  
  47. =               ver_no2[51],wwiv_net_no[20], xdate[9], *xenviron[50],
  48. *               dlfn[81],edlfn[81], nete[5], irt_sub[81], lastcolor;
  49.  
  50. ───[Step 2]────────────────────────────────────────────────────────────────────
  51.  
  52. Load BBSUTL.C and do this change to void inli2
  53.  
  54.  
  55. And lower in the CTRL-P handling..
  56.  
  57. =          case 16: /* Ctrl-P */
  58. =            if (cp<maxlen-1) {
  59. =              ch=getkey();
  60. =              if ((ch>='0') && (ch<='9')) {
  61. =                s[cp++]=3;
  62. =                s[cp++]=ch;
  63. =                ansic(ch-'0');
  64. +                lastcolor=ch;
  65. =              } else if ((ch==16) && (cp<maxlen-2)) {
  66. =                ch=getkey();
  67.  
  68. ───[Step 3]────────────────────────────────────────────────────────────────────
  69.  
  70. Load MSGBASE.C and do this change to read_message1 and in void inmsg:
  71.  
  72. declarations at the top, add:
  73.  
  74. =void inmsg(messagerec *m1, char *title, int *anony, int needtitle, char *aux, int fsed, char *dest, int flags)
  75. ={
  76. *  char s[181],s1[181],ro[81],fnx[81],chx,*ss,*ss1, fn1[81], fn2[81],*nd,tmp[81];
  77.  
  78.  
  79. then, lower:
  80.  
  81. =      bbsfree((void *)lin);
  82. =    setiia(oiia);
  83. =    if (menu_on())
  84. =      rip_restoreall();
  85. =    return;
  86. =  }
  87. +  lastcolor='0';
  88. =  if (!fsed) {
  89. =    outstr(get_string(627));
  90.  
  91. then, lower:
  92.  
  93. =    s[thisuser.screenchars]=0;
  94. =    pl(s);
  95. =
  96. =    while (!done && !hangup) {
  97. =      helpl=27;
  98. +      if (ro[0]!=0) {
  99. +        sprintf(tmp,"%c",lastcolor);
  100. +        strcat(tmp,ro);
  101. +        strcpy(ro,tmp);
  102. +      } else
  103. +        sprintf(ro,"%c",lastcolor);
  104. =      while (inli2(s,ro,160,1,curli)) {
  105. =        --curli;
  106. =        strcpy(ro,&(lin[(curli)*LEN]));
  107. =        if (strlen(ro)>thisuser.screenchars-1)
  108. =          ro[thisuser.screenchars-2]=0;
  109.  
  110. And lower:
  111.  
  112. *      if ((s[2]=='/') || (s[0]=='/')) {
  113. *        if (stricmp(stripcolors(s),get_string(942))==0) {
  114. =          savel=0;
  115. =          printmenu(2);
  116. =        }
  117. *        if (stricmp(stripcolors(s),get_string(943))==0) {
  118. =          savel=0;
  119. =          prt(5,get_string(630));
  120. =          i1=yn();
  121. =          i2=0;
  122. =          for (i=0; (i<curli) && (!i2); i++) {
  123. =            if (i1)
  124. =              npr("%d:\r\n",i+1);
  125. =            strcpy(s1,&(lin[i*LEN]));
  126. =            i3=strlen(s1);
  127. =            if (s1[i3-1]==1)
  128. =              s1[i3-1]=0;
  129. =            if (s1[0]==2) {
  130. =              strcpy(s1,&(s1[1]));
  131. =              i5=0;
  132. =              for(i4=0; i4<strlen(s1); i4++)
  133. =                if ((s1[i4]==8) || (s1[i4]==3))
  134. =                  --i5;
  135. =                else
  136. =                  ++i5;
  137. =              for (i4=0; (i4<(thisuser.screenchars-i5)/2) && (!i2); i4++)
  138. =                osan(" ",&i2,&i1);
  139. =            }
  140. =            pla(s1,&i2);
  141. =          }
  142. =          nl();
  143. =          pl(get_string(631));
  144. =        }
  145. *        if ((stricmp(stripcolors(s),get_string(944))==0) || (stricmp(stripcolors(s),get_string(945))==0)) {
  146. =          save=1;
  147. =          done=1;
  148. =          savel=0;
  149. =        }
  150. *        if ((stricmp(stripcolors(s),get_string(946))==0) || (stricmp(stripcolors(s),get_string(947))==0)) {
  151. =          save=1;
  152. =          done=1;
  153. =          savel=0;
  154. =          setanon=1;
  155. =        }
  156. *        if ((stricmp(stripcolors(s),get_string(948))==0) || (stricmp(stripcolors(s),get_string(949))==0)) {
  157. =          save=1;
  158. =          done=1;
  159. =          savel=0;
  160. =          setanon=-1;
  161. =        }
  162. *        if (stricmp(stripcolors(s),get_string(950))==0) {
  163. =          done=1;
  164. =          savel=0;
  165. =        }
  166. *        if (stricmp(stripcolors(s),get_string(951))==0) {
  167. =          savel=0;
  168. =          curli=0;
  169. =          pl(get_string(632));
  170. =          nl();
  171. =        }
  172. *        if (stricmp(stripcolors(s),get_string(952))==0) {
  173. =          savel=0;
  174. =          if (curli) {
  175. =            --curli;
  176. =            pl(get_string(633));
  177. =          } else {
  178. =            pl(get_string(634));
  179. =          }
  180. =        }
  181. *        if (stricmp(stripcolors(s),get_string(953))==0) {
  182. =          savel=0;
  183. =          helpl=26;
  184. =          if (okansi()) {
  185. =            prt(2,get_string(326));
  186. =            mpl(60);
  187. =            inputl(title,60);
  188. =          } else {
  189. =            pl(get_string(626));
  190. =            outstr(get_string(326));
  191. =            inputl(title,60);
  192. =          }
  193. =          pl(get_string(631));
  194. =          nl();
  195. =        }
  196. +        i3=strlen(s);
  197. +        for (i2=2;i2<i3;i2++)
  198. +         s1[i2-2]=s[i2];
  199. +        s1[3]=0;
  200. =        if (stricmp(s1,get_string(954))==0) {
  201. -          s1[0]=2;
  202. -          strcpy((&s1[1]),&(s[3]));
  203. +          sprintf(s2,"%c%c%c",2,3,s[1]);
  204. +          i3=strlen(s);
  205. +          for (i2=5;i2<i3;i2++)
  206. +            s2[i2-2]=s[i2];
  207. +          s2[i3-2]=0;
  208. *          strcpy(s,s2);
  209. =        }
  210. =        if ((stricmp(s1,get_string(955))==0) && (s[3]=='/') && (curli)) {
  211. =          strcpy(s1,&(s[4]));
  212. =          ss=strstr(s1,"/");
  213. =          if (ss) {
  214. =            ss1=&(ss[1]);
  215. =            ss[0]=0;
  216. =            stuff(&(lin[(curli-1)*LEN]),s1,ss1);
  217. =            pl(get_string(635));
  218. =            pl(&(lin[(curli-1)*LEN]));
  219. =            pl(get_string(956));
  220. =          }
  221. =          savel=0;
  222. =        }
  223. =      }
  224. =      if (savel) {
  225.  
  226.  
  227. ───[Step 4]────────────────────────────────────────────────────────────────────
  228.  
  229.  
  230. That's it, simply do a MAKE FCNS and recompile the entire system.
  231.  
  232.  
  233. French Proverb: La patience est une vertue.
  234.  
  235. For comments, bug report and suggestion, e-mail at the following address:
  236.  
  237. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  238.                  -> spotnick@gamemaster.qc.ca
  239. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  240.                  -> martin.bourdages@radio.magicnet.com
  241.  
  242.                  =>   French Mod Division Support Sub   <=
  243.                                 SubType: FMD
  244.                            Host: @20302 (WWIVnet)
  245.                       Scan sublist for other networks
  246.  
  247.         Read PRODUCTS.FMD for the full list of our support systems.
  248.  
  249. ───[EOF]──────────────────────────────────────────────────────────────────────
  250.