home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / SPV-060.MOD < prev    next >
Text File  |  1995-05-14  |  7KB  |  204 lines

  1. Papa Bear #1 @11579
  2. 7Friday1, 7May 121, 71995 2126:208 pm
  3. 0R 34 05/13 09:41 WWIVnet 4001->4000
  4. 0R 34 05/11 11:30 WWIVnet 11579->4001
  5. 0R 34 05/12 12:25 WWIVnet ->11579
  6. 4Msg. Status:9▄ 5Please reply!
  7. 9 ▀▀▀▀▀▀▀▀▀▀▀▀
  8. ┌────────────────────────────A CEREBRUM release!─────────────────────────────┐
  9. │ Mod Name: SPV-060.MOD      Mod Authors: Pâpâ ßêâr (11579.wwivnet)          │
  10. │ Difficulty: ▓░░░░░░░░░     First ----- [05/12/95] (15061.wwivlink)         │
  11. │ WWIV Version: 4.23         Last ------ [05/12/95] (2.sexnet) (11.norcalnet)│
  12. │ Files Affected: DEFAULTS.C {FCNS.H}               (5079.icenet)            │
  13. │ Description: Gives the ability to view and edit macros in their "real" form│
  14. │without those annoying ^P codes and stuff...                                │
  15. ╞═────────────────────────────────────═╤═───────────────────────────────────═╡
  16. │ StarPort Valhalla [510]522-3583 ASV 28.8kbps  Home of the SPV mod series!  │
  17. └─────────────────────────────────────═╧═────────────────────────────────────┘
  18.  Word of Warning:  You installed it, you're responsible! Make back-ups BEFORE
  19.  attempting to install this modification!  Read all text before beginning.
  20. ─────────────────────────────────────────────────────────────────────────────
  21.  LEGEND:
  22.  ==  Original Code [use this to search on]
  23.  ++  Add this Line [mods ALWAYS add stuff, don't they?]
  24. ─────────────────────────────────────────────────────────────────────────────
  25.  LONG DESCRIPTION:  I had 1/2 this installed in UEDIT2.  Due to popular
  26. demand, I've made this a mod for total replacement of the current macro
  27. functions, both for UEDIT2, "non-UEDIT2" BBS's, and your users.
  28.  Macros will be display just as if you had used them in a message.  When
  29. building them, they are displayed the same -- just as if you had entered them
  30. in a message.  The only difference is carriage returns, which are displayed
  31. as grey |'s
  32. ─────────────────────────────────────────────────────────────────────────────
  33. STEP 1: Remove, or comment out, *ALL* of these functions and their associated
  34. coding, located in DEFAULTS.C:
  35.  
  36. void list_macro(unsigned char *s)
  37. void make_macros(void)
  38. ─────────────────────────────────────────────────────────────────────────────
  39. STEP 2: Now block copy in these functions to the end of DEFAULTS.C:
  40.  
  41. // SPV-060 BLOCK START
  42. void make_macros(void)
  43. {
  44.   char stemp[161],ch;
  45.   unsigned char Done=0;
  46.  
  47.   do {
  48.     outchr(12);
  49.     pl("4Macro A:0");
  50.     list_macro(&thisuser.macros[2][0]);
  51.     nl();
  52.     pl("4Macro D:0");
  53.     list_macro(&thisuser.macros[0][0]);
  54.     nl();
  55.     pl("4Macro F:0");
  56.     list_macro(&thisuser.macros[1][0]);
  57.     nln(2);
  58.     npr("5Please select a macro to edit (A, D, F) or 6Q5 to quit: 0");
  59.     ch=onek("QADF");
  60.     stemp[0]=0;
  61.     switch (ch) {
  62.       case 'A':
  63.         strcpy(stemp,MacroEdit());
  64.         if (stemp[0]) {
  65.           memset(&thisuser.macros[2][0],0,80);
  66.           strcpy(&thisuser.macros[2][0],stemp);
  67.         }
  68.         break;
  69.       case 'D':
  70.         strcpy(stemp,MacroEdit());
  71.         if (stemp[0]) {
  72.           memset(&thisuser.macros[0][0],0,80);
  73.           strcpy(&thisuser.macros[0][0],stemp);
  74.         }
  75.         break;
  76.       case 'F':
  77.         strcpy(stemp,MacroEdit());
  78.         if (stemp[0]) {
  79.           memset(&thisuser.macros[1][0],0,80);
  80.           strcpy(&thisuser.macros[1][0],stemp);
  81.         }
  82.         break;
  83.       case 'Q':
  84.         Done=1;
  85.         break;
  86.     }
  87.   } while ((!Done) && (!hangup));
  88. }
  89.  
  90. void list_macro(unsigned char *s)
  91. {
  92.   int i=0;
  93.  
  94.   while ((i<80) && (s[i]!=0)) {
  95.     if (s[i]>=32)
  96.       outchr(s[i]);
  97.     else
  98.       ansic(s[++i]-48);
  99.     ++i;
  100.   }
  101.   nl();
  102. }
  103. // SPV-060 BLOCK END
  104. ─────────────────────────────────────────────────────────────────────────────
  105. STEP 3: Do this step if you *do not* have PBCOMMON.C installed.  Copy this
  106.         entire function to the end of DEFAULTS.C:
  107.  
  108. char *MacroEdit(void)
  109. {
  110.   char s[81];
  111.   unsigned char tempmac[81],ch,ch1;
  112.   int i,done1,i1=0,i2=5;
  113.  
  114.   s[0]=0;
  115.   done1=i=i1=0;
  116.   nl();
  117.   pl("9Enter macro now, 2809 characters, press 1CTRL-Z9 when done.0");
  118.   nl();
  119.   okskey=0;
  120.   ansic(i2);
  121.   do {
  122.     ch1=getkey();
  123.     if (ch1==26)
  124.       done1=1;
  125.     else
  126.       if (ch1==8) {
  127.         if (i>0) {
  128.           i--;
  129.           backspace();
  130.           if (tempmac[i]<32)
  131.             backspace();
  132.         }
  133.       } else {
  134.         if (ch1>=32) {
  135.           tempmac[i++]=ch1;
  136.           if (i1==0)
  137.             outchr(ch1);
  138.           else if (i1==1) {
  139.             i2=ch1-48;
  140.             ansic(i2);
  141.             i1=0;
  142.           }
  143.         } else {
  144.           tempmac[i++]=ch1;
  145.           if (ch1+64=='M') {
  146.             ansic(0);
  147.             outchr('|');
  148.             ansic(i2);
  149.           }
  150.           if (ch1+64=='P')
  151.             i1=1;
  152.         }
  153.       }
  154.       if (i>=78)
  155.         done1=1;
  156.   } while ((!done1) && (!hangup));
  157.   okskey=1;
  158.   tempmac[i]=0;
  159.   nln(2);
  160.   npr("1Is this okay?0 ");
  161.   if (yn())
  162.     strcpy(s,tempmac);
  163.   return(s);
  164. }
  165. ─────────────────────────────────────────────────────────────────────────────
  166. STEP 4: Do this step if you *do not* have PBCOMMON.C installed.  Prototype
  167.         the above function in FCNS.H:
  168.  
  169. == void enter_regnum(void);
  170. == void defaults(void);
  171. ++ char *MacroEdit(void);
  172. ==
  173. == /* File: diredit.c */
  174. == void dirdata(int n, char *s);
  175. ─────────────────────────────────────────────────────────────────────────────
  176. STEP 5: Recompile!
  177. ─────────────────────────────────────────────────────────────────────────────
  178.   Okay, I hope you like this one...  It's not fancy, but it does make making
  179. macros a lot easier.  E-Mail me if you use this.
  180.   I'll be moving in about 2 weeks.  The BBS *may* stay up for another 2 weeks
  181. after than -- we'll see.  Until I get re-setup, have fun with the mods!  If
  182. you have problems, hold on to any questions you have starting, oh, about May
  183. 28th or so until I get back online.
  184.  
  185.    This mod is copyright 1993,1994 by Tracy Baker, aka Papa Bear, and is
  186. distributed as freeware.  Permission is granted to distribute and post this
  187.   mod on BBS systems and online services, provided no alterations are made
  188.  (removal of message headers/taglines allowed).  This mod may contain some
  189.  parts of WWIV source code, which is copyright 1988-1994 by Wayne Bell and
  190.    licensed only to registered users of WWIV.  Use of WWIV source without
  191.     registration constitutes a license violation and could lead to legal
  192.                        prosecution and certain doom.
  193.   Shareware distributors and CD-ROM publishers may not distribute this mod
  194. without express written permission of the Author or WWIV Software Services.
  195.  
  196. 1-7=3*6>2Pâpâ ßêâr6<3*7=1-0
  197.  
  198. 8311579.wwivnet1· 2 ╪╫9≡8║7⌐¬4¥5╓╥╖1·     ·     2▒1 ·   2▒       3(510)522-35831    ·
  199. 732.sexnet  1∙   6 ·0░░▒▒▓▓6∞0▓▒░6·2 StarPort   ▒   ▒ 2 ▒1  ·2▒   ▒ ▒1 ·2 ▒   ▒1  ·2▒     ▒ 1·
  200. 6315061.wwivlink    0 ████1 ·     .       2  ▒ ▒  ▒ ▒  ▒1 · 2▒▒▒  ▒ ▒  ▒   ▒    ▒ ▒
  201. 535079.icenet 1.  .  0 │└6·0└6· 1     ∙         2 ▒  ▒   ▒ ▒▒▒ ▒ ▒ ▒1 ·2 ▒ ▒▒▒ ▒▒▒ ▒1 ∙ 2▒
  202. ---
  203. 3This tagline no verb.
  204.