home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UTILITY / SM515B.ZIP / STR_MOD.DOC < prev    next >
Text File  |  1994-01-20  |  18KB  |  372 lines

  1. STR_MOD (c) v5.15b 
  2. STR_MOD Compiled on: 01/20/94
  3. Documentation Revised on: 01/20/94
  4.  
  5.  
  6. This utility no longer has a NAG screen, it is now....
  7.  
  8.          FFFFFF RRRRR  EEEEEE EEEEEE W     W   A   RRRRR  EEEEEE
  9.          F      R    R E      E      W     W  A A  R    R E
  10.          FFFF   RRRRR  EEEE   EEEE   W  W  W A   A RRRRR  EEEE
  11.          F      R  R   E      E       W W W  AAAAA R  R   E
  12.          F      R    R EEEEEE EEEEEE   W W   A   A R    R EEEEEE
  13.          =======================================================
  14.  
  15. The VERY first thing I want to say here is THANKS to Tolkien 1@3456 and Papa
  16. Bear 1@5079 for thier help and suggestions.  Papa Bear 1@5079 WWIVnet
  17. especially for his extreme patience during my neverending stack of problems
  18. while troubleshooting this program.  His ideas were paramount in making
  19. STR_MOD what it is today.
  20.  
  21. QUICK IMPORTANT NOTE:  I am going to transfer soon (US Navy) and will have a
  22. new address.  It is for this reason that the address in the docs is my parents
  23. PO Box.  I will have my new address by the end of Summer '94 maybe a little
  24. later.
  25.  
  26. Short Description:
  27.  
  28. STR_MOD will extract all items inside the embedded *.C file and create (or add
  29. to) the *.STR file.
  30.  
  31. Syntax:
  32.  
  33.  Format: STR_MOD [/F:filename] [/M:strfile] [/N:str number] [/S:str size]
  34.  example: STR_MOD /F:BBS /M:MYMODS /N:5 /S:10
  35.    filename:   The C file you are running it on.
  36.                If the '/F' switch is used without a file name then
  37.                the pick list format using STR_FILE.LST will be used.
  38.    strfile:    The .STR file it will write to.  Default: MODS.STR
  39.    str number: get_stringx file pointer number.  Default: 4
  40.    str size:   size limit of strings to extract.  Default: 4
  41.  
  42.  
  43.  Switches:
  44.    /A runs all files in picklist.     /C Ignore colors during comparison.
  45.    /I reinitializes the database.     /R Log missing strings & get_stringx.
  46.    /U Ignore case during comparison.
  47.  
  48. The /R switch if used after the /A switch will generate both reports, but if
  49. used after the /F or /F:filename switchs, then it will generate only the null
  50. strings report for whatever file it is processing.  The /U and /C switchs are
  51. used only for comparison during the extraction process, they have no effect on
  52. the /Report mode.  /A switch will do NO date checking for files that have been
  53. changed, instead it will run STR_MOD on all files in STR_FILE.LST.  /I merely
  54. rebuilds the date database.  The /T switch will add log entries telling you if
  55. it found concatenated text to extract, but STR_MOD does not currently support
  56. extracting concatenated strings, but it will, version 6.XX hopefully.
  57.  
  58. Quick Look Features:
  59.  
  60. @ Uses single file or picklist format.
  61. @ Support case sensativity & color stripping of WWIV color codes.
  62. @ Will STR_MOD on any files that have changed since your last STR_MOD.
  63. @ Will not extract text from in between comments (nested comments as well).
  64. @ Creates a log called STR_MOD.LOG that records your extract process.
  65. @ Will place extracted text into blank spots in your *.STR file as well as
  66.   add them on the end AND detect duplicates (using the case sensativity and
  67.   color stripping options to control them)
  68. @ Allows you to configure the string length of the strings being extracted.
  69. @ Automatically detects if you have any *.STR support in your source (aside
  70.   from the stock code of course).
  71.  
  72. Future Additions:
  73.  
  74. + FULL TRUE VGA/SVGA support
  75. + Mouse Support
  76. + Auto Configuring, no need for STR_MOD.CFG
  77. + Much Much More...
  78.  
  79. NAG Paragraph:
  80.  
  81. I took this out of shareware and made it freeware because I was not getting
  82. any donations from it.  I think it is worth a donation, so please, if you like
  83. it send your donations to the following address:
  84.  
  85.                 Eric W. Joy
  86.                 PO Box 126
  87.                 Stirling City, Ca 95978
  88.  
  89. THANKS!!  THANKS!!  THANKS!!  THANKS!!  THANKS!!  THANKS!!  THANKS!!  THANKS!!
  90.  
  91. Files required for STR_MOD:
  92.  
  93. str_mod.exe  : The executable.
  94. str_mod.doc  : This documentation.
  95. str_mod.cfg  : The STR_MOD configuration file.
  96. str_strs.exc : Strings to exclude in the comparison
  97. str_chrs.exc : Strings to exclude in the comparison
  98.                (this file is not supplied, it is user built)
  99. str_func.exc : Functions to exclude in the comparison
  100.                (this file is not supplied, it is user built)
  101. str_file.lst : Pick list of files that you do want to STR_MOD.
  102.  
  103. NOTE: STR_STRS.EXC is used for string matching of items you want excluded from
  104. the MODS.STR file, however STR_CHRS.EXC is used for single character(s)
  105. comparison and STR_FUNC.EXC is used for function exclusion, see examples below:
  106.  
  107.   STR_STRS.EXC has the text "The party is tonight" in it, so STR_MOD will
  108.   exclude any strings that have that entire string in it.
  109.  
  110.   STR_CHRS.EXC has the text "party" in it, so STR_MOD will exclude any string
  111.   that has the text "party" in it.
  112.  
  113.   STR_FUNC.EXC has the functions you want excluded from the extraction
  114.   process.  This file contains "sprintf" in it, so STR_MOD will exclude any
  115.   strings that are being used inside a sprintf statement.
  116.  
  117. Basic instructions:
  118.  
  119. 1)  Unzip the archive into it's own directory.  This is very important, if you
  120. run STR_MOD in the same directory with your *.STR file it will not work, and
  121. can cause damage!  STR_MOD will copy a fresh copy of your *.STR file to it's
  122. directory if it does not find one there, and if it does find one it will back
  123. it up.  So once you make all the changes be sure to copy your *.STR file back
  124. to your gfiles dir & recompile.
  125.  
  126. 2)  Edit STR_MOD.CFG to reflect the paths you need.  First one is the path to
  127. your .STR file (so it can copy that file to it's directory), and the second
  128. one is the path to your source.  Be sure to have a trailing backslash on each
  129. one.
  130.  
  131. 3)  Edit STR_STRS.EXC, STR_CHRS.EXC & STR_FUNC.EXC as you see fit.  These
  132. files are used to exclude strings from the extracting process (see more on
  133. this above).
  134.  
  135. 4)  Edit STR_FILE.LST by adding the files you want STR_MOD to extract from.
  136. This file includes all the files we think are OK to run STR_MOD on, but if you
  137. want to add any that is fine.
  138.  
  139. 5)  Make the following mod if you do not have it already:
  140.  
  141.     (A)  Load up BBSUTL.C and search for NO.STR.
  142.     (B)  Directly below that line BEFORE any others add the following line:
  143.          set_strings_fn(4, languagedir, "MODS.STR", 0);
  144.          This will be different if you have used file number 4 already, and if
  145.          your MODS.STR is a different name (but remember that the un reg version
  146.          defaults to file number 4 and MODS.STR).
  147.  
  148. 7)  Run STR_MOD as you would on each .C file (/F:FILENAME), or use the pick
  149. list function by using the /F switch with no filename included.
  150.  
  151. 8)  String Mod backs up the *.C files to *.ORG.  All you will need to do is
  152. verify they the converted *.C files are ok, then recompile, and make sure your
  153. NEW MODS.STR file is in the right dir after the STR_MODding.
  154.  
  155. 9)  NOW recompile the entire BBS and if you have DGROUP.C you can run that and
  156. check the DGROUP savings you will have.
  157. ===============================================================================
  158.  
  159. Quick Explanation of screen:
  160.  
  161. NOTE:  Some indicators do not work during Report mode.
  162.  
  163. ╔═════════════════════════════════════════════════════════════════════════════╗
  164. ║    ┌───────────────────────────────────────────────────────────────────┐    ║
  165. ║    │     STR_MOD v5.11b (c) 1993,1994 Titanic BBS (510)-521-9710       │    ║
  166. ║    │    Home of SEXnet - The BEST WWIV style adult net in America!     │    ║
  167. ║    │             Written by Eric W. Joy & Tracy L. Baker               │    ║
  168. ║    │              Compiled for WWIV v4.23 on Jan 03 1994               │    ║
  169. ║    └───────────────────────────────────────────────────────────────────┘    ║
  170. ║(1) get_stringx(4,XXXX)                (2) Operational Mode: Single File     ║
  171. ║                                                                             ║
  172. ║(3) Processing C File  : BBS.C         (4) Reading Line    #                 ║
  173. ║                                                                             ║
  174. ║(5) Processing STR File: MODS.STR      (6)           WAITING!                ║
  175. ║     (7)        (8)      (9)       (10)      (11)       (12)      (13)       ║
  176. ║   Detecting TXT Srch  Comments  Chk Case  Chk Color Loc MT STR Ign Concat   ║
  177. ║┌───────────────────────────────────────────────────────────────────────────┐║
  178. ║│(14)                                                                       │║
  179. ║│D:\COMPILE\BBS\MODS.STR is backed up into D:\COMPILE\BBS\SM_MODS.STR.      │║
  180. ║│Reading in Database.....                                                   │║
  181. ║│Total items detected: 0                                                    │║
  182. ║│Finished File.                                                             │║
  183. ║│---------------------------------------------------------------------------│║
  184. ║│Writing Database...                                                        │║
  185. ║│Time to run: 26.170805 seconds                                             │║
  186. ║└───────────────────────────────────────────────────────────────────────────┘║
  187. ╚═════════════════════════════════════════════════════════════════════════════╝
  188.  
  189. Item Explanations -
  190.  
  191. (1)  Represents the actual statement that is being written, this was added more
  192. for the file pointer number then anything else, but it was easy to display it
  193. this way to make it easier to understand.
  194.  
  195. (2)  Operational modes are Single File, Edited Files, All Files, Initialize &
  196. Report mode.
  197.  
  198.         Single File mode - Runs STR_MOD on only one file (/f:filename).
  199.         Edited Files mode - Runs STR_MOD on all files from pick list file that
  200.             have changed since last STR_MOD.
  201.         All Files mode - Runs STR_MOD on all files as listed in pick list file.
  202.         Initialize mode - Rebuilds the date database.  This mode puts the
  203.             CURRENT file dates into the database, so if you run STR_MOD /F
  204.             after, it will not process any files, because the database is
  205.             re-initialized.
  206.         Report mode - This will generate two reports, one is a report on ANY
  207.             strings in your *.STR file that do NOT have any get_stringx
  208.             statements in ALL your C files.  This report will not be created
  209.             in any other mode except All Files mode (STR_MOD /A /R).  The
  210.             other report tells you if you have any get_stringx statements in
  211.             the particular C file that have a null string in your *.STR file.
  212.             When in Report mode, STR_MOD will NOT extract any strings, it only
  213.             reports.
  214.  
  215. (3)  Dual purpose field.  While STR_MOD is processing a C file it tells you the
  216. name of that file, or if it is checking the file dates for that file then it
  217. will tell you that too.
  218.  
  219. (4)  Line numbers STR_MOD is either reading from or writing to the C Files.
  220.  
  221. (5)  This tells you the STR file STR_MOD is using to process.
  222.  
  223. (6)  While STR_MOD is processing, but has not detected any strings to replace
  224. this field will say WAITING!, but after it discovers a STR to replace it tells
  225. you if the string is a duplicate of another already in the string file,
  226. Appending this string to the end of the string file (no blank spots) or
  227. Inserting the string into a blank spot.
  228.  
  229. (7)  Flash indicator that tells you what detection phase STR_MOD is in.  It
  230. will be either Checking, Detecting or Reporting.  Checking means it is running
  231. some text comparisons, Detecting means it is looking for quoted text, and
  232. Reporting means it is reporting on that string.
  233.  
  234. (8)  Flash indicator that tells you what search mode STR_MOD is in.  There are
  235. four search modes, (a) TXT Search is searching the STR_STRS.EXC file for
  236. matching strings, (b) CHR Search is searching the STR_CHRS.EXC file for
  237. matching strings (non-exact match), (c) FNC Search is searching the
  238. STR_FUNC.EXC for functions you do not want included in the search, and finally
  239. (d) STR Search is searching the MODS.STR file for matching text.  As you may
  240. have noticed that the more STR_*.EXC files you include (these are all
  241. optional) the longer STR_MOD will take, you control the time in that respect.
  242.  
  243. (9)  Flash indicator that tells you if STR_MOD is processing text inside
  244. comments (nested or otherwise).
  245.  
  246. (10) Switch indicator tells you if STR_MOD is in Ign Case mode or Chk case mode.
  247.  
  248. (11) Switch indicator tells you if STR_MOD is in Ign Color mode or Chk Color
  249. mode.
  250.  
  251. (12) Flash indicator that tells you if STR_MOD is looking for an empty place in
  252. the STR file.
  253.  
  254. (13) Switch indicator that tells you if STR_MOD is reporting concatenated
  255. strings or not.
  256.  
  257. (14) This is the report window and therefore reports many things, too many to
  258. mention, but they are all pretty self explanatory.  One thing to note is that
  259. the log includes ALL the information going to the report window, as well as
  260. MUCH MUCH more.  It is nice to note that STR_MOD times itself and reports
  261. memory information as well.
  262. ==============================================================================
  263.  
  264. History:
  265.  
  266. 01/20/94 v5.15 A SERIOUS annoying bug... the STR_CHRS.EXC files did not work
  267. properly, as well as the bug that caused the CONCAT flash indicator to count
  268. forever.... and now they work.... SORRY!!
  269.  
  270. 01/17/94 v5.14 Just a ANNOYING bug fixed that duplicated commented lines in
  271. the output file.
  272.  
  273. 01/14/94 v5.13 NOW SUPPORTS CONCATENATED STRINGS!!!!  To any level.  v5.12 has
  274. many bugs and should be replaced immediately!  It is left out here because of
  275. the many bugs it had.
  276.  
  277. 01/08/94 v5.11 Added the support to create a report that tells you if you have
  278. missing get_stringx statements in your source OR if you have null text for any
  279. get_stringx statements.  Some bug fixes as well.
  280.  
  281. 01/06/94 v5.10 So many little changes, I wanted to bust up the version number.
  282. The changes were a few bug fixes, as well as adding the support to exclude
  283. functions now too.  I am working on speeding the searching process now, I
  284. sould have that done either by the time we have VGA or before.
  285.  
  286. 01/03/94 v5.04 EVEN FASTER NOW!!!  Routines are made even more streamlined.
  287. It also supports commented strings now, meaning it will not extract strings
  288. imbedded into comments (nested or otherwise).  Made the concatenated strings
  289. checking a switch as it slows the machine down a LOT.  Source file processing
  290. number of total lines as well as STR file number of total lines were added.
  291.  
  292. 01/02/94 v5.02 More improvements to the routines, a few bug fixes.  Renamed a
  293. few files to make them more realistic.  STR_MOD.CFG was re done, you only need
  294. two lines in it now.  First line is full path to the MODS.STR that you are
  295. processing, and the second line is the full path to your source, thats it.  Do
  296. not forget the trailing backslash's.
  297.  
  298. 01/01/94 v5.01 Improved the checking routines to make it more then TWICE as
  299. fast as before.
  300.  
  301. 01/01/94  v5.00b BETA because I am not sure how the new routines will work.
  302. But I have discovered that it will not work on a MODS.STR while the BBS has
  303. access to it, so you have to copy MODS.STR to another directory to use it
  304. while the BBS is running.  Graphics were added by Tracy L. Baker, Sysop of the
  305. WWIV BBS StarPort Valhalla, 510-522-3583, Alameda, Ca.  Cleaned up the code
  306. alot, the error checking routines and the extraction routines were improved.
  307. The /U switch was added.
  308.  
  309. 12/22/93  v4.04 Only a few bug fixes.
  310.  
  311. 12/14/93  v4.03 It now backs up your *.STR file to a file called SM_hhmm.STR
  312. with hh=hour and mm=minute so that if you do one again a bit later you always
  313. have a backup of your old *.STR.
  314.  
  315. 12/13/93  v4.02 Just some bug fixes for the detection phase.
  316.  
  317. 12/13/93  v4.01 Added command line switches /I and /?.  /I will reinitialize
  318. the dates in the database for you.  Also, a major function is changed, the
  319. output files are now named *.C and the original files are now labeled *.ORG.
  320.  
  321. 12/11/93  v4.00 NOW FREEWARE!!  It now will AUTO-DETECT if a C file has been
  322. modified and only run STR_MOD on those files.
  323.  
  324. 12/07/93  v3.10 Major bug fixes, plus made it work with v4.23.
  325.  
  326. 11/25/93  v3.02 Just some bug fixes, like changing hte log file name extension
  327. to LOG.
  328.  
  329. 06/20/93  v3.01 Some bug fixes.  Added the / parameters vice straight
  330. parameter input.  Cleaned up the code a bit.  Re did the password structure
  331. and recomputed passwords for registration.
  332.  
  333. 06/14/93  v3.00 STR_MOD NOW supports files list format.  No need to reun it on
  334. every file.
  335.  
  336. 06/12/93  v2.20 STR_MOD will now work with complete paths as defined in the
  337. STR_MOD.CFG file.  The registration password will now go into the file
  338. STR_MOD.REG.
  339.  
  340. 06/09/93  v2.10 STR_MOD will now write to empty slots in the MODS.STR file.
  341. Before it only appended, now it writes to empty spots first.  I am currently
  342. writing a utility that will create a report to tell you if you have any unused
  343. .STR slots, comparing the source and the .STR file.
  344.  
  345. 04/08/93  v2.00 Fixed some major bugs (especially that annoying Memory
  346. allocation error), added support for full registration, cleaned up the code a
  347. lot.
  348.  
  349. 04/05/93  v1.05(b) Fixed the File not available bug.
  350.  
  351. 04/04/93  v1.04(b) Added some new error checking routines for string detection as
  352. well as a better line duplication check routine.
  353.  
  354. 04/03/93  v1.03(b) Fixed duplicate string writes to the first .STRing line bug.
  355.  
  356. 04/02/93  v1.02(b) Added support for direct writes to *.STR files.
  357.  
  358. 03/22/93  v1.01(b) Some bug fixes, basically the same version.
  359.  
  360. 03/20/93  v1.00(b) created.  It read the .C file and wrote to the .TXT file that
  361. was created by STRDEC and then you had to recompile using STRCOM.
  362. ===============================================================================
  363.  
  364. I will write any type of utilities you want given the idea as long as it
  365. seems to be a valid idea, and give you the first copy free and a percentage of
  366. the registration fees, so please send your ideas to me and I will do the work.
  367. My address info:
  368.  
  369. Eric W. Joy                             WWIVnet 1@5057
  370. PO Box 126                              ICEnet 1@5057
  371. Stirling City, Ca 95978                 WWIVlink 1@15056
  372.