home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / rflow130.zip / ReFlow.Doc < prev    next >
Text File  |  1995-03-12  |  22KB  |  343 lines

  1.       ReFlow for Bulletin Board Systems, (c)1994,1995 Spudsian Software
  2.                              A FILES.BBS utility
  3.                                     v1.30
  4.  
  5. OVERVIEW:
  6.         ReFlow is a utility I devised due to my irritation with Maximus-CBCS
  7. file description handling.  It will 'Reflow' (or convert) your FILES.BBS
  8. descriptions from a long format to a smaller, user defined, format.  For
  9. example, if your description line for a file in your FILES.BBS is VERY long
  10. (i.e. 255 characters or more), you can use ReFlow to break up the lines into an
  11. easier to read, multi-line, description.  ReFlow can not only break up file
  12. descriptions, it can also combine them!  This means that it can not only break
  13. long description lines into multiple lines, it can also MAKE long description
  14. lines from multiple lines (either prior to ReFlowing, or by itself).
  15.         As an added bonus, I've added routines to ReFlow to create 4Dos(tm)-
  16. compliant description files (DESCRIPT.ION).  This is of use to the 4Dos user
  17. who would like to see the file descriptions by just typing DIR!  NOTE: This
  18. also works well with 4OS/2 DIR command using the /Z commandline parameter.
  19.         As I said previously, I designed ReFlow with Maximus-CBCS in mind.
  20. Maximus BBS systems will only allow 255 characters per line.  Anything
  21. slightly larger is usually okay, but HUGE descriptions (such as are created by
  22. importing FILE_ID.DIZ) can really wreak havoc on the file database management
  23. system of Maximus.  ReFlow can be used by a Maximus SysOp to break the single,
  24. HUGE, description down into an easier, safer format for user viewing.  With the
  25. default parameters active, ReFlow will break up any file descriptions longer
  26. than 255 characters into ONE line of 255 characters.  Then, with the remainder
  27. of the description, ReFlow will create multiple line comments indented, word-
  28. wrapped, and to the proper length for Maximus-CBCS use!  This way, the
  29. description line of the FILES.BBS entry is tailored to the length Maximus can
  30. handle, and the comment lines will be perfectly formatted and correctly
  31. displayed to the user.  If you're not exactly sure what I'm explaining, then
  32. you probably don't have much need for ReFlow! <G>
  33.         And, last but not least, ReFlow is pretty darn fast!  On _my_ system,
  34. running OS/2 Warp Version 3, HPFS on all drives, 512Kb cache, 486DX/2 66Mhz,
  35. 8Mb RAM, on an OS/2 commandline, ReFlow processes _AND_ creates 4Dos(tm)-
  36. compatible description files for my ENTIRE filebase (almost 90 areas, including
  37. CDROM areas!  That's over 7000 files with LARGE descriptions!) in just over a
  38. minute!
  39.  
  40. RESTRICTIONS:
  41.         ReFlow will handle a MAXIMUM description length of 8K.  (That's 8192
  42. characters!!!!)  I don't look at this as a real restriction, but more as a
  43. temporary limit. <G>  If the need should arise and the users of this program
  44. desire to, then I can easily up this limit, or do away with it entirely.
  45.         ReFlow will handle a MINIMUM specified line length (via /d, /f or /4)
  46. of 20 characters.  What this means is that YOU cannot get ReFlow to flow your
  47. description files into lines less than 20 characters.  WHY, on God's green
  48. earth, anyone would want to is way beyond my comprehension! <G>  Think about
  49. it: The SMALLEST description line you can have in a FILES.BBS is (usually) 13
  50. characters (8 filename, 3 extension, 1 dot).  With a description line length
  51. less than 20 characters, that leaves you _7_ characters for a description!
  52. Besides, anything smaller would crash the program. <Grin>
  53.         ReFlow can be used in either DOS or OS/2 platforms, BUT it requires
  54. extra files to run properly (with the exception of REFLOWP.EXE for OS/2-only
  55. users).  It was written in GNU/EMX C so the OS/2 version requires EMX.DLL in a
  56. LIBPATH directory, and the DOS version requires EMX.EXE (for VCPI memory
  57. compliant systems) or EMX.EXE _AND_ RSX.EXE (for DPMI memory compliant systems)
  58. located somewhere in a PATHed directory.
  59.         While ReFlow accepts masks for selecting description files, it will
  60. NOT accept the "*.*" mask.  "*.BBS" or "FILES.*" are okay, but if you specify
  61. "*.*", ReFlow will change it to the default description file, "FILES.BBS".
  62. This _may_ be changed in the future depending on how much of a restriction it
  63. is to the users.
  64.         I suppose there are limits to the various commandline settings
  65. (Indentation, subsequent description length, etc.), but I don't think they
  66. could be very realistic.  Just stick with realistic settings and rely on
  67. common sense (i.e. setting indent to larger than subsequent description
  68. length doesn't make much sense, eh?), then you shouldn't run into any
  69. problems.  I have minimal error-trapping code in the program, so if you need an
  70. 'unusually' odd setting, please test it on a backup FILES.BBS first.  More
  71. often than not, if ReFlow has big problems, it will just do a core dump and
  72. stop working.  BUT, there is always the potential of totally hosing up your
  73. description files, so BE CAREFUL!
  74.  
  75. COPYRIGHT:
  76.         Okay, now for the part of the document where every SysOp wonders what
  77. they can and cannot do with a program.  This software is not shareware.  I'm
  78. releasing this program in the time-honored tradition of FREEware programs for
  79. the Maximus-CBCS family of BBS systems (I retain the copyright to the original
  80. sourcecode).  Use this program for whatever you see fit.  Change it, delete it,
  81. do whatever you wish to/with it.  All I ask is that you always give me proper
  82. credit for coming up with this nifty utility.  This is my first GNU/EMX 'C'
  83. program I'm releasing to the public, and I don't wanna be forgotten <sniff>.
  84. Should you change the code, you do so at your own risk.  I make no guarantees
  85. that I will upgrade my program to work with anyone else's idea.  The only
  86. exception being that you have enough respect for me to tell me the changes you
  87. made.  I ALWAYS stress the value of feedback and ideas.  I'll tell you, future
  88. user of ReFlow, the same I tell my users of my BBS: I cannot make this thing
  89. what you want unless you tell me what you want.  Nuff said.
  90.         All in all, use this program as you wish, but always remember that I
  91. wrote it and retain the copyright to the original sourcecode.  Give it to your
  92. friends, or keep it to yourself.  I wrote this thing for me, and thought it
  93. handy enough to share with everyone else.  Enjoy this program, and let me know
  94. what you think or would like to see in the future.
  95.  
  96. INSTALLATION:
  97.  
  98.      Decompress the ReFlow archive (preferably with a native OS/2 decompressor
  99. so as to preserve the EA's for the OS/2 version).  Here is a list of the files
  100. in the archive and what they are for:
  101.  
  102.         REFLOW.EXE   - The program that does all the work! (OS/2 or DOS)
  103.         REFLOWP.EXE  - The stand-alone OS/2 version
  104.         REFLOW.DOC   - What you are reading now
  105.         HISTORY.DOC  - Detailed version history of ReFlow.
  106.         FILE_ID.DIZ  - Short description of ReFlow for BBS systems.
  107.         EMX.EXE      - The file required for DOS VCPI-compliant systems
  108.         RSX.EXE      - The file required for DOS DPMI-compliant systems
  109.         EMX.DLL      - The file required for OS/2 systems using REFLOW.EXE
  110.  
  111.      Copy the REFLOW.EXE file to wherever you wish.  For DOS systems, the
  112. EMX.EXE (and RSX.EXE if your system does not support VCPI) must be able to be
  113. located by ReFlow such as the same directory as REFLOW.EXE or somewhere in you
  114. PATH.  For OS/2 systems, place EMX.DLL in a directory specified by your
  115. LIBPATH variable.
  116.       For OS/2 users who don't plan on EVER using ReFlow in a DOS BOX, you can
  117. just use REFLOWP.EXE and completely forget about messing with EMX.DLL,
  118. RSX.EXE, or EMX.EXE!  NOTE: This file runs somewhat faster than the bound
  119. version!
  120.       NOTE TO OS/2 USERS USING REFLOW.EXE IN A DOS BOX: I see little reason
  121. anyone would want to use this native OS/2 program in a DOS BOX, but a little
  122. ditty just in case.  OS/2 DOS BOXes do not support VCPI, so you will need the
  123. RSX.EXE AND EMX.EXE files located in a directory in your PATH.
  124.  
  125.         Okay, that's it!  It's installed!  Now how to use it:
  126.  
  127. USAGE:
  128.         ReFlow is very configurable.  I may have written this thing for my own
  129. personal use, and the default values are based on that, but I've coded in
  130. functions so you can deviate from the defaults to work with your own system.
  131. Here is the commandline format:
  132.  
  133.     ReFlow [/?/4{#}/!/b/c/s/r/i#/f#/d#/k#/m<path>/~] <Path/filename/mask>
  134.  
  135.         ReFlow, used by itself, will function with the defaults.  Should you
  136. use any of the commandline options, then they MUST come before the filename of
  137. the description file to reflow (if you use one at all).  Listed below is what
  138. each option is for:
  139.  
  140.         /?  - Show helpscreen
  141.         /4# - 4Dos(tm) mode.  Creates DESCRIPT.ION files for viewing file
  142.               descriptions via 4Dos/4OS2 DIR command.  {default: do not create
  143.               DESCRIPT.ION}
  144.               Optional # is to control how long the description lengths in
  145.               DESCRIPT.ION will be. {default: 215 characters}
  146.         /!  - Do NOT reflow the description file.  Only good use is in
  147.               conjunction with 4Dos mode if you only want to create the
  148.               DESCRIPT.ION. {default: reflow the description files}
  149.         /b  - Make backups of the description file by copying it to a file with
  150.               the extension .BAK. {default: do NOT make backups}
  151.         /c  - Check for ASCII 255 characters in description file.  If found,
  152.               convert it to an ASCII 32 (space) characters.  "Why would I need
  153.               this?" you may ask.  Well, this is only of use to Maximus v2.01wb
  154.               SysOps.  Maximus' file database compilation utility, FB(P), will
  155.               literally choke if it runs into this character in a description
  156.               file.  On my system, if FB(P) found this character in the file,
  157.               it would stop processing the file, thus, leaving out ALL files
  158.               and descriptions after this character!  "What does this
  159.               character look like?" you may ask.  It looks like this _ _
  160.               (between the underscores).  Looks like a space, don't it?  Well
  161.               it ain't!  If you were to bring this document up with a hex
  162.               editor, you would see an 'FF' between the underscores.  I
  163.               personally call this character a "Hard space" as it can be used
  164.               in many places a space character cannot, like a filename.  The
  165.               solution to the FB(P) problem would be to replace all occurances
  166.               of the hard space with a normal space.  As you can tell, this
  167.               could be a nightmare if you had to do this manually!  Finding
  168.               something that looks like a space, but isn't, is hard for the
  169.               human eye, but a piece of cake for a program!  This feature,
  170.               very simply, takes what looks like a space, and MAKES it a
  171.               space! <Grin>
  172.         /s  - Process all subdirectories too. {default: do NOT process
  173.               subdirectories}
  174.         /r  - REVERSE ReFlow mode.  When this parameter is specified, ReFlow
  175.               will combine multiple line descriptions into one LONG
  176.               description line PRIOR to the actual ReFlowing.  Descriptions
  177.               are considered multi-line ONLY when the following lines begin
  178.               with a space character.  If they begin with anything else, they
  179.               will NOT be combined.  If used in conjunction with the /! (no
  180.               ReFlow) parameter, the description file written to disk will
  181.               be in the LONG description line format.  This is VERY handy for
  182.               those of you using *.DIZ formatting programs such as DIZMAN
  183.               which often make poor attempts at creating multiple line
  184.               descriptions.  For those of you familiar with DownSort, this
  185.               parameter works the same way as if DownSort had re-written the
  186.               description file.
  187.         /i# - Indent subsequent description lines # spaces from the left
  188.               margin. {default: 31 spaces}
  189.         /f# - Maximum length of first line of description.  This is what
  190.               actually controls ReFlow.  If any description lines are larger
  191.               than this, then the line will be reflowed. {default: 255
  192.               characters}
  193.         /d# - Maximum length of subsequent description lines.  If the
  194.               description line is larger than the /f setting, then this is the
  195.               maximum length the flowed lines will be. (NOT including
  196.               indentation) {default: 48 characters}
  197.         /k# - Keep first # lines untouched by ReFlow.  This is for any of you
  198.               who use any description 'headers' for the file which are longer
  199.               than the /f setting so that the headers will not be reflowed.
  200.               Most folks will not need this setting unless their header lines
  201.               are longer than the /f setting. {default: 0 lines}
  202.         /mP - Path to the Maximus-CBCS(tm) AREA.DAT file.  This option is for
  203.               the Maximus SysOp who wishes to reflow all description files as
  204.               defined in their FILEAREA.CTL.  Using this option will place
  205.               ReFlow in MAXIMUS mode, withdrawing the filearea path and
  206.               description filename from AREA.DAT.  Before you ask, YES!,
  207.               ReFlow will work just fine with fileareas which have the
  208.               description file in another directory (FILELIST command verb
  209.               mostly used for CDROM areas). NOTE: Using this option with /s or
  210.               a description filename is redundant and the /m setting will
  211.               override and take precedence. {default: NORMAL mode}
  212.         /~  - Fix Rob Hamerling's DownSort v6.0l header bug.  DownSort is
  213.               YAWFP (Yet Another Wonderful Free Program) which is used by
  214.               many-a-Maximus SysOp for it's excellent filebase description
  215.               processing and allfiles lists capabilities.  With the advent of
  216.               version 6.0, it reaches the realms of absolute beauty with it's
  217.               plethera of features, but, unfortuneatly, it has a slight bug.
  218.               If you were to use DownSort v6.0l to create those nice headers
  219.               for your description files, and had any keys/locks defined for
  220.               that filearea, DownSort would place the keys/locks on the first
  221.               column of line 10.  This makes the header look a bit messy as
  222.               it's the same line in which the "Newest File:" is located.  If
  223.               you use this commandline option of ReFlow, it will simply just
  224.               search for the extraneous information on line 10 and remove it.
  225.               Note, however, that ReFlow will automatically place itself in
  226.               SKIP mode to skip the first 13 lines of the description file in
  227.               order to accomplish this 'fix' (attributable to using the /K10
  228.               commandline option).  This should not impact your system if you
  229.               use DownSort headers for all your fileareas.
  230.  
  231.         The final piece(s) of data which you can specify on the commandline is
  232. <Path/filename/mask to reflow>.  Here is where some TRUE power comes in! <G>
  233. If you specify nothing (default), then ReFlow will use FILES.BBS as a
  234. description file.  If you specify only a path, then ReFlow will use FILES.BBS
  235. as a description file, looking for such a file in the specified path.  If you
  236. specify only a filename or mask such as DESC.* or *.BBS, but NOT *.* (see
  237. RESTRICTIONS: section above), then ReFlow will use the specified filename (or
  238. mask) as a description file.  If you specify a path AND a filename or mask
  239. such as D:\FILEBASE\DESCRIP.BBS or D:\FILEBASE\DESCRIP.*, but NOT E:\*.* (see
  240. RESTRICTIONS: section above).  ReFlow will use the specified filename,
  241. starting from the specified path!  The default is to use the current
  242. directory, and FILES.BBS.
  243.         You may think I'm over-explaining this option, but I find it VERY
  244. important you know how ReFlow works this way especially if you plan on using
  245. the /s option!  ReFlow DOES NOT differentiate between a textfile and a binary
  246. file and will happily reflow your ZIPfiles as well as your file description
  247. files!  This option is VERY powerful, but with such power comes great danger.
  248. MAKE SURE you know what you plan on doing before you do it!  (This warning is
  249. mostly to those non-Maximus SysOps.  Most Maximus SysOps know what it's like
  250. to totally hose your system by fooling around with a powerful option which was
  251. not properly RTFM'd! <G> )
  252.         NOTE: ReFlowing a file which has already been reflowed will not cause
  253. any harm so long as you use the same, or larger, /d and/or /f settings.
  254. Remember, ReFlow only kicks into action when a description line is longer than
  255. the /f or default setting of 255 characters.
  256.         NOTE ON 4DOS(tm) MODE: If you use this mode, Reflow will DELETE any
  257. prior descriptions you had made in that particular directory!  YOU HAVE BEEN
  258. WARNED! <G>  Also, as I couldn't find a function ANYWHERE in the EMX/GNU
  259. library to control the file attributes (i.e. Hidden, System, Read-Only, etc.),
  260. so the DESCRIPT.ION file will show up with the DIR command.  Normally, 4DOS
  261. DESCRIPT.ION files are hidden by nature.  If any of you EMX/GNU programmers
  262. out there know of a way to control file attributes, please send me mail
  263. sharing your wisdom!  Until then, I'll keep searching the EMX/GNU libraries
  264. for a possible solution to this problem.
  265.  
  266. CONCLUSION:
  267.         So far (as far as I know), this program has ONLY been tested on my
  268. system.  What does that mean?  Well, I can only say that it works just fine on
  269. my 486DX/2-80Mhz VESA localbus OS/2 Warp Version 3 machine with 16Mb of RAM,
  270. over 80 fileareas containing over 7000 files, under Maximus-CBCS v2.02.  All
  271. aspects of ReFlow worked beautifully in BOTH the OS/2 and DOS BOXes (using
  272. 4DOS AND 4OS/2) of MY machine.  If it don't work on your machine, sorry, I
  273. don't have access to your machine. <G> Feel free to drop me a line if it don't
  274. work.  (NOTE: Useless NetMail messages such as "It don't work!" or "It sucks
  275. my fishbowl!" will be expediently ignored.  DETAILS are only what will help me
  276. to help you get the program to work on YOUR machine!)
  277.         Well, folks, that's about enough writing for me.  I will most likely be
  278. changing this program as time goes on, so be prepared!  (see FUTURE: below for
  279. ideas I have)  Enjoy, and any feedback, gripes, suggestions, or comments can be
  280. sent Netmail to:
  281.                 Mark Zembrzuski (aka: Spudster)
  282.                 1:102/1017@fidonet.org
  283.  
  284. or SnailMail to:
  285.                 CEO: Spudsian Software
  286.                 15 E. Olsen Rd #10
  287.                 Thousand Oaks, CA 91360
  288.  
  289. (Postcards welcome for those of you who wish to show your appreciation. <Grin>)
  290.  
  291. WORD OF THANKS:
  292.         This goes out to a Mr. Scott J. Dudley, programmer extrodianairre.
  293. Author and creator of one of the best BBS programs on the market,
  294. Maximus-CBCS.  (He may be slow, but his code is GREAT!)
  295.         Also, a thanks should most definately go out to Mr. Eberhard Mattes,
  296. author and creator of the EMX/GNU compiler.  Without this combination, I
  297. probably would have never decided to port the REXX version of this program to
  298. 'C'.  (I use OS/2, I wanted a native OS/2 version, but I cannot afford an
  299. OS/2 compiler! <G>)
  300.         Another thanks should really go out to Rob Hamerling for the creation
  301. of DownSort(tm).  I've really left him out of this 'THANKS' section for much
  302. too long!  If it wasn't for his program making my description file headers (and
  303. allfiles lists) looking so nice, I wouldn't have had enough pride in my
  304. description files to create ReFlow.  Thanks, Rob!  Please don't give up!!!
  305.         Last, but definately not least, my hats off to Rex Conn & JP
  306. Software, Inc. for creating the most advanced commandline interpreter known to
  307. the IBM world.  I am, of course, speaking of 4DOS and 4OS2.  If you are a
  308. SysOp or an advanced computer user who doesn't have this marvelous program, YOU
  309. SHOULD! <G>
  310.  
  311. THE FUTURE:
  312.         Here is a short list of things I plan to change/enhance as time goes
  313. on:
  314.         . I hate to mention this because I really don't wanna complicate my
  315.           program anymore that it is already, but: Add KEY/LOCK/BARRICADE
  316.           capability for Maximus-CBCS systems.  As it stands now, ReFlow will
  317.           flow EVERY listing in AREA.DAT.
  318.         . Distribute a stand-alone DOS version.  This will most definately
  319.           happen as soon as I wrinkle out a few coding problems I'm running
  320.           into.  When I accomplish this, DOS users will need neither the
  321.           EMX.EXE or the RSX.EXE.  Also, REFLOW.EXE will be better optimized
  322.           and run a bit faster (maybe).
  323.         . Recode the OS/2 version into whatever compiler I decide to buy in
  324.           the future.  EMX/GNU works, and works well considering the price
  325.           (FREE!), but I'm lead to believe a commercial compiler would create
  326.           slightly better output code.
  327.         . Better documentation!  In the immortal words of oh-so-many
  328.           programmers out there: "Dammit, Jim, I'm a programmer, not a
  329.           novelist!" <G>  (If anyone out there would like to re-write this
  330.           documentation, be my guest!  Everyone knows programmers write crappy
  331.           docs! <grin> )
  332.         . And, of course, implement any and all suggestions from yall!
  333.  
  334. COPYRIGHTS TO OTHER PROGRAMS MENTIONED IN THIS DOC:
  335.         4DOS, 4OS/2 (c)1988-1994 Rex Conn & JP Software, Inc.
  336.         OS/2 Warp Version 3 (c)1987,1994 IBM Corp
  337.         Maximus-CBCS v2.02 (c)1990, 1994 Lanius Corporation
  338.         GNU (c)1991 Free Software Foundation, Inc.
  339.         EMX (c)1993 Eberhard Mattes
  340.         RSX (c)1993, 1994 Rainer Schnitker
  341.         DownSort, Maximus CBCS DOWNload file SORT and List Utility
  342.           (c)1994 Rob Hamerling
  343.