home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / PRE412.ZIP / ELRIC29.MOD < prev    next >
Text File  |  1990-02-02  |  3KB  |  98 lines

  1. Welcome to Elric's mods #29. Does this one work? Has it been fully
  2. tested and debugged? Probably not, so use at your own risk...
  3.  
  4. This is an attempt to fix a small problem. Some people have been
  5. complaining about how somehow sometimes they would get log files that said
  6. something to the effect of....
  7.  
  8. 2022 User1 #227
  9. 2022 User2 #109
  10. 2022 pi    #3.14159265359
  11. 2023 e     #2.71828182846
  12.  
  13. As you can see, the floating point user numbers were a real problem...no, wait
  14. that was humor...the problem was the mysterious non-updating caller number.
  15. How many callers did you really have? Who knows? Who cares? Well, it seems
  16. several people were upset, and someone actually got a response out of Mr. Bell
  17. on the matter. Here's what he had to say...I don't have the exact quote,
  18. but it was something to the effect of "well, I didn't save status.dat when
  19. someone shrinks out, so it doesn't save anything like the current caller
  20. number, so tough luck. Wait for 4.11". Well, if you're registered, and
  21. you would like to fix this, here's how to do it.
  22.  
  23. /** this step is indeed a form step, much like a form letter **/
  24. 1. From DOS, in your dir where you keep your source....
  25.  
  26. PKZIP SOURCE *.c *.h
  27.  
  28. If you already have a source zip file, then
  29.  
  30. PKZIP -f source *.c *.h
  31.  
  32. This way you have a copy of everything before you screw it up with a bad mod.
  33. If you decide to take the mod out, it's as easy as
  34. PKUNZIP -x source
  35.  
  36. and hit Y to overwrite any files you changed.
  37.  
  38. /** we now resume our regularly scheduled mod with step 2.... **/
  39.  
  40. 2. Load up shrink.c. This is the only thing we have to change, and
  41. I promise it will be minimal..
  42. Look down in the first 30 lines or so...a bunch of lines that say
  43. extern int something;
  44. extern char something else;
  45.  
  46. somewhere in those, add these 2 lines.
  47.  
  48. extern statusrec status;
  49. extern configrec syscfg;
  50.  
  51. doesn't matter where, just somewhere before the first function.
  52.  
  53. 3. Now look down for void save_state. Add these lines...
  54.  
  55. void save_state(char *s, int state,int ctc)
  56. {
  57.   int f;
  58.   /** add from here down***/
  59.   int statusfile;
  60.   char s1[81];
  61.  
  62.   sprintf(s1,"%s%s",syscfg.datadir,"STATUS.DAT");
  63.   statusfile=open(s1,O_RDWR | O_BINARY);
  64.   write(statusfile,(void *)(&status), sizeof(statusrec));
  65.   close(statusfile);
  66.  
  67. /** original code picks up here...**/
  68.   f=open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  69.   if (f<0)
  70.     return;
  71.  
  72. That's it. It should work like a charm now...
  73.  
  74. /** hey, it's the form info file **/
  75. As usual, I take no responsibility for hard drive crashes, death in the
  76. family, or end of the world as we know it resulting from this mod.
  77.  
  78. It's your fault if you didn't back up the files before you made the mod.
  79.  
  80. It's your fault if you don't back up your ENTIRE hard drive AT LEAST once
  81. a month.
  82.  
  83. It works on my system with Turbo C 2.0, WWIV 4.1, V20/8088, 640K/640EMS.
  84.  
  85. If you use this, the only payment I ask is that you send me a
  86. note through WWIVNet to 1@8251 saying you are using it...not too much to
  87. ask is it?
  88.  
  89. If you have any problems, you can reach me through WWIV-Net, 1@8251, or call
  90. my BBS.
  91. The Kingdom of Melnibone
  92. 812-877-3488  24 Hrs a day
  93. 3/12/2400/4800/9600/12,000/14,400 baud HST MNP5
  94. Auto-validation of WWIV sysops on first call
  95. Xmodem, Ymodem, DSZ Zmodem with retry, Ymodem-G
  96.  
  97. Lord Elric
  98.