home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / odtj9305.zip / ODTJ9305.TXT < prev   
Text File  |  1993-07-20  |  34KB  |  725 lines

  1. The
  2. OPENDOORS  TECH  JOURNAL
  3. Volume 93, Number 5                                          July 20th, 1993
  4.  
  5. "The Greatest Thing to happen to Journalism Since Real People"
  6.                                                                                                                                           
  7. This Issue:     A Word from the Editor - Scott Burkett
  8.                 The Open Door - Brian Pirie (not!)
  9.                 The Fidonet OPENDOORS Echo - Latest FAQ
  10.                 Opendoors Tech Corner - ColorToString();       
  11.                 In Search Of - The Art of Debugging
  12.                 Review: VID v2.01 - The Virus Information Door
  13.                 OpenDoors Snippets!
  14.                 OpenDoors Tech Journal Information
  15.                                                                                                                                           
  16. ----------------------------------------------------------------------------
  17.                         A Word from the Editor:
  18. ----------------------------------------------------------------------------
  19.  
  20. Finally!  After months of long-distance mail polling, the OPENDOORS echo is
  21. now residing on the North American fidonet backbone!  Yep.  Sorry, Ma Bell.
  22. More on this later, and now .... the rest of the story.  Sorry Paul Harvey.
  23.  
  24. Listen up children, today's editorial survey question is one which is sure to 
  25. draw quite a bit of flak from programmers around the globe.  Which is the 
  26. better stimulant, Jolt Cola or Maxwell House? :-)
  27.  
  28. DoorNet!  That's right.  Strange things are amiss at the Circle-K!  Look for
  29. an OPENDOORS conference (both mail and file based) to appear soon on the
  30. DoorNet backbone listing.  Thanks go out to Vince Jacobs for his work on
  31. getting this implemented.  This should make ODTJ and OD distribution a bit
  32. easier on all of us.  There has been mention of gating the current fidonet
  33. OPENDOORS echo through to Doornet.  I applaud this idea and welcome it with
  34. much grandiose.  Ahem.
  35.  
  36. On another wavelength entirely, several hundred netmail messages were lost
  37. from Under the Nile's mail machine a few weeks ago.  Unfortunately, there
  38. were a few requests for product announcements contained therein.  If the
  39. authors would be so kind as to send them back in, we will gladly publish
  40. them in the next edition.  Danke!
  41.                                  
  42. On a serious note, my gerbil died.  Peace, and a bottle of hair grease....
  43.  
  44. (Scott, it's time for your medication....yes, mother)
  45.  
  46. ----------------------------------------------------------------------------
  47.                      THE OPEN DOOR - By Brian Pirie
  48. ----------------------------------------------------------------------------
  49.  
  50. Unfortunately (I know, I know), Brian was unavailable for this issue.  I
  51. finally tracked him down in Tibet, busily polling the local populace for
  52. new ideas for the 4.20 release.  At any rate, look for him in ODTJ #6, along
  53. with (hopefully) OpenDoors 4.20... :-)
  54.  
  55. ----------------------------------------------------------------------------
  56.                OPENDOORS Echo FAQ - Frequently Asked Questions
  57. ----------------------------------------------------------------------------
  58. By: Brian Pirie                                                                                                                                 
  59. July 17th, 1993
  60.  
  61. ABOUT THIS FAQ
  62. --------------
  63.  
  64. This document is a collection of frequently asked questions and answers.
  65. If you have any questions about OpenDoors or the OPENDOORS echo, please
  66. first refer to this FAQ. Not only will this help to reduce unnecessary
  67. trafic in the echo, but it will also provide you with the answer to many
  68. questions much more quickly than you would have otherwise.
  69.  
  70. If you have any suggestions for additions or changes to this FAQ, please
  71. direct them to the moderator, Brian Pirie (FidoNet: 1:243/8, Internet:
  72. brian@bpecomm.ocunix.on.ca).
  73.  
  74. Since the OPENDOORS echo and this FAQ are currently under a state of
  75. change, this FAQ will be posted on a very regular basis for the time
  76. being. In the future, the FAQ will probably be automatically posted on a
  77. bi-weekly basis.
  78.  
  79. CONTENTS
  80. --------
  81.  
  82.  1.) What are the rules of the OPENDOORS echo?
  83.  2.) What IS OpenDoors?
  84.  3.) Where can I get a copy of OpenDoors?
  85.  4.) What is the newest version of OpenDoors?
  86.  5.) How much does OpenDoors cost?
  87.  6.) Is the OpenDoors source code available?
  88.  7.) Are there beta test versions of OpenDoors?
  89.  8.) How can I contact the author of OpenDoors?
  90.  9.) What IS the OpenDoors echo?
  91. 10.) What about the echo archives?
  92. 11.) How can I get help with OpenDoors or BBS door/utility programming?
  93. 12.) What guidelines are there for posting source code?
  94.  
  95. 1.) WHAT ARE THE RULES OF THE OPENDOORS ECHO?
  96.     ----------------------------------------
  97.  
  98. The rules of the OPENDOORS echo are few and far between. The most
  99. important rules are those that are standard to all EchoMail conferences
  100. that are distributed as a part of the FidoNet backbone distribution
  101. system. The echo may not be used for illegal purposes, nor is profane
  102. language accepted. Beyond this, your are trusted to use your own
  103. judgement. While it is important to have as high a "signal to noise
  104. ratio" as possible, it is also important to recognize the diverse group
  105. of people you are communicating with though the OPENDOORS echo. There is
  106. a wide range of technical knowledge, knowledge of network etiquette, and
  107. personal background. If you can try to be as understanding and helpful
  108. as possible, your doing so will help to keep friction and flaming to a
  109. minimum.
  110.  
  111. Since the participants in the OPENDOORS echo are generally all
  112. programmers, it seems natural that they will want to tell the world
  113. about the programs they have written. For this reason, announcements of
  114. new programs - either written with OpenDoors or of interest to the
  115. participants of this echo - is encourage. However, advertising of new
  116. programs is not the primary purpose of the echo. For this reason, we
  117. would ask that you refrain from posting the same advertisment message
  118. more than once within a reasonable length of time (perhaps a month).
  119.  
  120. If you are having any difficulty with the OPENDOORS echo - technical,
  121. social, or otherwise - please feel more than free to contact the
  122. moderator, Brian Pirie (1:243/8).
  123.  
  124. 2.) WHAT IS OPENDOORS?
  125.     -----------------
  126.  
  127. OpenDoors is a Turbo C(++) / Borland C++ door programming toolkit used
  128. by well over 100 door programmers around the world. OpenDoors handles
  129. all of the details of door programming, such as communicating with the
  130. modem, interfacing with virtually any BBS package, maintaining status
  131. lines, monitoring carrier detect and user timeouts, handling sysop
  132. function keys such as DOS shell or chat, providing advanced ANSI/AVATAR
  133. graphics support, and much more.
  134.  
  135. OpenDoors is designed to allow you to write door programs just as you
  136. would write any other C program, without requiring any additional effort
  137. or knowledge. You can easily create fully functional door programs with
  138. just a few lines of code. OpenDoors is so easy to use that many
  139. OpenDoors programmers have begun using it with no programming
  140. experience.
  141.  
  142. OpenDoors directly interfaces with all of the most popular BBS packages
  143. including RemoteAccess, QuickBBS, Telegard, Wildcat, PC-Board, Maximus,
  144. Renegade, EzyCom, RBBS-PC, Spitfire, SuperBBS, RoboBoard, WWIV and many
  145. others. In addition, OpenDoors allows the sysop to specify custom door
  146. information file formats to permit your doors to run on virtually any
  147. BBS system.
  148.  
  149. Included with OpenDoors are a number of example doors that you can
  150. compile, alter, or use as a basis for your own doors. Among these
  151. example doors are a voting booth type door and an ANSI music
  152. demonstration door, and dozens of sample doors within the door
  153. programming tutorial manual.
  154.  
  155. OpenDoors also provides a number of special features that you can
  156. optionally include in your doors, such as transparent configuation file
  157. support, logfile support, FILES.BBS listing, and many advanced
  158. ANSI/AVATAR graphics routines.
  159.  
  160. 3.) WHERE CAN I GET A COPY OF OPENDOORS?
  161.     -----------------------------------
  162.  
  163. Below is a short table listing sites from which the newest version of
  164. OpenDoors is available, as of April 19th, 1993. In addition to the sites
  165. listed below, the newest verion of OpenDoors will likely be available
  166. from any system that carries "Programmer's Distribution Network" files.
  167. Also, if you send a self-addressed envelope, along with either a 3-1/2"
  168. or 5-1/4" (360K) diskette, and $2.00 to cover postage, I would be happy
  169. to mail the newest version of OpenDoors to you. My address is listed in
  170. section 8.
  171.  
  172. Also, the most recent list of OpenDoors distribution sites is always
  173. available for download or file request from my system, in the file
  174. OD_SITES.ZIP. If you are interested in becoming an official OpenDoors
  175. distribution site, please see the file included in the OD_SITES.ZIP
  176. archive.
  177.  
  178. -------------------------------------------------------------------------------
  179.                                     FIDONET
  180. LOCATION                            ADDRESS       DATA NUMBER     MODEM
  181. -------------------------------------------------------------------------------
  182. Sydney, Australia                   3:712/618     +61 2 552 3255  (v.32/PEP)
  183. Sydney, Australia                   3:714/906     +61 2 977 6820  (v.32bis/HST)
  184. Lancaster Park, Alberta, Canada     1:342/49      +1 403 973 3856 (v.32bis/HST)
  185. Saint John, New Brunswick, Canada   1:255/7       +1 506 652 7292 (v.32bis)
  186. Ottawa, Ontario, Canada             1:243/8       +1 613 526 4466 (v.32)
  187. Mascouche, Quebec, Canada           1:167/235     +1 514 968 1709 (v.32bis)
  188. Trieste, Italy                      2:333/603     +39 40 3783111  (v.32bis/HST)
  189. Paraparaumu, New Zealand            3:771/180     +64 4 298 4194  (v.32bis)
  190. Cambridge, United Kingdom           2:440/34      +44 223 301487  (v.32bis)
  191. Ipswich, Suffolk, United Kingdom    2:440/107     +44 473 692882  (v.32bis)
  192. Ipswich, Suffolk, United Kingdom    2:440/112     +44 473 87450   (v.32bis)
  193. Mildenhall, Suffolk, United Kingdom 2:440/37      +44 638 718623  (v.32bis/HST)
  194. San Jose, California, USA           1:143/324     +1 408 265 4660 (v.32)
  195. San Ramon, California, USA          1:161/610     +1 510 830 4616 (v.32bis/HST)
  196. Fort Myers, Florida, USA            1:371/26      +1 813 939 3009 (v.32bis/HST)
  197. Columbus, Georgia, USA              1:3613/12     +1 706 596 8126 (v.32)
  198. Chicago, Illinois, USA              1:115/743     +1 312 587 8756 (v.32bis/HST)
  199. Baltimore, Maryland, USA            1:261/1062    +1 410 256 1979 (v.32bis)
  200. Minneapolis, Minnesota, USA         1:282/1016    +1 612 378 7783 (v.32bis)
  201. Muskogee, Oklahoma, USA             1:3813/309    +1 918 687 1612 (v.32bis)
  202. -------------------------------------------------------------------------------
  203.  
  204. 4.) WHAT IS THE NEWEST VERSION OF OPENDOORS?
  205.     ---------------------------------------
  206.  
  207. Version 4.10 is the most recently released version of OpenDoors. There
  208. is a more recent beta-test version of OpenDoors. For information on this
  209. beta-test version, see section 7.
  210.  
  211. 5.) HOW MUCH DOES OPENDOORS COST?
  212.     ----------------------------
  213.  
  214. OpenDoors is distributed on a try-before-you-buy basis. You can pickup a
  215. copy of OpenDoors from any of the OpenDoors distribution sites, listed
  216. above, to have a closer look at the package. However, if you wish to
  217. continue using OpenDoors after the three week trial period, you must
  218. purchase an OpenDoors registration. Full details on registering
  219. OpenDoors is included in the OpenDoors manual. However, a brief table
  220. listing the prices within a number of countries is listed below:
  221.  
  222.         -----------------------------------------------
  223.                                  REGISTRATION
  224.         REGISTRATION ONLY        AND SOURCE CODE
  225.         -----------------------------------------------
  226.         34 Canadian Dollars      68 Canadian Dollars
  227.         28 US Dollars            56 US Dollars
  228.         18 British Pounds        36 British Pounds
  229.         150 French Francs        300 French Francs
  230.         44 German Marks          88 German Marks
  231.         50 Netherland Gilders    100 Netherland Gilders
  232.         39 Australian Dollars    78 Australian Dollars
  233.         -----------------------------------------------
  234.  
  235. 6.) IS THE OPENDOORS SOURCE CODE AVAILABLE?
  236.     --------------------------------------
  237.  
  238. Yes, the OpenDoors source code is available, at a cost equal to the
  239. registration, to registered users. Both the regisration and source code
  240. may also be purchased at the same time, for a cost equal to twice the
  241. normal registration fee. When you purchase the OpenDoors source code,
  242. the most recent version of the source code is sent to directly. Also,
  243. you will be entitled to free upgrades to all future versions of the
  244. source code. Whenever you wish to pick up a new version of the source
  245. code, you may download it from the OpenDoors support BBS, arrange to
  246. pick it up via a FidoNet-compatible mailer (simply send me a message
  247. asking me to place the source code package "on hold" for you to poll and
  248. pick up), or by sending a diskette and self-addressed diskette mailer.
  249.  
  250. 7.) ARE THERE BETA TEST VERSIONS OF OPENDOORS?
  251.     -----------------------------------------
  252.  
  253. Yes. The beta test versions of OpenDoors are available to registered
  254. OpenDoors users. However, keep in mind that the beta test version has
  255. some new features that are still under development, and has not yet been
  256. thoroughly tested. To save space, the documentation is not included with
  257. the beta test version. As such, it is assumed that you also have the
  258. most recent non-beta version of OpenDoors. The most recent beta version
  259. may be file-requested from 1:243/8 as OD_BETA
  260.   
  261. 8.) HOW CAN I CONTACT THE AUTHOR OF OPENDOORS?
  262.     -----------------------------------------
  263.  
  264. If you wish to contact the author of OpenDoors, Brian Pirie, please feel
  265. free to do so. I may be reached by any of the following means:
  266.  
  267.         FidoNet NetMail   : 1:243/8
  268.  
  269.         Internet EMail    : brian@bpecomm.ocunix.on.ca
  270.  
  271.         Modem (BBS)       : +1 613 526 4466
  272.  
  273.         Conventional Mail : Brian Pirie
  274.                             Apt. #1416 - 2201 Riverside Drive
  275.                             Ottawa, Ontario
  276.                             K1H 8K9
  277.                             Canada
  278.  
  279. 9.) WHAT IS THE OPENDOORS ECHO?
  280.     --------------------------
  281.  
  282. The OPENDOORS echomail conference is devoted to OpenDoors and BBS door /
  283. utility programming in general. The OPENDOORS echo serves as a place
  284. where people working with OpenDoors can share ideas, source code
  285. examples, and other tricks and techniques. Through the OPENDOORS echo
  286. you can receive help with OpenDoors and programming in general. Also
  287. available through the OPENDOORS echo is information on future versions
  288. of OpenDoors and recent developments of concern to BBS door and utility
  289. programmers. The OPENDOORS echo is also place for suggestions for future
  290. versions of OpenDoors, OpenDoors bug reports, a place to announce the
  291. availablility of your programs, and much more information of interest to
  292. OpenDoors programmers. There are participants in the OpenDoors echo from
  293. throughout Canada and the U.S., as well as people in Europe and
  294. Australia.
  295.  
  296. 10.) WHAT ABOUT THE ECHO ARCHIVES?
  297.      ----------------------------
  298.  
  299. Although we attempt to answer the most commonly asked questions in this
  300. FAQ, there is so much discussed in the OPENDOORS echo that it is
  301. impossible to address every possible question. As such, you may be
  302. interested in referring to the OPENDOORS echo archives, in order to
  303. learn more about OpenDoors and BBS door/utility programming in general.
  304.  
  305. The OPENDOORS echo archives are prepared on a monthly basis, and
  306. are available from the moderators system. Currently, the following
  307. archives are available for request from 1:243/8 or download from the BBS
  308. at +1 613 526 4466:
  309.  
  310. ODJUL92.ZIP    42776  Discussion from the OpenDoors echo, July '92
  311. ODAUG92.ZIP    35432  Discussion from the OpenDoors echo, August '92
  312. ODSEP92.ZIP    36308  Discussion from the OpenDoors echo, September '92
  313. ODOCT92.ZIP    30922  Discussion from the OpenDoors echo, October '92
  314. ODNOV92.ZIP    34844  Discussion from the OpenDoors echo, November '92
  315. ODDEC92.ZIP    53647  Discussion from the OpenDoors echo, December '92
  316. ODJAN93.ZIP    24683  Discussion from the OpenDoors echo, January '93
  317. ODFEB93.ZIP    41562  Discussion from the OpenDoors echo, February '93
  318. ODMAR93.ZIP    24080  Discussion from the OpenDoors echo, March '93
  319. ODAPR93.ZIP    30027  Discussion from the OpenDoors echo, April '93
  320. ODMAY93.ZIP    39440  Discussion from the OpenDoors echo, May '93
  321. ODJUN93.ZIP    56615  Discussion from the OpenDoors echo, June '93
  322.  
  323. 11.) HOW CAN I GET HELP WITH OPENDOORS OR BBS DOOR/UTILITY PROGRAMMING?
  324.      -----------------------------------------------------------------
  325.  
  326. If you have any problems with a program, please feel more than free to
  327. post a message here, asking for help. Afterall, that is one of the
  328. central purposes of this echo. However, try to keep the following points
  329. in mind when asking a question. Doing so will help others to better
  330. understand your problem, and as such will help them help you.
  331.  
  332.           A.) If you are having a problem with a program, try to
  333.               describe as much about the problem as possible. If you
  334.               can, precisely how to reproduce the problem. If you wish
  335.               to do so, posting source code can also be of great
  336.               advantage. For more information on posting source code in
  337.               the echo, please see section 12.
  338.  
  339.           B.) Explain what steps you have already taken in trying to
  340.               solve your problem. This will allow others to pick up from
  341.               where you have become "stuck", and not suggest solutions
  342.               that you have already tried yourself.
  343.  
  344.  
  345.  
  346. 12.) WHAT GUIDELINES ARE THERE FOR POSTING SOURCE CODE?
  347.      -------------------------------------------------
  348.  
  349. You are more than welcome to post source code in this echo. If you do
  350. so, please keep the following guidelines in mind.
  351.  
  352.           A.) Unless you explicitly say otherwise, any source code
  353.               posted in this echo will be considered to be released to
  354.               the public domain. If you have some source code that you
  355.               do not wish others to copy, don't post it here!
  356.  
  357.           B.) For your source code to be useful to others, it has to be
  358.               understandable. Adding comments can be of great benifit to
  359.               someoone trying to understand your code.
  360.  
  361.           C.) If you are posting a program written with OpenDoors,
  362.               please be sure that you do NOT include your registration
  363.               key in the source code!
  364.  
  365. ----------------------------------------------------------------------------
  366.                OpenDoors Tech Corner: ColorToString()        
  367. ----------------------------------------------------------------------------
  368.              
  369.              Authored by: Brian Pirie, OpenDoors author
  370.  
  371. /* Function to convert an integer color attribute to an OpenDoors */
  372. /* style color description string, in the format:                 */
  373. /*                                                                */
  374. /*         [Flashing] [Bright] [Foreground] on [Background]       */
  375. /*                                                                */
  376. /* The function takes two parameters, an unsigned integer         */
  377. /* representing the input color, and a pointer to a string where  */
  378. /* the colour description should be output. Be sure that this     */
  379. /* string is large enough to hold the largest possible color      */
  380. /* description string. (If the code is not altered, the largest   */
  381. /* possible string will be 35 characters, including the null      */
  382. /* terminator                                                     */
  383.  
  384. void ColorToString(unsigned int color, char *outString)
  385. {
  386.    /* Array containing names of various colors */
  387.    static char colorString[8][33]={"Black",
  388.                                    "Blue",
  389.                                    "Green",
  390.                                    "Cyan",
  391.                                    "Red",
  392.                                    "Magenta",
  393.                                    "Yellow",
  394.                                    "White"};
  395.  
  396.    /* Initialize string */
  397.    outString[0]='\0';
  398.  
  399.    /* If flashing bit is set, output "Flashing" string + space */
  400.    if(color & 0x80) {
  401.       strcat(outString, "Flashing ");
  402.    }
  403.  
  404.    /* If bright bit is set, output "Bright" string + space */
  405.    if(color & 0x08) {
  406.       strcat(outString, "Bright ");
  407.    }
  408.  
  409.    /* Output foreground color */
  410.    strcat(outString, colorString[color & 0x07]);
  411.  
  412.    /* Output the word "on" with a space before & after */
  413.    strcat(outString, " on ");
  414.  
  415.    /* Output background color */
  416.    strcat(outString, colorString[(color & 0x70) >> 4]);
  417. }
  418.  
  419. Editor's Note:  Brian was kind enough to put this function together for us
  420. upon request for a function to perform the reverse of the od_color_config()
  421. function.  I had to add a bracket or two that was left out (he did mention
  422. that it was untested code!), but it works like a champ.
  423.  
  424. ----------------------------------------------------------------------------
  425.                  In Search Of - The Art of Debugging
  426.                         By Mark Williamson
  427. ----------------------------------------------------------------------------
  428.  
  429. It happens.  The inevitable.  You have spent so many hours trying to
  430. write the most optimized, cleanest code possible.  But your best efforts
  431. are laid to rest when some verocious little creature pops up, seemingly
  432. at random, and wreaks havoc on all your efforts.
  433.  
  434. What causes these bugs to appear?  Can it be programming style?  Or a
  435. forgotten temporary variable?  Where, or where, is that bug!
  436.  
  437. If this has happened to you, don't feel bad.  50 percent of your time
  438. programming will be devoted to the debugging cycle.  Many books have
  439. been written that are devoted to the art of programming style, debugging
  440. and the development cycle.  I will only touch on a couple of pointers to
  441. get you started in the right direction in locating that invisible target
  442. called so affectionately, the "bug."
  443.  
  444. Case scenario:  I was working on a program that would shell to DOS using
  445. one of the OD_SPAWN... functions.  OPENDOOR.DOC discusses in
  446. good detail how to use either of these functions.  But, being the eager
  447. programmer that I am, I happily went about my way after I read what I
  448. thought I needed to know.  The program in question uses a temporary
  449. directory to store files extracted from .ZIP/.ARJ/etc.. archive files.
  450. As the program was running, it worked just great.  Unpacked the files
  451. using PKZIP.  Repacked them using ARJ.
  452.  
  453. Then I tried it again.  That's when it all fell apart for me.
  454. Unwillingly, I just started a four-day straight debugging session,
  455. lasting until the wee hours of the night.
  456.  
  457. Point one:  Always read the docs...thoroughly!
  458.  
  459. During this four day debugging frenzy I removed 20 or more variables I
  460. didn't need, rewrote five functions to be more independent and portable
  461. (ie modular programming) and greatly optimized the program overall.
  462.  
  463. But I still couldn't find the bug.
  464.  
  465. Here's a sample of the code:
  466.  
  467.     od_set_cursor(15,20);
  468.     od_printf("`bright cyan`Unpacking");
  469.     error=run_it(progname,unpackcommand);     // see the run_it function
  470.                                               // below.
  471.     if(error==0){
  472.         od_set_cursor(15,33);
  473.         od_printf("`bright green`████████████████████████ `bright cyan` Ok    ");
  474.     }
  475.  
  476. The above code did not do as it appears it should.  In fact, as soon as
  477. the trace feature of Turbo C++ 3.0 hit the line that prints out the bar
  478. and the word "Ok", what actually was printed out was something like
  479. this:
  480.  
  481.  
  482.            Unpacking :\BBSFILES\BBSUPLOADS\CHKZIP.ZIP
  483.  
  484. but not:
  485.  
  486.            Unpacking ████████████████████████  Ok
  487.  
  488. Now remember, I hadn't read the section on the od_swapping_path variable
  489. yet.
  490.  
  491. The OD_SPAWN.. functions will swap to either EMS memory or DISK.  The
  492. variable od_control.od_swapping_path is empty by default, which equates
  493. to the CURRENT DIRECTORY!.  Thus, when my utility unpacked/repacked the
  494. files, it packed up the swap file also.  Then, when I ran it the second
  495. and future times on the same archive file, I was overwriting the swap
  496. file!  Effectively overwriting the program's data and code segments.
  497.  
  498. Lesson learned:  Read the docs..first.  Don't use the old tried and
  499. untrue "If all else fails, read the docs."  Read them first.  Read them
  500. several times.
  501.  
  502. How to debug:
  503.  
  504. If your compiler has a trace feature, use it.
  505.  
  506. Put all the variables in the watch window that could possibly have any
  507. bearing on the function your are testing.  Look for suspicious changes
  508. in values when the variable has not been 'touched'.
  509.  
  510. Minimize global variable useage.  This makes portability difficult.  If
  511. you write functions that do not rely on any outside information except
  512. that which is passed as an parameter, then it will be much easier to use
  513. the same functions over and over, throughout many of your projects.
  514.  
  515. Use descriptive variables.  C gives you much luxury in the length of
  516. your variable names.  Use this to the max.  How many times have you
  517. scratched your head and wondered "what does this one do?"
  518.  
  519. Use descriptive function names.  See above
  520.  
  521. Read other programmer's source for ideas.  Many times you will probably
  522. be reinventing the wheel.  Read the C snippets for ideas.  Check out
  523. some other source code to see how it's done elsewhere.  This may give
  524. you much needed insight into the art of programming style.
  525.  
  526. And last but not least.. Use comment lines!  Don't be vague.  Commenting
  527. your source code will most likely help only one person.  You.  But, you
  528. are the only one that matters anyway right?
  529.  
  530. Good luck and press on!
  531.  
  532. Mark Williamson
  533. Software Solutions
  534. Fido 1:214/54
  535.  
  536. Home of Labtest 2.00 - The Definitive Upload Processor
  537. Written entirely in Turbo C++ 3.0 using Brian Pirie's Open Doors 4.1
  538.  
  539.  
  540. ----------------------------------------------------------------------------
  541.                           REVIEW: VID v2.01
  542. ----------------------------------------------------------------------------
  543.  
  544. VID v2.01, the BBS Virus Information Door from Cairo Research Labs, is now
  545. available!
  546.  
  547. The original VID was designed to provide a quick online virus reference for 
  548. BBS users, but has quickly evolved into quite a bit more!  Thanks to a 
  549. tremendous response from Sysops around the world, VID has provided BBS users 
  550. with quick, accurate viral assessments while online on their favorite BBS 
  551. system.
  552.  
  553. What's New in This Release?
  554.  
  555.   o Over 100 new viruses added, bringing the total up to 1,557 entries.
  556.  
  557.   o Cleaned up display in several of the search and list options,
  558.     including multi-column virus listings (Thanks to Chris Koziol).
  559.  
  560.   o Provided an option for online documentation for end-users.
  561.  
  562.   * Due to an internal problem in the original 2.00 release, you must
  563.     use v2.01+ to use any new enhancement modules.  The database
  564.     structures have changed a bit.
  565.  
  566.   * The periodic VID integrity check has been enhanced.  VID now
  567.     stores its integrity information in a file called SANITY.CHK.
  568.     Ensure that this file resides in the VID directory!
  569.           
  570.   * In the 2.00 release, the VIDDEF.TBL file had to reside in the
  571.     path.  This was causing a message subsystem initialization error
  572.     if VID could not locate this file in the path!  VID now looks in
  573.     the current directory first. (Thanks to Steve Pepin)
  574.  
  575.   ! In the Behavior search, although the default answer is "Ignore",
  576.     the prompt showed the default as "No".  Fixed! (Steve Pepin).
  577.  
  578.   ! If VID was typed alone with no arguments, the old switches from
  579.     the 1.10 release were displayed! Fixed! (Steve Pepin, again!).
  580.                   
  581.   ! VID now handles extraneous spaces in registration keys.  This 
  582.     occurred when clipping a key from a netmail message.  Squashed! 
  583.     (Thanks to Bart Holiman).
  584.  
  585.   ! In the 2.0 datafiles, the "Stealth" flag on several viruses was
  586.     not set properly.  Squashed!
  587.  
  588. FREQ:     VID - This will get you the VID engine, documentation, Lite-level
  589.                 database, and any release notes.  165K in size (VID201.ZIP).
  590.  
  591.       VIDPLUS - This will get you the VID+ modules.  You must have the VID
  592.                 engine (above) for this to be functional!  This expands
  593.                 to around 1.5MB or so.  323K in size (VP0793.ZIP).
  594.  
  595.          FROM - Under the Nile BBS, 1:3613/12, 14.4 USR
  596.                 (706) 596-8126
  597.  
  598. ---------------------------------------------------------------------------
  599.                        OPENDOORS SNIPPPPPPPPPETS!!!!!!
  600. ----------------------------------------------------------------------------
  601. By : Mark Williamson             
  602.  
  603. The previous post of this code had a little error.  In the fill_box()
  604. function, remove the od_clr_scr().  I had put that in for test purposes.  Sorry
  605. bout that!
  606.  
  607. /********************************************************************/
  608.  
  609. I would like to submit this code for the next issue of ODTJ.  Please
  610. post my name and bbs info in the ODTJ with this code:
  611.  
  612. /******************************************************
  613. * fill_box() by Mark Williamson, Software Solutions BBS
  614. *               Fidonet 1:214/54, (209)997-0224
  615. *
  616. * This code will paint a box in the
  617. * specified color using the specified
  618. * character using ansi/avatar graphics.
  619. * Note that this does not make a border!
  620. * Only 'fills' a block on the screen.
  621. * Can be used to clear just parts of a screen.
  622. *
  623. * Call the function with the following parameters:
  624. *
  625. *   int srow,scol:  Starting row,col of the box
  626. *   int erow,ecol:  Ending row,col of the box
  627. *   int attrib:     od_set_attrib() style color code
  628. *   char fill_char: The character to use to paint the
  629. *                   block.  Use ' ' to clear a block.
  630. *
  631. *   This code is placed in the public domain.
  632. ******************************************************/
  633.  
  634. #include <stdio.h>
  635. #include "opendoor.h"
  636.  
  637. void fill_box(int srow, int scol, int erow, int ecol,
  638.               int attrib, char fill_char);
  639.  
  640. void main(void)
  641. {
  642.     fill_box(3,10,13,40,0x1f,'░');
  643. }
  644.  
  645. void fill_box(int srow, int scol, int erow, int ecol,
  646.               int attrib,char fill_char)
  647. {
  648.    int line_len,x;
  649.    if(srow<1) srow=1;
  650.    if(erow>24) erow=24;
  651.    if(scol<1) scol=1;
  652.    if(ecol>80) ecol=80;
  653.    line_len=ecol-scol;
  654. /*   od_clr_scr();                     OOPS!  TAKE THIS LINE OUT */
  655.    od_set_attrib(attrib);
  656.    for(x=srow;x<erow+1;x++) {
  657.       od_set_cursor(x,scol);
  658.       od_repeat(fill_char,line_len);
  659.       }
  660. }
  661.  
  662. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  663.  
  664. // The following function provided by Brian Pirie
  665. // during a telephone conversation with Brian and myself
  666. //
  667. // Arguments:  Prog - the path/filename of the program to run
  668. //             command_line - path/filename of the program and any
  669. //             command line arguments the program needs.
  670. //
  671. // Example:    prog = "PKUNZIP"
  672. //             command_line = "PKUNZIP TESTFILE.ZIP"
  673. //
  674. // Return value:  errorlevel of child process
  675. int run_it(char *prog,char *command_line)
  676. {
  677.     char *arg[3];
  678.     arg[0]=prog;
  679.     arg[1]=command_line;
  680.     arg[2]=NULL;
  681.     strcpy(arg[1],strshl(arg[1],strlen(prog)));
  682.     return(od_spawnvpe(P_WAIT,prog,arg,NULL));
  683. }
  684.  
  685. ----------------------------------------------------------------------------
  686.                  OpenDoors Tech Journal Information
  687. ----------------------------------------------------------------------------
  688.  
  689. Editors: Scott Burkett
  690.          Under the Nile BBS
  691.          1:3613/12@fidonet.org
  692.      Scott.Burkett@f12.n3613.z1.fidonet.org (Internet EMail)
  693.      (706) 596-8126 14.4 USR 
  694.          1113 29th Street
  695.          Columbus, GA 31902
  696.  
  697.          Brian Pirie
  698.          BP ECOMM Systems
  699.          1:243/8@fidonet.org
  700.          brian@bpecomm.ocunix.on.ca (Internet EMail)
  701.          (613) 526-4466 14.4
  702.          1416 - 2201 Riverside Drive
  703.          Ottawa, Ontario
  704.          Canada
  705.          K1H 8K9
  706.  
  707. Published by and for programmers and users of the OpenDoors C Communications
  708. Library and BBS Interface Kit by Pirie Enterprises.  It is a compilation of
  709. tips, reviews, and tidbits pertaining to BBS programming and general usage.
  710. The opinions expressed in this publication do not necessarily represent those
  711. of its editors, the OpenDoors author, or other contributors.
  712.  
  713. OBTAINING COPIES:  The latest copy of the OpenDoors Tech Journal will always
  714. be available under the magic name of TECHD (for the DOS version), and TECHW
  715. (for the Windows .WRI version) at both of the systems listed above.
  716.  
  717. SUBMISSIONS: You are encouraged to submit articles for publication in the
  718. journal.  Please send all items to one of the afore-mentioned systems via BBS
  719. upload or mailer file/attach.
  720.  
  721. ----------------------------------------------------------------------------
  722.    ->< End of The OpenDoors Tech Journal - Volume 93 Issue Number 5 ><-
  723. ----------------------------------------------------------------------------
  724.      
  725.