ODTJ9305.TXT 32 KB

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