home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / HATCH / PBS_V151.ZIP / PBSTRING.DOC < prev    next >
Text File  |  1996-11-03  |  87KB  |  1,762 lines

  1.  PBstring 1.51 - COPYRIGHT 1995,1996 - TRACY L. BAKER - STARPORT VALHALLA BBS
  2.              PBconfig 1.21 - COPYRIGHT 1995,1996 - TRACY L. BAKER
  3.             PBreplace 1.31 - COPYRIGHT 1995,1996  - TRACY L. BAKER
  4.                 }}} SPV is an *OFFICIAL* WWIV Support Site {{{
  5.     *** All the legal junk is at the end of this file, it must be read! ***
  6.                            >>> A CEREBRUM RELEASE <<<
  7.  
  8.           [[[ THIS PROGRAM MODIFIES YOUR SOURCE -- MAKE BACKUPS! ]]]
  9.  
  10.     <<< IF YOU ARE USING A 80286 COMPUTER, THIS PROGRAM WILL NOT WORK! >>>
  11.        <<< CONTACT PAPA BEAR (1@11579.WWIVNET) FOR A CUSTOM VERSION >>>
  12.  
  13.     STARTING WITH VERSION 1.4ß3, RUN SETUP.EXE THE FIRST TIME YOU USE THIS
  14.                                    PROGRAM!
  15.  
  16.                                { SECTION 0.0 }
  17.                             : TABLE OF CONTENTS :
  18. Section 1:
  19.           1.0 -------------- Introduction
  20.           1.1 -------------- Requirements
  21.           1.1.1 ------------ Hardware
  22.           1.1.2 ------------ Software
  23.           1.1.2.1 ---------- Software notes
  24.           1.1.3 ------------ Software that would be nice to have...
  25.           1.2 -------------- Installation
  26.           1.3 -------------- Features (or: bragging rights)
  27.           1.4 -------------- Escape codes, string files, and string editors
  28.           1.5 -------------- IMPORTANT NOTES ABOUT UNREGISTERED COPIES!
  29.           1.6 -------------- Notes about backups these programs make
  30.           1.7 -------------- Testing procedures, DISCLAIMERS, and more!
  31.           1.8 -------------- About the way data is entered.
  32.  
  33. Section 2:
  34.           2.0 -------------- Command line switches for PBstring
  35.           2.1 -------------- A word about those status lights
  36.           2.2 -------------- Keys you can play with during processing
  37.           2.3 -------------- Log file information
  38.           2.4 -------------- Debug information
  39.           2.5 -------------- Exit codes (error levels)
  40.  
  41. Section 3:
  42.           3.0 -------------- Notes about comments, variable declarations,
  43.                              preprocessor directives, and multiline printf()'s
  44.           3.1 -------------- Comments
  45.           3.2 -------------- Variable declarations
  46.           3.3 -------------- Preprocessor directives
  47.           3.4 -------------- Multiline printf() type lines
  48.  
  49. Section 4:
  50.           4.0 -------------- Of INC's and EXC's (and the √ explained, too!)
  51.           4.1 -------------- Inclusion file
  52.           4.2 -------------- Exclusion file(s)
  53.           4.2.0 ------------ Date checking file (PBSTRING.DTE)
  54.           4.2.1 ------------ File exclusion file (PBS-FILE.EXC)
  55.           4.2.2 ------------ Function exclusion file (PBS-FUNC.EXC)
  56.           4.2.3 ------------ Partial string exclusion file (PBS-CHAR.EXC)
  57.           4.2.4 ------------ Complete string exclusion file (PBS-STRG.EXC)
  58.           4.2.5 ------------ "STR_MOD" emulation
  59.  
  60. Section 5:
  61.           5.0 -------------- How to change WWIV source code to accept new
  62.                              STR files
  63.  
  64. Section 6:
  65.           6.0 -------------- PBreplace (PBREPL.EXE) documentation
  66.           6.1 -------------- Command line switches
  67.           6.2 -------------- Run time options (the selection screen)
  68.           6.3 -------------- More information
  69.  
  70. Section 7:
  71.           7.0 -------------- PBconfig (PBCONFIG.EXE) documentation
  72.           7.1 -------------- Command line switches
  73.           7.2 -------------- An important note about PBSTRING.INI
  74.  
  75. Section 8:
  76.           8.0 -------------- Legal junque (You _should_ read this!)
  77.           8.1 -------------- Copyright notice
  78.           8.2 -------------- Warranty
  79.           8.3 -------------- License Agreement
  80.           8.4 -------------- Registration
  81.  
  82. Section 9:
  83.           9.0 -------------- The Hall of Honor - those who have registered
  84.  
  85. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  86.  
  87.                                { SECTION 1.0 }
  88.                                : INTRODUCTION :
  89. Quite a long time ago, a great WWIV SysOp called Captain EJ (Eric Joy) and I
  90. wrote a program that would automatically remove the literal strings from the
  91. WWIV *.C source files and place them into an external *.STR file.  It did
  92. this as well as replacing the line in the *.C file with the appropriate
  93. get_stringx(); function call.  This program is called STR_MOD and its last
  94. version was v5.15b which was released on 1/20/94.
  95.  
  96. It was, and still is, a great saver of DGROUP.
  97.  
  98. However, it does have some bugs, and it is limited.  Unfortunately, due to a
  99. accident, the source to STR_MOD was lost shortly after v5.15b was released.
  100.  
  101. Now I have decided to re-create, and massively improved, STR_MOD into this
  102. program, PBstring.
  103.  
  104. PBstring will do everything STR_MOD did and more, much more.  It'll properly
  105. handle replaceable parameters, C escape codes, and other things STR_MOD
  106. didn't process.  All of this, with MUCH more flexibility.  This program is
  107. faster, too.
  108.  
  109. So what does this do?  It takes literal text, that text in C source code that
  110. lies between a set of double quotes, "like this", and removes it to an
  111. external data file.  That is its whole job.  Keep in mind that while this
  112. SOUNDS easy, it is not -- not even if you do it by hand (and I ought to know
  113. <G>).
  114.  
  115. Of course, your program should be able to read the data file (WWIV does a
  116. good job of this) to be able to "re-insert" the text back into the program
  117. during run-time.
  118.  
  119. This extracted text cuts WAAAAY down on DGROUP, and make it easier to modify
  120. the text strings (using a string editor such a WWIV Software Services' ESM
  121. [External String Manager]) without having to recompile the code.  This is
  122. especially great for this little cosmetic changes!
  123.  
  124. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  125.  
  126.                                { SECTION 1.1 }
  127.                                : REQUIREMENTS :
  128. PBSTRING.EXE, PBCONFIG.EXE, and PBREPL.EXE *MUST* all physically exist
  129. together in the directory that you're going to be using the program(s).
  130.  
  131. Any machine that is capable of running WWIV, especially a multinodal WWIV,
  132. should be able to run this program without any problems.  However, lets cover
  133. the hardware and software that is needed anyway.
  134.  
  135. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  136.  
  137.                               { SECTION 1.1.1 }
  138.                    : HARDWARE NEEDED TO RUN THIS PROGRAM :
  139. You need to be running at LEAST a machine with an 80386 processor and a VGA
  140. video adapter card.  If you are operating with "less" than this, let me know
  141. and I'll make you a custom copy of PBstring (and the associated programs).
  142.  
  143. For memory requirements, you need at least 160k free of conventional memory.
  144.  
  145. To run the PBconfig companion program by itself, you'll need 100k of free
  146. memory. If you run the PBconfig program via the PBstring program (IE: You use
  147. the /C or /SE switches -or- PBconfig executes automatically in the case of a
  148. non-existent or outdated INI file) you'll need at LEAST 260k free of
  149. conventional memory.
  150.  
  151. PBreplace needs 130k to operate in.
  152.  
  153. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  154.  
  155.                               { SECTION 1.1.2 }
  156.                    : SOFTWARE NEEDED TO RUN THIS PROGRAM :
  157. DOS, or any program capable of creating, or emulating, a DOS "window" or
  158. "session".  MSDOS, PCDOS, IBMDOS, DRDOS [NovellDOS], OS/2, Windows 95,
  159. Windows 3.1x, DESQview, and possibly others, are qualifying candidates.
  160.  
  161. This program was written primarily with WWIV in mind.  The registration code
  162. checking is dependent on information from WWIV.  As a result, it has been
  163. tested, and works best, with WWIV source code.  However, this program will
  164. work fine with any program that supports external string files of the type
  165. used by WWIV.
  166.  
  167. C source code is also required. (duh!)
  168.  
  169. Again, since this program was written with WWIV in mind, the registration
  170. code key decryption is based on certain information available only from
  171. systems that are actually running WWIV.  If you wish to use this program and
  172. you do not run a WWIV, simply let me know as much, and arrangements can, and
  173. will, be made to suit your needs!
  174.  
  175. Borland C/C++ 3.1 or newer.  Borland's Turbo C/C++ 3.0 or newer.  One of these
  176. is kind of necessary if you want to compile WWIV's source code.  Cost varies
  177. greatly -- Turbo C is usually the cheaper of the two, however.  Any version
  178. older may not compile WWIV's source code correctly any longer.  (Borland
  179. C/C++ 2.0, if you can find it, may still work fine.)
  180.  
  181. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  182.  
  183.                              { SECTION 1.1.2.1 }
  184.                      : SPECIAL SOFTWARE CONSIDERATIONS :
  185. Again, at least 110k in DOS (or a DOS window, or session) is required.
  186.  
  187. PBstring also opens, and simultaneously maintains, MANY files.  At any given
  188. time during the normal operation of this program, PBstring or PBreplace have
  189. as many 20 files open.  I chose to do things this way because, quite simply,
  190. it makes the program *much* faster!  This is in conjunction that DOS needs
  191. for its operation during PBstring's execution.  As a result, the FILES setting
  192. (normally set in the CONFIG.SYS file -- but can be found in the AUTOEXEC.BAT
  193. file if using QEMM) must be set to at least 30 to be safe.  You'll know if
  194. you have too few specified if you get errors in PBstring indicating a certain
  195. file couldn't be opened.
  196.  
  197. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  198.  
  199.                               { SECTION 1.1.3 }
  200.               : OTHER SOFTWARE PROGRAMS THAT ARE NICE TO HAVE :
  201. Although the MINIESM.EXE that comes with WWIV can edit the string files
  202. created by PBstring, there are better ones out there.  External String
  203. Manager (ESM) can be obtained from WWIV Software Services (WSS).  The cost of
  204. this program is $5.
  205.  
  206. External String Editor (ESE) (from French Mod Division) will also work *IF*
  207. you do not allow PBstring to create, or convert to, 255 character long string
  208. files.  This can be done by using the /1 command line switch.  This editor is
  209. free.  It has also been reported to me that FMD's WWIVsys, with the built in
  210. string editor, will properly handle 255 character length strings.  WWIVsys'
  211. registration fee is $30.
  212.  
  213. STRPOP, also from WSS, is a great little utility that allows you to view and
  214. edit the strings associated with the get_string() / get_stringx() statements
  215. while you're working on your source.  First, you'd load STRPOP (its a TSR),
  216. then you go and edit your source file.  When you're in your editor, simply
  217. place your cursor on the line you want to see, and press ALT-V.  Supports
  218. multiple STR files, too.  Registration is $15.
  219.  
  220. Qedit v3.0+, from SemWare, is my all-time favorite editor.  Registration
  221. is $59.
  222.  
  223. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  224.  
  225.                                { SECTION 1.2 }
  226.                        : HOW TO INSTALL THIS PROGRAM :
  227. Simple, just place all of the PBstring files in your source directory. :)
  228. The files you're most interested in are: PBSTRING.EXE, PBREPL.EXE,
  229. PBCONFIG.EXE, PBS-CHAR.EXC, PBS-FILE.EXC, PBS-FUNC.EXC, PBS-FILE.EXC,
  230. PBSTRING.DTE, and the PBSTRING.REG files.
  231.  
  232. Then, run the SETUP.EXE that now comes with the archive.  READ ALL SCREENS
  233. and do what they are telling you to do.  This is the *best* way to get up and
  234. running for first-time installations.
  235.  
  236. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  237.  
  238.                                { SECTION 1.3 }
  239.                     : BRAGGING ABOUT MY PROGRAM TIME <G> :
  240. Well, first off, this program really DOES save a lot more DGROUP than
  241. STR_MOD.  On virgin source, this program saves an extra 6k of DGROUP over
  242. STR_MOD.  On my massively modded source code, after STR_MOD had its shot on
  243. the source, PBstring saved an additional 10k!
  244.  
  245. Additionally, I've been able to make PBstring much faster than STR_MOD.  I
  246. can process my entire source code in a hair over 2 minutes with PBstring.
  247. With STR_MOD, it was over 15 minutes.
  248.  
  249. Safety.  This is the name of the game when dealing with your C files -- you,
  250. and I, don't want all your hard work to go to waste. I've worked VERY hard to
  251. make certain that PBstring does not screw up your C files.  They're backed up
  252. *BEFORE* processing.  The processing that takes place for each line must pass
  253. through 4 tests that you determine (via exclusion files), and up to 10 more
  254. built into the program.  Only when a line of code has passed through all of
  255. these safety tests can it be processed for get_stringx(x,y) replacement.  The
  256. string files themselves are copied FROM the GFILES directory so they can be
  257. processed while the BBS is running, if you want to, without interference to
  258. the BBS.  If the string file already exists in the string directory, it, too,
  259. is backed-up into the proper PBSORGxx subdirectory off your source directory.
  260.  
  261. Information.  The PBSTRING.LOG file reports everything that is going on.
  262. Additionally, my standard DEBUG processing is here, too.  You'll know at all
  263. times what in the heck is going on with your source.  See section 2.4 for
  264. more information on DEBUG.XXX  Alternatively, use the /DEBUG switch to
  265. activate the DEBUG mode.
  266.  
  267. My program, unlike STR_MOD, properly creates 255 character-length string
  268. files when a new one is made.  STR_MOD made 100 character files which could
  269. cause problems for extra long strings.  Additionally, PBstring will take any
  270. of those old 100 or 161 character length files and convert them to the newer
  271. 255 character format.
  272.  
  273. Please review PBSTRING.HIS for a comprehensive listing of additions, bug
  274. fixes, and/or enhancements made to the various PBstring programs.
  275. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  276.  
  277.                                { SECTION 1.4 }
  278.         : OF ESCAPE CODES, STRING FILES, AND EXTERNAL STRING EDITORS :
  279. This program takes most of the standard C escape code sequences that most
  280. external string managers CANNOT read and translates them into single
  281. character equivalents that CAN be processed by an ESM.
  282.  
  283. An important note here.  While a carriage return appears as a \r in the
  284. source code, in the string file, it appears as an ASCII 13, looking like a
  285. musical note when viewing it with the editor (WSS's ESM), and a capital
  286. reverse M when editing it in ESM.  The popular \n appears as a ASCII 10,
  287. looking like a box with a circle in it when viewed, and a capital reverse J
  288. when editing.
  289.  
  290. Other escape codes that are converted are: \a, \b, \f, \t, and \v.  Please be
  291. aware that each has their own characters when viewed, and when edited in ESM.
  292.  
  293. PBstring, as of version 1.4, fully supports ASCII codes that follow C's
  294. escape code character.  In other words, codes like \003 and \007 are properly
  295. converted to their literal ASCII codes (a heart for \003 and a dot for \007).
  296. This will work for just about any format (3-digits, max) that you use.  \003,
  297. \03, \3 will all translate into a heart.
  298.  
  299. HOWEVER, you should write code using all three digits, like \003 (heart), \032
  300. (carriage return), \171 (a ½ symbol).  Why?  Well in WWIV, the \003 is
  301. sometimes used to indicated the start of a color code.  The heart that is
  302. generated tells WWIV to convert the NEXT character (usually a number) into
  303. the appropriate color.  This number *must* immediately follow the \003, like
  304. \0035 for the color green.  If you use \35 or \035 instead, PBstring will NOT
  305. know that you want the heart with a 5 following.  It will, instead translate
  306. this into an ASCII 35 in each case.
  307.  
  308. NOTE: String files created with this program are 100% compatible with the
  309. External String Manager (ESM) written by Tolkien and sold by WWIV Software
  310. Services.  It is entirely possible that the External String Editor (ESE)
  311. written by the French Mod Division (or the WWSYS /ESE) will *NOT* work.  I've
  312. had problems in the past with getting ESE to work properly with the "new"
  313. style 255-character string files.  While I've had problems in the past, I
  314. also have reports from people experiencing no problems whatsoever.  Using the
  315. /1 switch should ensure compatibility with ESE, although it will also limit
  316. the extraction of certain strings.
  317.  
  318. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  319.  
  320.                                { SECTION 1.5 }
  321.                 : WHY YOU SHOULD REGISTER THIS FINE PROGRAM :
  322. This program is cheap.  $20 is not a lot of money when you consider the
  323. amount of time it'll save you.  If you were to go through and remove all the
  324. valid strings from your source by hand, you'd not only be there a long time,
  325. but you'd inevitably miss some.  Additionally, you'll have to do it again.
  326.  
  327. By registering this program, you give me ample reason to continue development
  328. of this program, and start new ones.
  329.  
  330. If left unregistered, You'll have to wait through a 60 second pause before
  331. and after the program executes.
  332.  
  333. So please register!
  334.  
  335. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  336.  
  337.                                { SECTION 1.6 }
  338.                       : THOSE EVER-IMPORTANT BACKUPS! :
  339. PBstring and PBreplace both automatically backup your source code and, if
  340. applicable, your string files too.
  341.  
  342. Starting with version 1.2 of PBstring (and 1.0 of PBreplace) the WAY it does
  343. this differs from previous versions.  Previously PBstring simply copied the C
  344. files to a file that had the same filename, and an ORG extension.  (Early
  345. ßetas of PBreplace did the same, but with a RPL extension.)  Additionally,
  346. PBstring would copy a pre-existing STR file over to a backup with a rather
  347. cryptic filename and a BAK extension.  This is no more.
  348.  
  349. Now PBstring and PBreplace will create a new subdirectory off your source
  350. directory and place the original files in them before any processing takes
  351. place on them.  The directories are incremental, meaning that for each time
  352. you run PBstring or PBreplace, a new backup directory is created so you can
  353. keep generations of backups.
  354.  
  355. For PBstring, the directory names are PBSORG00 to PBSORG99.  For PBreplace
  356. they're PBRRPL00 to PBRRPL99.  As each new directory is created, the counter
  357. is increased by one -- but ONLY if the directory number before any that exist
  358. are themselves present.
  359.  
  360. For example, if you're running PBstring for the 5th time, and you've not
  361. deleted any previous directories, PBSORG04 will be created, so you'll end up
  362. with the following dirs off your source dir:
  363.  
  364. PBSORG00
  365. PBSORG01
  366. PBSORG02
  367. PBSORG03
  368. PBSORG04
  369.  
  370. If, however, you've previously removed the old directories, then PBSORG00
  371. would be used (again).  If you've left PBSORG00, PBSORG01, PBSORG03 (skipping
  372. 02), then the next to be used would be PBSORG02 -- it fills in any dead spots.
  373. If you reach PBSORG99, and you run PBstring again, the program will halt with
  374. an error due to an inability to create a backup directory.  You can always
  375. find the newest directory by looking at the directory's date stamp.
  376.  
  377. PBreplace works in the same manner for the PBRRPL?? directories.
  378.  
  379. PBstring will backup a STR file that it finds in the source directory *OR* if
  380. it finds one in the string directory (as specified in the configuration
  381. editor) into the backup directory.  The C files are backup'ed into this
  382. directory, with an extension of ORG.
  383.  
  384. PBreplace backs-up the C files into its directory with extensions of RPL.
  385. Since it makes no changes the STR files, no backups of those are necessary.
  386.  
  387. Keep in mind that while PBstring and PBreplace process all the C files that
  388. you tell it, it will only keep backups of those files that it actually
  389. changes.  Those files that do not require any changes are kept as is.
  390.  
  391. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  392.  
  393.                                { SECTION 1.7 }
  394.                  : WHAT I TESTED THIS ON, AND A DISCLAIMER :
  395. I tested this on WWIV's virgin source.  I made certain that (1) PBstring
  396. would properly convert the C files, (2) that those C files would properly
  397. compile, and (3) that the resultant BBS.EXE would indeed execute.  I also
  398. made certain that the files I let it process were the same as those that
  399. Wayne Bell included get_string(); lines in.
  400.  
  401. I tested this on my *heavily* modified source.  I made certain that I could
  402. compile and use my source code.
  403.  
  404. I have also tested this using many examples of C source code obtained from
  405. many different people (usually when they discover a portion of the program
  406. that doesn't work).  In this manner, PBstring becomes more and more
  407. compatible with a much wider variety of programming styles.
  408.  
  409. PBreplace was also tested on my source.  I couldn't recompile, however, due
  410. to lack of DGROUP (<G>).
  411.  
  412. Additionally, I have ßeta testers that have tested this under OS/2, Windows
  413. 3.11, Windows 95, DESQview, PC-DOS 7.0, MS-DOS 6.22.  All of this on various
  414. machines and even LAN equipped systems.
  415.  
  416. Now a word of caution.  I cannot possibly know all the different ways that
  417. people program.  It may well be that this program chokes on something.  If it
  418. does, it is only because I've not seen that particular situation before,
  419. whatever that may be.  In other words, I can only guarantee that it worked on
  420. my source, and the virgin source, on the computer I'm using.
  421.  
  422. If you do find it choking, please E-Mail me the PBSTRING.LOG (if there's
  423. anything in it) and, and this is important, the C file it choked on.  I'll
  424. fix it from there.  E-Mail them to 1@11579.wwivnet.
  425.  
  426. While I have included what I feel are complete exclusion files (these are the
  427. files that keep PBstring from processing things it shouldn't), I may not have
  428. things in them that you need to successfully run this program.  Make certain
  429. the *carefully* check over things, and update your exclusion files as
  430. necessary!
  431.  
  432. REMEMBER, I wrote this program the best I know how.  It works well, and it
  433. has MANY safeguards built in to protect your source code.  However, I am not
  434. responsible for any damage or loss of your source code because of this
  435. program.  You chose to use it, so you're responsible.
  436.  
  437. You may find that after PBstring works its magic, and the source compiles
  438. fine, that your program (BBS) doesn't work correctly.  This is not caused by
  439. a problem with PBstring.  If anything, it is a case of PBstring working too
  440. well.
  441.  
  442. You see, a string may turn out to be a perfectly legitimate candidate for
  443. removal.  However, once removed, your program (BBS) will not handle it
  444. properly.  If you find this to be the case, then you can use the exclusion
  445. files (see Sections 4.2 - 4.2.5) to tell PBstring to skip over that line and
  446. avoid the problem in the future.
  447.  
  448. Keep in mind that you can either replace the entire C file to its original
  449. state by copying over it with its ORG companion.  Or, alternatively, you can
  450. simply replace that string with the one in the ORG file using a simple
  451. copy/paste sequence in your text editor.
  452.  
  453. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  454.  
  455.                                { SECTION 1.8 }
  456.                     : ABOUT THAT FANCY NEW ENTRY SCHEME :
  457. Beginning with version 1.4 of PBstring, and 1.2 of both PBconfig and
  458. PBreplace, I've introduced a new way of entering data.  It will now allow you
  459. to enter data instead of having to enter the new data in its entirety.
  460.  
  461. The keys that are active are: Backspace, Delete, Insert, left and right arrow
  462. keys, Home, Escape, and End.
  463.  
  464. The arrows, Home, End, Backspace, and Delete all work in the fashion that
  465. you're used to.
  466.  
  467. The Insert key toggles insert mode on or off (overstrike).
  468.  
  469. The Escape key clears the data from the field entirely, allowing you to enter
  470. new data.  If you press Escape, then Enter, the data field will be erased.
  471.  
  472. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  473.  
  474.                                { SECTION 2.0 }
  475.                           : COMMAND LINE SWITCHES :
  476. Here are the command lines that are available to this program:
  477. ──────────────────────────────────────────────────────────────────────────────
  478. [what to call this switch]    {example}
  479. /s{filename}  description
  480.               description
  481. example, if any
  482. ──────────────────────────────────────────────────────────────────────────────
  483. [+ append to log file]        {/+}
  484. /+            Makes PBstring append to PBSTRING.LOG instead of overwriting it.
  485. ──────────────────────────────────────────────────────────────────────────────
  486. [? Help]                      {/?}
  487. /?            Display the online command line option menu.
  488. ──────────────────────────────────────────────────────────────────────────────
  489. [1oo character long strings]  {/1}
  490. /1            This causes PBstring to create 100 character long string files
  491.               instead of the default 255 character long files.  This may be
  492.               necessary for some systems for backwards compatibility sake.
  493. ──────────────────────────────────────────────────────────────────────────────
  494. [3-triples]                   {/3}
  495. /3            Normally, PBstring will *not* process strings that have 3 or
  496.               more sets of double quotes (") in them.  This means that
  497.               strings like:
  498.  
  499.    printf("This is a % test.",(TEST>0):"POSITIVE":"NEGATIVE");
  500.  
  501.               will not be processed.  However, by including this switch, you
  502.               are forcing PBstring to go ahead and process them.  In this
  503.               case, they are handled identically as other strings.  Be
  504.               forewarned, however, that this *CAN* and *HAS* caused erratic
  505.               behavior once the source is recompiled, and the program
  506.               executed.  This is not a fault of PBfiles, rather, it is that
  507.               of the string handling routines trying to read in all three
  508.               extracted strings from the string file properly.
  509. ──────────────────────────────────────────────────────────────────────────────
  510. [All files in INC]            {/A}
  511. /A            This causes the program to run just the same as if no /A switch
  512.               of any kind was used.  This is the default operating mode.
  513.               PBSTRING.INC is the inclusion file used.
  514. ──────────────────────────────────────────────────────────────────────────────
  515. /AA           Process all the files listed in the inclusion file, ignoring
  516.               any date checking.
  517. ──────────────────────────────────────────────────────────────────────────────
  518. [All files in other INC]      {/AMYFILES.INC}
  519. /A{fn}        Similar to the normal /A switch except that the inclusion file
  520.               named after the /A will be used instead of PBSTRING.INC
  521. ──────────────────────────────────────────────────────────────────────────────
  522. [All files!]                  {/A!}
  523. /A!           Do every C file in the current directory regardless of whether
  524.               it is in any inclusion file or exclusion file.  Date checking
  525.               is *NOT* preformed.
  526. ──────────────────────────────────────────────────────────────────────────────
  527. [Build new INC]               {/B}
  528. /B            Build new INC file from files in current directory, and use the
  529.               PBS-FILE.EXC file as the exclusion file to determine what files
  530.               not to include.  The program will run normally at this time.
  531.               The file that will be built is PBSTRING.INC.
  532. ──────────────────────────────────────────────────────────────────────────────
  533. [Build other INC]             {/BMYFILES.INC}
  534. /B{fn}        Same as /B, as above, except build and use {fn} instead of
  535.               PBSTRING.INC.
  536. ──────────────────────────────────────────────────────────────────────────────
  537. [Build INC, don't run!]       {/B!}
  538. /B!          Build a new PBSTRING.INC file, as the /B switch, but do *NOT*
  539.              run the program afterwards.
  540. ──────────────────────────────────────────────────────────────────────────────
  541. [Build other INC, don't run!] {/B!MYFILES.INC}
  542. /B!{fn}      Build a new {fn} inclusion file, but do *not* run the program.
  543. ──────────────────────────────────────────────────────────────────────────────
  544. [enter Configuration editor]  {/C}
  545. /C           Enter the PBstring configuration editor.  (This is done
  546.              automatically as: (1) the program is run the first time, (2) the
  547.              INI file is the incorrect length, or (3) the revision date is
  548.              incorrect).
  549. ──────────────────────────────────────────────────────────────────────────────
  550. [reinitialize Date file]      {/D}
  551. /D           Make the PBSTRING.DTE reflect the existing dates of the C files
  552.              in the current directory.  This means that next time PBstring is
  553.              run, no processing will take place unless the C file(s) have
  554.              been modified.  Note that this file is reinitialized after every
  555.              processing session.
  556. ──────────────────────────────────────────────────────────────────────────────
  557. [DEBUG information]           {/DEBUG}
  558. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  559.              place of having to have a DEBUG.XXX file in existence in the
  560.              current working directory.
  561. ──────────────────────────────────────────────────────────────────────────────
  562. [process single File]         {/FLILO.C}
  563. /F{fn[.C]}   Process the file specified after the /F.  Note that no date
  564.              checking will take place.  If the file exists in the
  565.              PBS-FILE.EXC exclusion file, you will be warned that you have
  566.              marked it as an "illegal" file.  PBstring will ask for
  567.              confirmation that you want to process the file before
  568.              continuing.  The .C extension is optional.
  569. ──────────────────────────────────────────────────────────────────────────────
  570. [toggle Log on/off]           {/L}
  571. /L           Turn log file entries to PBSTRING.LOG on/off in accordance with
  572.              the settings in the INI file.
  573. ──────────────────────────────────────────────────────────────────────────────
  574. [toggle Case comparisons]     {/NC}
  575. /NC          Normally, each string is considered different if the case of the
  576.              letters are different.  So these two strings would not be the
  577.              same:
  578.  
  579.   Test
  580.   test
  581.              By including this switch, these are made "equal".  The
  582.              comparisons are taken into consideration when checking for
  583.              duplicate entries in the string (*.STR) file you have specified.
  584.              Toggled on/off in accordance with the INI settings.
  585. ──────────────────────────────────────────────────────────────────────────────
  586. [toggle Heart comparisons)    {/NH}
  587. /NH          Normally, each string is considered different if the heart (WWIV
  588.              color codes) of the letters are different.  So these two strings
  589.              would not be the same (assuming ^ as a heart, ASCII 3):
  590.  
  591.   ^2test
  592.   ^1test
  593.              By including this switch, these are made "equal".  The
  594.              comparisons are taken into consideration when checking for
  595.              duplicate entries in the string (*.STR) file you have specified.
  596.              Toggled on/off in accordance with the INI settings.
  597. ──────────────────────────────────────────────────────────────────────────────
  598. [use Output File]             {/OFMODS2.STR}
  599. /OF{fn}      Redirect output to a STR file other than the one specified in
  600.              the INI file.
  601. ──────────────────────────────────────────────────────────────────────────────
  602. [use Output Number]           {/ON3}
  603. /ON{#}       Use a different string file number other than the one specified
  604.              in the INI file.
  605. ──────────────────────────────────────────────────────────────────────────────
  606. [Quiet mode]                  {/Q}
  607. /Q           Turn off/on most screen updating while processing.  This makes
  608.              the program *MUCH* faster when off!  Pressing F while processing
  609.              toggle this on/off.
  610. ──────────────────────────────────────────────────────────────────────────────
  611. [Quiet mode - Sound]          {/QS}
  612. /QS          Toggle on/off most sounds (in accordance with INI)
  613. ──────────────────────────────────────────────────────────────────────────────
  614. [use String length]           {/S4}
  615. /S{#}        Use a different limiting length for string processing other than
  616.              what has been specified in the INI file.  Strings *shorter* than
  617.              {#} will not be processed.  \r, \t, etc., and %s, %d, etc. are
  618.              *NOT* taken into consideration when determining the string
  619.              length.  So this string would have 16 characters, not 26:
  620.  
  621.   printf("\r\nThis has %d chars.\r\n",i);
  622. ──────────────────────────────────────────────────────────────────────────────
  623. [String locator Editor]       {/SE}
  624. /SE          Enter the editor that allows you to edit the locations of up 14
  625.              string files.  The program does not execute after using this
  626.              switch.
  627. ──────────────────────────────────────────────────────────────────────────────
  628. [Work disk]                   {/WG:}
  629. /W{disk}     This causes PBstring to use the {disk} as the place to create
  630.              the new C files.  A perfect candidate for this is a RAM drive.
  631.              PBstring keeps track of the total space left on the work disk.
  632.              The total is displayed in green until it drops below 81k (the
  633.              size of LISTPLUS.C -- most likely the largest C file you'll
  634.              process) when it'll then display in flashing red.  If the total
  635.              drops below the size of the C file currently being processed,
  636.              the program stops processing.
  637. ──────────────────────────────────────────────────────────────────────────────
  638. [Yes/no option]               {/Y}
  639. /Y           This will make PBstring stop on all strings that have passed the
  640.              programs testing parameters and ask you if you want to remove it
  641.              to the string file.  You can press Y or ENTER for yes, N for No,
  642.              or A to make it accept all the rest of the strings.
  643. ──────────────────────────────────────────────────────────────────────────────
  644.  
  645. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  646.  
  647.                                { SECTION 2.1 }
  648.                        : ABOUT THOSE "STATUS LIGHTS" :
  649. In the middle of the screen in PBstring, on line 13 to be precise, are 10
  650. "status lights".  These are indicators of what the program is up to at
  651. virtually any given moment.  They are:
  652.  
  653. CO - Currently in, or processing, a comment line or block
  654. PP - Processing a preprocessor directive
  655. VD - Processing a char[][]= type variable declaration -or- a structure block
  656.      with predefined literal strings.
  657. CF - Checking a valid string against PBS-FUNC.EXC
  658. CS - Checking a valid string against PBS-STRG.EXC
  659. CC - Checking a valid string against PBS-CHAR.EXC
  660. NP - Current string has no text and/or does not qualify for processing
  661. SS - Searching STR file for a valid place to put removed text
  662. DC - Checking file against PBSTRING.DTE to determine if it needs processed
  663. EC - Checking file against PBS-FILE.EXC to determine if it needs processed
  664.  
  665. Additionally, a small blinking ∙ will appear next to the status light that is
  666. active.  The affected lights are CF, CS, CC, DC, and EC.  If the ∙ appears
  667. next to the light, then it means that the appropriate *.EXC is being used.
  668.  
  669. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  670.  
  671.                                { SECTION 2.2 }
  672.            : KEYS YOU CAN PLAY WITH DURING PROCESSING IN PBSTRING :
  673. There's is the F key, and then there's all the rest.  Pressing any key other
  674. than the F key will cause the program to *abort* after it is finished with
  675. the file it is working on.
  676.  
  677. Pressing F will toggle the status of the "Quiet mode".  Quiet mode, when on,
  678. does not allow for screen updating except to display the filename currently
  679. being processed and how many lines are in that file.  When off, it allows all
  680. information to be processed.  The program runs MUCH faster with screen up-
  681. dating off (Quiet mode ON).  For example:  When run a on a 40,235 byte file
  682. it runs in 14 seconds with screen updating taking place, and in 8 seconds in
  683. Quiet mode.  Over the course of a complete WWIV source code, these time
  684. savings can be very significant.
  685.  
  686. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  687.  
  688.                                { SECTION 2.3 }
  689.                            : LOG FILE INFORMATION :
  690. PBstring supports a very robust log file reporting system.  PBSTRING.LOG is
  691. the file where almost anything done by the program is reported.
  692.  
  693. Here is a sample log file:
  694.  
  695. [PBstring 10ß01 log opened: August 18, 1995 at 22:28.55]
  696. Thanks for registering PBstring 10ß00, Papa Bear! :)
  697. Could not find C:\BOARD\GFILES\TEST.STR.
  698. !!! Creating new STR file.
  699.      »»»"Illegal" file checking is in effect.«««
  700.      »»»Date checking is in effect.«««
  701.      »»»Partial string checking is in effect.«««
  702.      »»»Full string checking is in effect.«««
  703.      »»»Function checking is in effect.«««
  704. Processing MMENU.C      
  705.            - passed PBS-FILE.EXC checking.
  706.            ### MMENU.C has not been modified -- skipping file.
  707. Processing GFILES.C     
  708.            - passed PBS-FILE.EXC checking.
  709.            ### GFILES.C has not been modified -- skipping file.
  710. ...
  711. Processing LILO.C       
  712.            - passed PBS-FILE.EXC checking.
  713.            - passed PBSTRING.DTE checking.
  714.            - Backing up to LILO.ORG
  715.            - Checking strings.
  716.   +>  ADD (1   ): USA                                                           
  717.   +>  ADD (2   ): CAN                                                           
  718.   +>  ADD (3   ): MEX
  719. ...
  720.   +>  ADD (11  ): 1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n      
  721.   *> DUPE (11  ): 1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n      
  722.   +>  ADD (12  ): CID NUM : %s
  723. ...
  724. -*-  Total NEW strings removed: 42
  725. -*- Total DUPE strings removed: 3
  726. -*-      Total strings removed: 45
  727. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  728. *-*  Total NEW strings removed -- all files: 42
  729. *-* Total DUPE strings removed -- all files: 3
  730. *-*      Total strings removed -- all files: 45
  731. Re-Building PBSTRING.DTE.
  732. >>> Shutting down PBstring 10ß00 at 22:29.12
  733.                Reason: FINISHED PROCESSING
  734.                  Code: 0
  735. Total time to run: 0 min., 14 secs.
  736.  
  737. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  738.  
  739.                                { SECTION 2.4 }
  740.                            : DEBUG IN DA MACHINE :
  741. If DEBUG.XXX (a file with anything in it) exists in the current directory,
  742. additional information is printed into the log file.  The physical presence
  743. of this file will active MOST all of the PB*.* utilities.  Debug works in
  744. PBreplace and PBconfig as well as PBstring.
  745.  
  746. Starting with version 1.3 (ßeta 5) of PBstring, and 1.1 of both PBreplace and
  747. PBconfig, DEBUG.XXX is no longer necessary.  It'll still be used if it is
  748. there.  Now you can activate the DEBUG coding by using /DEBUG as a command
  749. line switch for the program you're running.
  750.  
  751. This additional information make the log file look something like this:
  752.  
  753. [PBstring 10ß03 log opened: August 25, 1995 at 22:04.59]
  754. DEBUG: Memory left @ start: 518k (FCL) 518k (CL)
  755. Thanks for registering PBstring 10ß03, Papa Bear! :)
  756. /F  -- Processing single file (LILO.C)
  757. DEBUG: Current CFG revision date      : 803
  758. DEBUG: Registration Code is           : 12589647
  759. DEBUG: Log file entries are           : ON
  760. DEBUG: Ignoring embedded color codes? : NO
  761. DEBUG: Ignoring upper/lower case?     : NO
  762. DEBUG: Minimum string length for proc.: 5
  763. DEBUG: STR file number                : 7
  764. DEBUG: STR file name                  : TEST.STR
  765. DEBUG: Inclusion file name            : SINGLE.PBS
  766. DEBUG: STR directory is               : C:\WWIV\GFILES\
  767. DEBUG: BBS directory is               : C:\WWIV\
  768. DEBUG: ERR: PBstring could not locate TEST.STR!
  769. DEBUG: Commandline: COPY C:\WWIV\GFILES\TEST.STR C:\PBSTRING\TEST.STR > NUL
  770. DEBUG: TEST.STR has a string length of: 255
  771.      »»»"Illegal" file checking is in effect.«««
  772.      »»»Date checking is in effect.«««
  773.      »»»Partial string checking is in effect.«««
  774.      »»»Full string checking is in effect.«««
  775.      »»»Function checking is in effect.«««
  776. Processing LILO.C       
  777.            - Backing up to LILO.ORG
  778. DEBUG: ERR: PBstring could not locate LILO.ORG!
  779.            - Checking strings.
  780. DEBUG: Comment checking start line: 2
  781. DEBUG: Comment checking end line: 14
  782.   +>  ADD (1   ): USA                                                           
  783.   +>  ADD (2   ): CAN                                                           
  784.   +>  ADD (3   ): MEX
  785. ...
  786. -*-  Total NEW strings removed: 0
  787. -*- Total DUPE strings removed: 18
  788. -*-      Total strings removed: 18
  789. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  790. *-*  Total NEW strings removed -- all files: 0
  791. *-* Total DUPE strings removed -- all files: 18
  792. *-*      Total strings removed -- all files: 18
  793. Re-Building PBSTRING.DTE.
  794. DEBUG: ...Adding ADDRESS.C     to PBSTRING.DTE
  795. DEBUG: ...Adding BBSOVL1.C     to PBSTRING.DTE
  796. DEBUG: ...Adding BBSUTL.C      to PBSTRING.DTE
  797. ...
  798. DEBUG: ...Adding XFERTMP.C     to PBSTRING.DTE
  799. DEBUG: ...Adding REG.C         to PBSTRING.DTE
  800. >>> Shutting down PBstring 10ß03 at 22:05.23
  801.                Reason: FINISHED PROCESSING
  802.                  Code: 0
  803. Total time to run: 0 min., 20 secs.
  804. Total number of source lines processed: 1416
  805. DEBUG: Memory left at end: 517k (FCL) - 517k (CL)
  806.  
  807. Most of the information that is there is for my benefit should you have any
  808. problems.  Of course, you can get a better overall picture (as well as a
  809. *significantly* larger LOG file) about what is going on "underneath" all the
  810. pretty lights.
  811.  
  812. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  813.  
  814.                                { SECTION 2.5 }
  815.                          : THE ERROR LEVELS (CODES) :
  816. Utilities written by me support exit error codes (great for batch processing).
  817. A listing of all follows for PBstring:
  818.  
  819. -1 - No error.
  820. 00 - No error.
  821. 01 - COMSPEC variable not set.  Try setting COMSPEC in your AUTOEXEC.BAT file.
  822. 02 - Unknown error opening PBSTRING.CFG (it does exist).
  823. 03 - Could not find CONFIG.DAT
  824. 04 - Unknown error opening CONFIG.DAT.
  825. 05 - Unknown error reading CONFIG.DAT.
  826. 06 - (unregistered copies) FAILED random keypress.
  827. 07 - Could not open PBSTRING.CFG for saving.
  828. 08 - Could not build inclusion file.
  829. 09 - Could not create date file.
  830. 10 - Could not create PBSTRING.REG.
  831. 11 - No filename specified with /F switch.
  832. 12 - User did not want to process "illegal" file.
  833. 13 - Could not process single file.
  834. 14 - Could not open source STR file for copying.
  835. 15 - Could not open dest. STR file for copying.
  836. 16 - Did not want to make new STR file.
  837. 17 - Could not create new string file.
  838. 18 - Could not open inclusion file for main processing.
  839. 19 - Could not open input C file for main processing.
  840. 20 - Could not open output C file for main processing.
  841. 21 - Could not set up STR file for processing.
  842. 22 - Could not open PBS-FILE.EXC for main processing.
  843. 23 - Could not open PBSTRING.DTE for main processing.
  844. 24 - Could not open PBS-CHAR.EXC for main processing.
  845. 25 - Could not open PBS-STRG.EXC for main processing.
  846. 26 - Could not open PBS-FUNC.EXC for main processing.
  847. 27 - File abnormally closed, no resolution, in pre-processor checking.
  848. 28 - File abnormally closed, no resolution, in comment checking.
  849. 29 - File abnormally closed, no resolution, in variable declaration checking.
  850. 30 - Did not want to convert 100 or 161 char. string file length to 255.
  851. 31 - Error copying string file from GFILES directory.
  852. 32 - File abnormally closed, no resolution, in multiline quote checking.
  853. 33 - Error backing up C file to ORG storage directory.
  854. 34 - Error moving STR file back to GFILES directory.
  855. 35 - Error moving *.C files back from specified work disk.
  856. 36 - Error in displaying screen
  857. 37 - Could locate PBCONFIG.EXE and/or PBREPL.EXE in current directory
  858. 38 - Too little room on work disk to start. (file > bytes free on work disk)
  859. 39 - Couldn't create ORG storage directory (PBSORG00-PBSORG99 all exist).
  860. 40 - Couldn't create ORG storage directory (creation error).
  861. 41 - Error backing up STR file into ORG storage directory.
  862. 42 - Unable to open INI immediately after creation.
  863. 43 - Couldn't copy STR file into working directory.
  864. 44 - Error opening STR for reading/writing.
  865. 45 - Couldn't set up 100>255 temp. conversion file.
  866. 46 - (Conversion) Error in setting up file to be converted
  867.  
  868. Error exit codes generated by PBconfig are all in the 100-199 range, with the
  869. exceptions of -1 and 0:
  870.  
  871.  -1 - No error.
  872.   0 - No error.
  873. 100 - COMSPEC environment variable not set.
  874. 101 - Unable to open PBSTRING.INI for reading.
  875. 102 - Unable to write to (save) PBSTRING.INI.
  876. 103 - Unknown error opening PBSTRING.REG for writing.
  877.  
  878. Error exit codes generated by PBreplace are all in the 200-299 range, with
  879. the exceptions of -1 and 0:
  880.  
  881.  -1 - No error.
  882.   0 - No error.
  883. 200 - PBSTRING.EXE and/or PBCONFIG.EXE do not exist in current directory.
  884. 201 - COMSPEC variable not set.
  885. 202 - Error building default INC file.
  886. 203 - Failure building temporary inclusion file (all files - switch).
  887. 204 - No filename specified with /F switch.
  888. 205 - Didn't want to process "illegal" file.
  889. 206 - Failure building temporary inclusion file (single file - switch).
  890. 207 - Failure building temporary inclusion file (all files - internal).
  891. 208 - Failure building temporary inclusion file (single file - internal).
  892. 209 - Processing aborted.
  893. 210 - Could not open inclusion file for processing.
  894. 211 - Couldn't create RPL storage directory (creation error).
  895. 212 - Could not back up C to RPL
  896. 213 - Unresolved comment - reached EOF.
  897. 214 - C files left on specified work disk.  Error moving them back.
  898. 215 - Error displaying screen.
  899. 216 - Failed unregistered keypress.
  900. 217 - Couldn't find CONFIG.DAT.
  901. 218 - Error opening CONFIG.DAT for reading.
  902. 219 - Error reading CONFIG.DAT.
  903. 220 - Too little room on work disk to start. (file > bytes free on disk)
  904. 221 - Couldn't create RPL storage directory (PBSRPL00-PBSRPL99 all exist).
  905. 222 - Error checking file for its size.
  906.  
  907. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  908.  
  909.                                { SECTION 3.0 }
  910.  : A NOTE ABOUT COMMENTS, VARIABLE DECLARATIONS, & PREPROCESSOR DIRECTIVES :
  911.                  : AND MULTILINE PRINTF() TYPE LINES, TOO! :
  912. PBstring handles virtually all of these things quite well, including
  913. multiline versions of all.
  914.  
  915. However, there are a few caveats, as described in the following 3.x sections.
  916.  
  917. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  918.  
  919.                                { SECTION 3.1 }
  920.                                  : COMMENTS :
  921. Both types of comment types (those used in C -- /* */ and C++ -- //) are
  922. properly detected.
  923. Those lines that fall within a multiline comment block are *NOT* processed.
  924. For example:
  925.  
  926.     printf("TEST -- this would be processed!");
  927. /*
  928.     printf("This would not");
  929.     printf("me neither");
  930. */
  931.     printf("This would be.");
  932.  
  933. //    printf("Not processed!");
  934.  
  935.     printf("This will be processed.");                         // after code
  936.  
  937.  
  938. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  939.  
  940.                                { SECTION 3.2 }
  941.                           : VARIABLE DECLARATIONS :
  942. The following conditions MUST be true for PBstring to recognize pre-defined
  943. char variable declarations of either single, or multiline varieties:
  944.  
  945.   (1) If [] and ] = (or ]=) appear on the same line
  946.   (2) If the char variable declaration (with a trailing space) appears on
  947.         the same line with two left brackets ([) *and* two right brackets
  948.         (]) *and* a =, but with no ==
  949.   (3) If the char declaration appears with a [] and a = on the same line,
  950.         with no ==
  951.  
  952. PBstring will recognize the END of a multiline char variable declaration when
  953. it detects a }; on a line.
  954.  
  955. Examples of good and bad variable declarations:
  956.  
  957. ***********************************    OK:   *********************************
  958.            [ These are properly handled, therefore not processed. ]
  959.  
  960. char [9][10]={"as;ldk",";asdk;l",            // char , two [ and two ] and =
  961.               "1as;lkd","POIPOIP",
  962.               "2as;lkd","POIPOIP",
  963.               "3as;lkd","POIPOIP"};          // and the };
  964.  
  965.  
  966. char [9][10] = {"as;ldk",                    // ] = is just as okay as ]=
  967.               ";asdk;l",
  968.               "1as;lkd","POIPOIP",
  969.               "2as;lkd","POIPOIP",
  970.               "3as;lkd","POIPOIP"};
  971.  
  972. char [9][10] = {                             // char , two [ and two ] and =
  973.               "as;ldk",";asdk;l",
  974.               "1as;lkd","POIPOIP",
  975.               "2as;lkd","POIPOIP",
  976.               "3as;lkd","POIPOIP"};
  977.  
  978. char [][10] =                                // [] and ] = make this ok
  979. {
  980.               "as;ldk",";asdk;l",
  981.               "1as;lkd","POIPOIP",
  982.               "2as;lkd","POIPOIP",
  983.               "3as;lkd","POIPOIP"};
  984.  
  985. char [9][10] = {
  986.               "as;ldk",";asdk;l",
  987.               "1as;lkd","POIPOIP",
  988.               "2as;lkd","POIPOIP",
  989.               "3as;lkd","POIPOIP"
  990.                };                            //  }; here still ends it okay
  991.  
  992.  
  993. char *exts[] = {"", ".COM", ".EXE", ".BAT", 0};
  994.      // notice that this has all the elements to start, which in this case,
  995.      // are [] and ] =  The ending characters are also here };
  996.  
  997.  
  998. arc_testers arc_t[] = {             // this, too, isn't processed -- it
  999.   {"ZIP", check_for_files_zip},     // it includes the necessary [] and
  1000.   {"ARC", check_for_files_arc},     // and ] = to start the exclusion, and
  1001.   {"LZH", check_for_files_lzh},     // the }; to finish it
  1002.   {"ARJ", check_for_files_arj},
  1003.   {NULL, NULL},
  1004. };
  1005.  
  1006. ********************************    NOT OK:    *******************************
  1007.                 [ These are NOT properly handled by PBstring ]
  1008.             [ These can also cause unresolved Var. Decl. errors! ]
  1009.  
  1010. char [9][10]                               // no = on this line
  1011.               ={"as;ldk",";asdk;l",
  1012.               "1as;lkd","POIPOIP",
  1013.               "2as;lkd","POIPOIP",
  1014.               "3as;lkd","POIPOIP"};
  1015.  
  1016. char [9][10]  ={"as;ldk",";asdk;l",        // ]  = (TWO spaces) doesn't work
  1017.                 "1as;lkd","POIPOIP",
  1018.                 "2as;lkd","POIPOIP",
  1019.                 "3as;lkd","POIPOIP" };
  1020.  
  1021. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1022.  
  1023.                                { SECTION 3.3 }
  1024.                          : PREPROCESSOR DIRECTIVES :
  1025. All of (Borland and Turbo) C's preprocessor directives are properly handled.
  1026. The ones that support anything that may have double quotes are #define and
  1027. #include.
  1028.  
  1029. PBstring is smart enough to know the difference between a "true" preprocessor
  1030. directive, and one that just happens to be in a line of text.  In other
  1031. words, this would NOT be processed:
  1032.  
  1033. #include "test.h"
  1034.  
  1035. This WOULD be processed:
  1036.  
  1037. printf("Test - #include is a pre-proc. command");
  1038.  
  1039. Multiline directives are also handled correctly.
  1040.  
  1041. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1042.  
  1043.                                { SECTION 3.4 }
  1044.                       : MULTILINE PRINTF() TYPE LINES :
  1045. PBstring properly handles multiline printf() type statements (as of version
  1046. 1.1).  There are some things you should be aware of, however, so you can be
  1047. certain that the maximum number of strings are removed:
  1048.  
  1049.   If a comma (,), a semi-colon (;), open brace ({), or closed parenthesis ())
  1050.   is detected AFTER a pair of double quotes ("), the line WILL be processed.
  1051.  
  1052.   NOTE: This is only true for complete pairs of double quotes.
  1053.  
  1054.   NOTE: For WWIV users, npr(), pl(), etc. are treated like printf()
  1055.  
  1056. ***********************************    OK:   *********************************
  1057.                 [ These lines WILL be processed by PBstring ]
  1058.  
  1059.   sprintf(test,"This is a %s",       // notice the , before the 1st " and
  1060.          variable);                  // after the second (of the pair) "
  1061.  
  1062.   if (strcat(test,"TEST STRING"))    // again the , before the 1st "
  1063.  
  1064.   printf("This is a test string.");  // this has the ; after the paired "
  1065.  
  1066.   print("This is another %s",        // this has the , after the paired "
  1067.          test_variable);
  1068.  
  1069. ********************************    NOT OK:    *******************************
  1070.               [ These lines WILL NOT be processed by PBstring ]
  1071.  
  1072.   printf("This is line one"          // these lines are skipped over by
  1073.          "and line two"              // by PBstring -- they constitute a
  1074.          "and line three");          // multiline printf()
  1075.  
  1076.   printf("This is a test of %s"      //  This will not be processed--no , or
  1077.           ,not_working);             // ; or { after the paired " on line 1
  1078.                                      // PBstring skipping code will stop on
  1079.                                      // line 2 due to the ;
  1080.  
  1081.   sprintf(test,"TEST"                // no , after the paired " on line 1
  1082.                "TEST1");
  1083.  
  1084. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1085.  
  1086.                                { SECTION 4.0 }
  1087.                   : OF INC'S AND EXC'S -- AND A DTE, TOO! :
  1088. PBstring and PBreplace use inclusion and exclusion files to determine whether
  1089. or not a particular file or string is a valid candidate for processing.  If a
  1090. filename appears in the inclusion file as well as in the PBS-FILE.EXC
  1091. exclusion file, the exclusion file ALWAYS has precedence.
  1092.  
  1093. In the various *.EXC files, I have included information that I've found
  1094. *needs* to be in these files in order to get a working BBS.EXE file.
  1095.  
  1096. PBSTRING.INC, PBS-FILE.EXC, PBS-FUNC.EXC, PBS-CHAR.EXC, and PBS-STRG.EXC all
  1097. support the √ character.  What does this mean?  It means that if the first
  1098. character of any line in any of the files is a √, then that line is ignored,
  1099. it is not processed.  To make a √, press and hold your ALT key, and type the
  1100. number 251 on your *NUMBER PAD*.  It will make a √ -- if you use the top line
  1101. numbers, it will not.
  1102.  
  1103. So if you had this in PBSTRING.INC:
  1104.  
  1105. ADDRESS.C
  1106. √BATCH.C
  1107. BBS.C
  1108.  
  1109. Then ADDRESS.C and BBS.C would be processed, and BATCH.C would not.
  1110.  
  1111. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1112.  
  1113.                                { SECTION 4.1 }
  1114.                               : INCLUSION FILE :
  1115. PBstring determines which C files to process by reading from a listing of C
  1116. files that is the inclusion file.  By default, the inclusion file name to be
  1117. read is PBSTRING.INC, but this can be changed by using the /A{fn} switch.
  1118.  
  1119. [Of course, if the /A! or the /F{fn} switches are used, the inclusion file is
  1120. ignored.]
  1121.  
  1122. This file can be created by using the /B (/B{fn} if you want to build
  1123. something other than PBSTRING.INC).  This uses PBS-FILE.EXC (if it exists --
  1124. see section 4.2.1) to "filter out" unwanted file names.  File names that do
  1125. NOT appear in the PBS-FILE.EXC file will be added to the inclusion file.
  1126.  
  1127. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1128.  
  1129.                                { SECTION 4.2 }
  1130.                        : GENERAL EXCLUSION FILE NOTES :
  1131. Exclusion files are those files that cause things NOT to happen.  If a
  1132. filename appears in PBS-FILE.EXC, then it will not be processed.  If a string
  1133. appears in PBS-STRG.EXC (and a partial for PBS-CHAR.EXC) or a function name
  1134. appears in PBS-FUNC.EXC, then the current line under consideration from the C
  1135. file being processed will be skipped.
  1136.  
  1137. All of these files are files that you can, and should, actively edit.  They
  1138. can be changed using a standard text editor.
  1139.  
  1140. One more exclusion file, PBSTRING.DTE, should not be edited.  More on that in
  1141. section 4.2.0.
  1142.  
  1143. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1144.  
  1145.                               { SECTION 4.2.0 }
  1146.                                : PBSTRING.DTE :
  1147. PBSTRING.DTE is the file that tracks WHEN your C source files have been
  1148. modified.  It is automatically re-created after each time you successfully
  1149. run PBstring with no errors.  If there have been changes to the STR file
  1150. you've defined, and the program exits with no errors.
  1151.  
  1152. This way, you can always run PBstring in "all" (default) mode, and only those
  1153. files that you've updated since last running PBstring will be considered for
  1154. processing.  This saves considerable amount of time since it keeps PBstring
  1155. from looking at all files every time!
  1156.  
  1157. Although it is a standard ASCII text file, it should not be edited.  The
  1158. length and positioning of the fields in the file is critical for its proper
  1159. operation.  Any changes to this file will most likely cause it to process all
  1160. files (and create a new PBSTRING.DTE file), thereby wasting your time.
  1161.  
  1162. If you want to re-initialize this file, to keep it from processing ANY
  1163. changes that you may have made to your source code, simply use the /D command
  1164. line switch.
  1165.  
  1166. If you want to process all your source files listed in the INC file, then use
  1167. the /AA switch on the command line.
  1168.  
  1169. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1170.  
  1171.                               { SECTION 4.2.1 }
  1172.                                : PBS-FILE.EXC :
  1173. PBS-FILE.EXC is the file where you list the filenames of the files you do
  1174. *NOT* want processed.  This file takes precedence over the inclusion file.
  1175. This means that if a filename appears in this file, and in the inclusion
  1176. file, then it will not be processed.  This is to ensure safety of your
  1177. source.
  1178.  
  1179. To start, the file you get in the PBstring archive has 19 filenames.  These
  1180. are the files from virgin (unmodified) WWIV source that are either (1) not
  1181. compiled with the WWIV source to make BBS.EXE, or (2) had no
  1182. get_stringx(x,y); statements in them.  They are (in case you need to remake
  1183. the file):
  1184.  
  1185. BBS.C, BBSUTL.C, COM.C, CONVERT.C, EXTRN.C, FIX.C, MINIESM.C, MODEM.C,
  1186. RETURN.C, RIPOVL.C, RIPSPEED.C, SHARE.C, SKELETON.C, STRINGS.C, STRIP.C
  1187. SUBACC.C, SUBXTR.C, VERSION.C, XINIT.C
  1188.  
  1189. You made add/delete as you see fit.  Keep in mind that removing certain files
  1190. from this list (say, MODEM.C) may cause WWIV to work incorrectly.
  1191.  
  1192. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1193.  
  1194.                               { SECTION 4.2.2 }
  1195.                                : PBS-FUNC.EXC :
  1196. This file lists those function that normally SHOULDN'T have get_stringx(x,y);
  1197. statements in them.  Most notably existprint(), printfile(), and onek() come
  1198. to mind (for WWIV source code).  The comparisons *are* case sensitive.
  1199. NoAbort() is not treated the same as noabort()
  1200.  
  1201. To use this file, just place, one per line (case does not matter here) the
  1202. name of the function without the parenthesis.  In the source code, the
  1203. function call should look like on of the following:
  1204.  
  1205.   onek("ABCDE");
  1206.   onek ("ABCDE");
  1207.  
  1208.   The opening parenthesis should immediately follow, or be one space, after
  1209. the function call.  If it is not, it will most likely be processed as normal.
  1210.  
  1211. Default function "names" that come with this program are:
  1212.  
  1213. printfile, existprint, noabort, onek, print_local_file, getenv, setmenu
  1214. execlp, get_string, get_stringx, _chmod, comstr, random_screen,
  1215. set_strings_fn, sizeof, rip_show, todownload, current_menu, exist, strtok
  1216. sscanf
  1217.  
  1218. Some other functions, namely from Asylum's ACHAT, are now included, and they
  1219. are:
  1220.  
  1221. ini_read_boolean, ini_read_number, ini_read_string, auto_mail
  1222.  
  1223. For FMD's WFC mod, I've added:
  1224.  
  1225. ini_get
  1226.  
  1227. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1228.  
  1229.                               { SECTION 4.2.3 }
  1230.                                : PBS-CHAR.EXC :
  1231. This file is for PARTIAL string comparisons.  It *is* case sensitive as well.
  1232.  
  1233. Here you list, one per line, the partial string that, if they exist in the
  1234. line under current consideration by the program, will cause them to be
  1235. skipped over.
  1236.  
  1237. In STR_MOD, it was customary to include partial popular onek() command
  1238. strings such as, QABC.  (This was because the function exclusion file doesn't
  1239. work.)  In this case the following lines would *NOT* be processed:
  1240.  
  1241.   onek("QABCDEF");
  1242.   printf("This is a QABCDKLKJLK example."
  1243.  
  1244.   These lines *WOULD* be processed:
  1245.  
  1246.   printf("This is a qABCDKLKJLK example."  // lower case q makes it different
  1247.   onek("QAB");                             // doesn't match QABC
  1248.  
  1249. Now, since the PBS-FUNC.EXC file does work, partial onek() command strings
  1250. need not be specified (as long as you have onek listed in the PBS-FUNC.EXC
  1251. file, that is).
  1252.  
  1253. Note that this needs to be used with some care.  Although this is a cautious
  1254. program (and you may be keeping lines FROM being processed), over use of this
  1255. file can cause unnecessary amounts of text to remain in the program.  This
  1256. would not be a good thing for your DGROUP.
  1257.  
  1258. NOTE NOTE NOTE:  Certain partial strings are defaulted to in the program, and
  1259. should not be entered in this file.  These partial strings are:
  1260.  
  1261. \"
  1262. \x
  1263. \n!
  1264. |
  1265. char * (with a = also on the same line)
  1266. !|
  1267. %"
  1268. 1|
  1269. ""
  1270. \\
  1271. \033
  1272. _on_[]
  1273. _off_[]
  1274. [ASCII 27 - ESCAPE (sometimes seen as a small left pointing arrow.)]
  1275.  
  1276. The list of PBS-CHAR.EXC entries in archive file are (this is kind of long, and
  1277. keep in mind that they're separated by commas and that punctuation [besides
  1278. the commas] and imbedded blanks in the second one are intentional):
  1279.  
  1280. !-@,         ., .$$, .$$$, .ADD, .ANS, .B&W, .BAK, .BAT, .bat, .BBS, .brd
  1281. .CDR, .CFG, .CHT, .CNF, .COM, .com, .DAT, .DIR, .dsc, .DSC, .ed, .EXE, .exe
  1282. .EXT, .FRM, .GFL, .H, .ind, .IND, .inf, .INI, .ION, .LCL, .LOG, .LST, .MML
  1283. .mn, .MN, .MNU, .MOD, .MSG, .NDX, .NET, .NMM, .NUF, .PUB, .PW, .QWK, .QSC
  1284. .REG, .REP, .rip, .RIP, .RLZ, .RPT, .sav, .SDF, .SDI, .SUB, .sub, .STR, .SYS
  1285. .tag, .txt, .TXT, .UPD, .USR, .WWV, .XXX, .ZIP, .ZZZ, %sADDRESS, %sMSG
  1286. AUTOMSG., BBSLIST., EDITOR., GAMB-WL, NETWORK, NMMAIL%, PACKTMP$, POSTS.
  1287. RESTORE., STAT., SUBS., TEMP., TEMPCHAT., TMSG, WELCOME., get_string
  1288. get_stringx
  1289.  
  1290. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1291.  
  1292.                               { SECTION 4.2.4 }
  1293.                                : PBS-STRG.EXC :
  1294. This program is like the previous, except in that it looks for COMPLETE string
  1295. comparisons.  It, too, is case sensitive.
  1296.  
  1297. Therefore, if a line in this file reads:  This is a PARTY!
  1298. then this line would *NOT* be processed:
  1299.  
  1300.   printf("This is a PARTY!");
  1301.  
  1302. and this one WOULD be processed:
  1303.  
  1304.   printf("This is a party!");      // lower case party
  1305.  
  1306. If you find that you're adding a lot of lines like this to the file:
  1307.  
  1308. This is a PARTY!
  1309. Lets have a PARTY!
  1310. PARTY on, DUDE!
  1311.  
  1312. the you may wish to use the PBS-CHAR.EXC file instead.  You can put PARTY in
  1313. that file, and cover all three of these lines (and possibly more) with the
  1314. one line in the other exclusion file.
  1315.  
  1316. This technique makes PBstring run considerably faster.  In the last example,
  1317. for instance, PBstring would only have to search one line in PBS-CHAR.EXC
  1318. versus 3 lines (or more) in PBS-STRG.EXC.
  1319.  
  1320. Default strings are (^ represents a heart symbol):
  1321.  
  1322. *.*
  1323. %sFILE_ID.DIZ
  1324. EMAIL
  1325. < %s %s %s - %u %s >
  1326. ``%s``
  1327. %s%s@%u.%s\r\n
  1328. %s#%u@%u.%s\r\n
  1329. ^1T ^0- ^1%s\r\n
  1330. ^7[^1%s%s^7] [^1%s^7]^0 : ^2
  1331. T - %s\r\n
  1332. [%s%s] [%s] :
  1333. ^7(^1Conf %c^7)^0-^7(^1%s^7)
  1334. ^7(^1%s%s^7)^0-^7(^1%s^7)^0 : ^2
  1335. (%s%s)-(%s) :
  1336. %s #%u @%u
  1337. %s %u @%u (%s)
  1338.  
  1339. Additionally, I've added this for my ADDRESS.C modification:
  1340.  
  1341. Users Handle or Name           Network Address    [%s]
  1342.  
  1343. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1344.  
  1345.                               { SECTION 4.2.5 }
  1346.                  : HOW TO EMULATE STR_MOD WITH THIS PROGRAM :
  1347. This is simple. To do an emulation of STR_MOD, simply place these two lines
  1348. in PBS-CHAR.EXC:
  1349.  
  1350. %
  1351. \
  1352.  
  1353. That's it.  This will make PBstring act as STR_MOD without the bugs, and
  1354. limitations of the older program, and with all the speed of the newer.
  1355.  
  1356. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1357.  
  1358.                                { SECTION 5.0 }
  1359.            : MODIFYING WWIV SOURCE CODE TO ADD MORE STRING FILES :
  1360. All you need to do to activate a new STR file is to add one line to BBSUTL.C
  1361. Search on the following information (line 784 of virgin source):
  1362.  
  1363.   set_strings_fn(2, languagedir, "YES.STR", 0);
  1364.   set_strings_fn(3, languagedir, "NO.STR", 0);
  1365.  
  1366.   strncpy(str_yes,get_string(1), sizeof(str_yes)-1);
  1367.   strncpy(str_no,get_string(2), sizeof(str_no)-1);
  1368.  
  1369. Now, to add MODS.STR, with a string file number of 4, and a line like:
  1370.  
  1371.   set_strings_fn(2, languagedir, "YES.STR", 0);
  1372.   set_strings_fn(3, languagedir, "NO.STR", 0);
  1373.   set_strings_fn(4, languagedir, "MODS.STR",0);    // added this line <<<<<<<
  1374.  
  1375.   strncpy(str_yes,get_string(1), sizeof(str_yes)-1);
  1376.   strncpy(str_no,get_string(2), sizeof(str_no)-1);
  1377.  
  1378. You can, if you wish, change languagedir to point to ANY valid directory.  So
  1379. to use C:\FOO\BAR, you'd make the line look like:
  1380.  
  1381.   set_strings_fn(4, "C:\\FOO\\BAR", "MODS.STR",0);
  1382.  
  1383.  
  1384. You can use string file numbers up to 7 by default.  (PBstring supports up to
  1385. 19.)  To add more, find this line in STRINGS.C and increase it:
  1386.  
  1387.   #define MAX_STRFILES 8
  1388.  
  1389. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1390.  
  1391.                                { SECTION 6.0 }
  1392.                      : ALL ABOUT PBREPLACE (PBREPL.EXE) :
  1393. PBreplace basically allows you to replace the get_string() / get_stringx()
  1394. statements with the appropriate literal text strings from the string file
  1395. (STR) that the get_string[x]() statement points to.  There are, however, many
  1396. different ways that this can be used.
  1397.  
  1398. PBreplace will take strings out of BBS.STR, SYSOPLOG.STR, NO.STR, and YES.STR
  1399. (if you're using WWIV) as well as any others that you may have specified for
  1400. use in your program.  Option (C) from the selection screen, or the * command
  1401. while in the PBconfig program lets you specify string file filenames.
  1402.  
  1403. The original C files are backed up before processing takes place on them.
  1404. They retain the same filename with a new RPL extension (just like the ORG
  1405. extension that the extraction processing uses).  So a processed C file called
  1406. LILO.C will have an original counterpart call LILO.RPL.  You can easily
  1407. restore all C files by issuing a:
  1408.  
  1409. COPY *.RPL *.C
  1410.  
  1411. at the DOS prompt.
  1412.  
  1413. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1414.  
  1415.                                { SECTION 6.1 }
  1416.                      : PBREPLACE COMMAND LINE SWITCHES :
  1417. ──────────────────────────────────────────────────────────────────────────────
  1418. [what to call this switch]    {example}
  1419. /s{filename}  description
  1420.               description
  1421. example, if any
  1422. ──────────────────────────────────────────────────────────────────────────────
  1423. [? Help]                      {/?}
  1424. /?            Bring up the online help.
  1425. ──────────────────────────────────────────────────────────────────────────────
  1426. [+ append to log file]        {/+}
  1427. /+            Makes PBstring append to PBSTRING.LOG instead of overwriting it.
  1428. ──────────────────────────────────────────────────────────────────────────────
  1429. [All files!]                  {/A!}
  1430. /A!           Process ALL the C files in the current directory.
  1431. ──────────────────────────────────────────────────────────────────────────────
  1432. [Configuration editor]        {/C}
  1433. /C            Run the PBconfig editor.
  1434. ──────────────────────────────────────────────────────────────────────────────
  1435. [DEBUG information]           {/DEBUG}
  1436. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  1437.              place of having to have a DEBUG.XXX file in existence in the
  1438.              current working directory.
  1439. ──────────────────────────────────────────────────────────────────────────────
  1440. [do this File]                {/FBBS.C}
  1441. /F{fn}        Process only the file specified in {fn}.  Will check against
  1442.               PBS-FILE.EXC to make certain if its okay to work on.
  1443. ──────────────────────────────────────────────────────────────────────────────
  1444. [toggle Log file writes]      {/L}
  1445. /L            Turn PBSTRING.LOG entries on/off in accordance with the
  1446.               PBSTRING.INI settings.
  1447. ──────────────────────────────────────────────────────────────────────────────
  1448. [Mode 0 processing]           {/M0}
  1449. /M0           Replace all get_string / get_string(x) lines the program can
  1450.               find.
  1451. ──────────────────────────────────────────────────────────────────────────────
  1452. [Mode 1 processing]           {/M1NETWORK}
  1453. /M1{string}   Replace those strings where the {string} is found in the STR
  1454.               file for the string number specified.  Using this switch will
  1455.               not allow for multi-word strings.  Use Option B from the
  1456.               internal selection screen to achieve that.
  1457. ──────────────────────────────────────────────────────────────────────────────
  1458. [Mode 2 processing]           {/M2%}
  1459. /M2{char}     Similar to /M2{string} except that this looks for a single,
  1460.               specific character.
  1461. ──────────────────────────────────────────────────────────────────────────────
  1462. [Mode 3 processing]           {/M30}
  1463. /M3{#}        This will allow strings to be replaced only if the string file
  1464.               number being specified in the get_string() or get_stringx() is
  1465.               the same as {#}.
  1466. ──────────────────────────────────────────────────────────────────────────────
  1467. [Print reg. form]             {/P}
  1468. /P            Cause PBSTRING.REG to be created.  PBCONFIG.EXE is required for
  1469.               this.
  1470. ──────────────────────────────────────────────────────────────────────────────
  1471. [Quiet mode]                  {/Q}
  1472. /Q           Turn off/on most screen updating while processing.  This makes
  1473.              the program *MUCH* faster when off!  Pressing F while processing
  1474.              toggle this on/off.
  1475. ──────────────────────────────────────────────────────────────────────────────
  1476. [Quiet mode - Sound]          {/QS}
  1477. /QS          Toggle on/off most sounds (in accordance with INI)
  1478. ──────────────────────────────────────────────────────────────────────────────
  1479. [Work disk]                   {/WG:}
  1480. /W{disk}     This causes PBreplace to use the {disk} as the place to create
  1481.              the new C files.  A perfect candidate for this is a RAM drive.
  1482.              PBreplace keeps track of the total space left on the work disk.
  1483.              The total is displayed in green until it drops below 81k (the
  1484.              size of LISTPLUS.C -- most likely the largest C file you'll
  1485.              process) when it'll then display in flashing red.  If the total
  1486.              drops below 25k (the average size of a C file), the program
  1487.              stops processing.
  1488. ──────────────────────────────────────────────────────────────────────────────
  1489. [Yes/no option]               {/Y}
  1490. /Y           This will make PBstring stop on all strings that have passed the
  1491.              programs testing parameters and ask you if you want to remove it
  1492.              to the string file.  You can press Y or ENTER for yes, N for No,
  1493.              or A to make it accept all the rest of the strings.
  1494. ──────────────────────────────────────────────────────────────────────────────
  1495.  
  1496. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1497.  
  1498.                                { SECTION 6.2 }
  1499.                       : THE INTERNAL SELECTION SCREEN :
  1500. After execution PBREPL.EXE, you'll be show a screen that will allow you to
  1501. (re)select the operating options of PBreplace.  It looks like:
  1502.  
  1503. ╓────────────────────────────────────────────────────────────────────────────╖
  1504. ║                                                                            ║
  1505. ╟────────────────────────────────────────────────────────────────────────────╢
  1506. ║ [A] Operational Mode          :                                            ║
  1507. ║ [B] Secondary operational mode:                                            ║
  1508. ║ [C] Configure STR locations                                                ║
  1509. ║ [Q] Begin processing, also: ENTER                                          ║
  1510. ║ [*] Abort processing, also: ESC                                            ║
  1511. ╟────────────────────────────────────────────────────────────────────────────╢
  1512. ║                                                                            ║
  1513. ║                                                                            ║
  1514. ╙────────────────────────────────────────────────────────────────────────────╜
  1515.  
  1516. While options Q (ENTER) and * (ESC) are obvious, explanations are needed for
  1517. the others.
  1518.  
  1519. OPTION A: Operational Mode - This lets you select from three choices that
  1520.           control which FILES will be processed:
  1521.   [A] all C files that exist in the current directory (/A!)
  1522.   [F] a single file (/F{fn})
  1523.   [I] all C files that are listed in the inclusion (INC) file
  1524.  
  1525. OPTION B: Secondary Operational Mode - Here you have control over which
  1526.           STRINGS will be replaced:
  1527.   [A] every get_string() and get_stringx() the program finds (/M0)
  1528.   [C] all strings in the string file that have the specified character in it
  1529.         (/M1{string})
  1530.   [N] all strings in the specified string file number (/M2{char})
  1531.   [S] all strings in the string file with the specified {partial} string in
  1532.         it (/M3{#})
  1533.  
  1534.   *NOTE*: The [C] and [S] options are case sensitive!
  1535.  
  1536. OPTION C: This is the editor (also available via PBSTRING /SE, PBCONFIG /S,
  1537.           or the * command while in the main configuration editor) that
  1538.           allows you to tell PBstring WHAT the names of all your string files
  1539.           that you're using in your source code.  When adding the filenames,
  1540.           *DO NOT* add any path information.  The .STR extension is optional.
  1541.           See SECTION 7.2 for a complete description of the string file file-
  1542.           name editor.
  1543.  
  1544. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1545.  
  1546.                                { SECTION 6.3 }
  1547.                         : MISCELLANY ABOUT PBREPLACE :
  1548. While PBreplace is executing, you can press the F key to turn off screen
  1549. updating at any time (thereby speeding up the program), or any other key to
  1550. abort the processing (it will only stop between files).
  1551.  
  1552. You'll be notified of what C file is being processed, what STR file (and
  1553. string number) is being used, how many strings have been replaced in that
  1554. file (as well as totals) and how many "orphaned" strings are found.
  1555.  
  1556. Orphaned strings are those strings that point to (1) string files that do not
  1557. physically exist as have been specified in the editor, or (2) those
  1558. get_string[x]() statements where the string number is greater than the total
  1559. number of strings in the string file it points to.
  1560.  
  1561. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1562.  
  1563.                                { SECTION 7.0 }
  1564.            : EVERYTHING YOU WANTED TO KNOW ABOUT PBCONFIG.EXE... :
  1565. PBconfig is the new (as of PBstring version 1.2) stand-alone configuration
  1566. editor.  I did this to save memory, and to actually make things easier.
  1567. PBconfig makes and/or edits the PBSTRING.INI file.
  1568.  
  1569. The use of this program is quite simple.  Just answer the questions it asks
  1570. when you select an item.  If you choose option *, you'll enter the string
  1571. locator editor.  This editor is covered at the end of Section 6.0.
  1572.  
  1573. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1574.  
  1575.                                { SECTION 7.1 }
  1576.                       : PBCONFIG COMMAND LINE SWITCHES :
  1577. PBconfig has few command line switch, which are:
  1578. ──────────────────────────────────────────────────────────────────────────────
  1579. [what to call this switch]    {example}
  1580. /s{filename}  description
  1581.               description
  1582. example, if any
  1583. ──────────────────────────────────────────────────────────────────────────────
  1584. [? Help]                      {/?}
  1585. /?            Bring up the online help.
  1586. ──────────────────────────────────────────────────────────────────────────────
  1587. [DEBUG information]           {/DEBUG}
  1588. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  1589.              place of having to have a DEBUG.XXX file in existence in the
  1590.              current working directory.
  1591. ──────────────────────────────────────────────────────────────────────────────
  1592. [toggle Log entries]          {/L}
  1593. /L            Toggle writing to the PBSTRING.LOG file.  This does take into
  1594.               consideration the PBSTRING.INI settings.
  1595. ──────────────────────────────────────────────────────────────────────────────
  1596. [Must save]                   {/M}
  1597. /M            Force PBconfig into saving configuration information, even if
  1598.               the (2 - Abort) option is selected.
  1599. ──────────────────────────────────────────────────────────────────────────────
  1600. [Print reg. form]            {/P}
  1601. /P            Cause PBconfig to re-create a new PBSTRING.REG file.
  1602. ──────────────────────────────────────────────────────────────────────────────
  1603. [specify String files]       {/S}
  1604. /S            Enter directly into the string file filename editor.
  1605.               (Q)uitting after using this switch exits the program.
  1606.  
  1607. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1608.  
  1609.                                { SECTION 7.2 }
  1610.                        : STRING FILE FILENAME EDITOR :
  1611. While the information on this editor is fairly straightforward, there are
  1612. some things that may need to be clarified.  This is the screen-shot of the
  1613. editor:
  1614.  
  1615. ╔════════════════════════════════════════════════════════════════════════════╗
  1616. ║Please define the strings file(s) that you use in your program's source code║
  1617. ╠════════════════════════════════════════════════════════════════════════════╣
  1618. ║ [0] C:\WWIV\GFILES\BBS.STR                                                 ║
  1619. ║ [1] C:\WWIV\GFILES\SYSOPLOG.STR                                            ║
  1620. ║ [2] C:\WWIV\GFILES\NO.STR                                                  ║
  1621. ║ [3] C:\WWIV\GFILES\YES.STR                                                 ║
  1622. ║ [4] C:\WWIV\GFILES\MODS.STR                                                ║
  1623. ║ [5] C:\WWIV\GFILES\TAG.STR                                                 ║
  1624. ║ [6] C:\WWIV\GFILES\TRIVIA.STR                                              ║
  1625. ║ [7] C:\WWIV\GFILES\RANSTR.STR                                              ║
  1626. ║ [8] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1627. ║ [9] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1628. ║ [A] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1629. ║ [B] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1630. ║ [C] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1631. ║ [D] C:\CPP\TEST.DAT                                                        ║
  1632. ║ [Q] Quit back to main configuration screen                                 ║
  1633. ╠════════════════════════════════════════════════════════════════════════════╣
  1634. ║                                                                            ║
  1635. ╚════════════════════════════════════════════════════════════════════════════╝
  1636. *NOTE*: This screen allows to to specify up to the allowed 14 string files.
  1637.         Options A-D refer to string file numbers 10-13.
  1638.  
  1639. IMPORTANT:  You must have entry 0 filled in, even if it is with a bogus
  1640.             filename.
  1641.  
  1642. Simply select the option you want (0-9,A-D,Q) and enter the file name.  As
  1643. you see here, you *can* skip lines.  If you enter a filename, with no path or
  1644. file extension, then the file is appended with .STR and the path information
  1645. [as you've defined on the main configuration screen] is added.  So entering
  1646. simply BBS in this case would automatically generate C:\WWIV\GFILES\BBS.STR
  1647.  
  1648. If path information *is* entered, then no information whatsoever is added to
  1649. your entry.  So C:\CPP\TEST would remain that way.  In this manner you can
  1650. specify string files in various locations (and with file extension other than
  1651. STR, or none at all).
  1652.  
  1653. To clear an entry, select the option of the string you want to clear, then
  1654. press ESC, then ENTER.  .THIS ENTRY HAS NOT BEEN SPECIFIED. will then be
  1655. displayed in the place of the string file definition.
  1656.  
  1657. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1658.  
  1659.                                { SECTION 7.3 }
  1660.                    : AN IMPORTANT NOTE ABOUT PBSTRING.INI :
  1661. Since this INI file is getting larger, I highly recommend that you *DO NOT*
  1662. edit it by hand.  That's what PBconfig is for, so please use it! :)
  1663.  
  1664. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1665.  
  1666.                                { SECTION 8.0 }
  1667.                                : LEGAL JUNQUE :
  1668. PBstring   - Copyright (C) 1995-1996 - by Tracy L. Baker
  1669. STR_MOD    - Copyright (C) 1994      - by Eric W. Joy
  1670. WWIV       - Copyright (C) 1988-1996 - Wayne Bell
  1671. Qedit      - Copyright (C) 1985-1996 - SemWare Corp.
  1672. STRPOP     - Copyright (C) 1993      - Jon R. Rickher
  1673. ESM        - Copyright (C) 1990-1993 - Jon R. Rickher
  1674.  
  1675. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1676.  
  1677.                                { SECTION 8.1 }
  1678.                                 : COPYRIGHT :
  1679. The PBstring software and its accompanying documentation are protected by
  1680. both United States copyright law and international treaty provisions.  You
  1681. may make copies of this program, and distribute those copies, provided that
  1682. you do not change any part of the PBS*.* archive, which include:
  1683.  
  1684. PBSTRING.EXE    [The executable file.]
  1685. PBCONFIG.EXE    [The configuration editor.]
  1686. PBREPL.EXE      [The string replacement module.]
  1687. SETUP.EXE       [Initial setup program.]
  1688. PBSTRING.DOC    [This documentation file.]
  1689. PBSTRING.HIS    [History of revisions file.]
  1690. PBSTRING.ANN    [My version related announcement file.]
  1691. PBS-FILE.EXC    [Exclusion file for files for stock WWIV 4.24.]
  1692. PBS-FUNC.EXC    [Exclusion file for functions for stock WWIV 4.24.]
  1693. PBS-CHAR.EXC    [Exclusion file, mainly for example, for partial strings.]
  1694. PBS-STRG.EXC    [Exclusion file, mainly for example, for complete strings.]
  1695. FILE_ID.DIZ     [BBS description file.]
  1696.  
  1697. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1698.  
  1699.                                { SECTION 8.2 }
  1700.                                  : WARRANTY :
  1701. PBstring is provided as is, without warranty, either expressed or implied.
  1702. The author specifically disclaims all other warranties, expressed or implied,
  1703. including, but not limited to, any implied warranty of merchantability or
  1704. fitness for a particular purpose.  You're using it, and I'm not responsible.
  1705.  
  1706. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1707.  
  1708.                                { SECTION 8.3 }
  1709.                             : LICENSE AGREEMENT :
  1710. Users are granted a limited license to use the unregistered version of
  1711. PBstring for an evaluation period not to exceed thirty (30) days. Any other
  1712. use of PBstring, or use past the evaluation period requires registration.
  1713. Users may freely copy and distribute PBstring, provided that no fee is
  1714. charged, and that the PBstring archive contains unmodified copies of the
  1715. original files as produced by the author.  No part of PBstring may be
  1716. modified, altered, reverse engineered, or sold without prior written
  1717. permission from the author.
  1718.  
  1719. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1720.  
  1721.                                { SECTION 8.4 }
  1722.                                : REGISTRATION :
  1723. Registration allows you to use PBstring past the 30 day trial period.  It
  1724. also removes the random "press this key" delay during the program's startup.
  1725. Plus, it makes you feel better and encourages further development of this,
  1726. and other, software by the author.  Registration is $20 (US currency only).
  1727. Fill out the form in PBSTRING.REG and send it, and the $20 check or money
  1728. order to the address in PBSTRING.REG.  Finally, registering this program will
  1729. convince my wife that all the hours of development I've put in this project
  1730. really are worth it!
  1731.  
  1732.   Send your registrations to:
  1733.  
  1734.   Tracy L. Baker
  1735.   114 Sea Bridge
  1736.   Alameda, CA 94502
  1737.  
  1738. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1739.  
  1740.                                { SECTION 9.0 }
  1741.               : THE HALL OF HONOR -- THOSE WHO ARE REGISTERED :
  1742.       Hobbit                The Miller Music BBS           607-898-3139
  1743.       Spam Burger           The Sniper BBS                 319-277-2624
  1744.       Dawg                  The Dawg House                 314-940-1253
  1745.       Infinity              Hard Disk Café                 612-753-9960
  1746.       Swordfish             FishTank                       612-757-0218
  1747.       Kirk                  StarFleet Command              904-448-1655
  1748.       The Shadow            Sysco BBS                      806-797-3750
  1749.       Morgul                The Trading Post [SOUTH]       803-731-0690
  1750.       Stainless Steel Rat   The Final Frontier BBS         701-293-9197
  1751.       Batman                Arkham Asylum                  619-747-0346
  1752.       WhiteHeart            The Highlands BBS              904-388-1445
  1753.       Spotnick              Digital Republic               418-698-7015
  1754.       Lancer                Asgardian Realm                314-291-6762
  1755.       Sean Settle           Warlock's Realm                919-937-0682
  1756.       Hammer                The Anvil BBS [ASV]            541-746-9479
  1757.       Jiff                  Devcon BBS                     719-646-3177
  1758.       Akai Ryu              Chaotic Artistry               703-486-2631
  1759.  
  1760. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1761.  
  1762.