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 >
Wrap
Text File
|
1994-01-20
|
18KB
|
372 lines
STR_MOD (c) v5.15b
STR_MOD Compiled on: 01/20/94
Documentation Revised on: 01/20/94
This utility no longer has a NAG screen, it is now....
FFFFFF RRRRR EEEEEE EEEEEE W W A RRRRR EEEEEE
F R R E E W W A A R R E
FFFF RRRRR EEEE EEEE W W W A A RRRRR EEEE
F R R E E W W W AAAAA R R E
F R R EEEEEE EEEEEE W W A A R R EEEEEE
=======================================================
The VERY first thing I want to say here is THANKS to Tolkien 1@3456 and Papa
Bear 1@5079 for thier help and suggestions. Papa Bear 1@5079 WWIVnet
especially for his extreme patience during my neverending stack of problems
while troubleshooting this program. His ideas were paramount in making
STR_MOD what it is today.
QUICK IMPORTANT NOTE: I am going to transfer soon (US Navy) and will have a
new address. It is for this reason that the address in the docs is my parents
PO Box. I will have my new address by the end of Summer '94 maybe a little
later.
Short Description:
STR_MOD will extract all items inside the embedded *.C file and create (or add
to) the *.STR file.
Syntax:
Format: STR_MOD [/F:filename] [/M:strfile] [/N:str number] [/S:str size]
example: STR_MOD /F:BBS /M:MYMODS /N:5 /S:10
filename: The C file you are running it on.
If the '/F' switch is used without a file name then
the pick list format using STR_FILE.LST will be used.
strfile: The .STR file it will write to. Default: MODS.STR
str number: get_stringx file pointer number. Default: 4
str size: size limit of strings to extract. Default: 4
Switches:
/A runs all files in picklist. /C Ignore colors during comparison.
/I reinitializes the database. /R Log missing strings & get_stringx.
/U Ignore case during comparison.
The /R switch if used after the /A switch will generate both reports, but if
used after the /F or /F:filename switchs, then it will generate only the null
strings report for whatever file it is processing. The /U and /C switchs are
used only for comparison during the extraction process, they have no effect on
the /Report mode. /A switch will do NO date checking for files that have been
changed, instead it will run STR_MOD on all files in STR_FILE.LST. /I merely
rebuilds the date database. The /T switch will add log entries telling you if
it found concatenated text to extract, but STR_MOD does not currently support
extracting concatenated strings, but it will, version 6.XX hopefully.
Quick Look Features:
@ Uses single file or picklist format.
@ Support case sensativity & color stripping of WWIV color codes.
@ Will STR_MOD on any files that have changed since your last STR_MOD.
@ Will not extract text from in between comments (nested comments as well).
@ Creates a log called STR_MOD.LOG that records your extract process.
@ Will place extracted text into blank spots in your *.STR file as well as
add them on the end AND detect duplicates (using the case sensativity and
color stripping options to control them)
@ Allows you to configure the string length of the strings being extracted.
@ Automatically detects if you have any *.STR support in your source (aside
from the stock code of course).
Future Additions:
+ FULL TRUE VGA/SVGA support
+ Mouse Support
+ Auto Configuring, no need for STR_MOD.CFG
+ Much Much More...
NAG Paragraph:
I took this out of shareware and made it freeware because I was not getting
any donations from it. I think it is worth a donation, so please, if you like
it send your donations to the following address:
Eric W. Joy
PO Box 126
Stirling City, Ca 95978
THANKS!! THANKS!! THANKS!! THANKS!! THANKS!! THANKS!! THANKS!! THANKS!!
Files required for STR_MOD:
str_mod.exe : The executable.
str_mod.doc : This documentation.
str_mod.cfg : The STR_MOD configuration file.
str_strs.exc : Strings to exclude in the comparison
str_chrs.exc : Strings to exclude in the comparison
(this file is not supplied, it is user built)
str_func.exc : Functions to exclude in the comparison
(this file is not supplied, it is user built)
str_file.lst : Pick list of files that you do want to STR_MOD.
NOTE: STR_STRS.EXC is used for string matching of items you want excluded from
the MODS.STR file, however STR_CHRS.EXC is used for single character(s)
comparison and STR_FUNC.EXC is used for function exclusion, see examples below:
STR_STRS.EXC has the text "The party is tonight" in it, so STR_MOD will
exclude any strings that have that entire string in it.
STR_CHRS.EXC has the text "party" in it, so STR_MOD will exclude any string
that has the text "party" in it.
STR_FUNC.EXC has the functions you want excluded from the extraction
process. This file contains "sprintf" in it, so STR_MOD will exclude any
strings that are being used inside a sprintf statement.
Basic instructions:
1) Unzip the archive into it's own directory. This is very important, if you
run STR_MOD in the same directory with your *.STR file it will not work, and
can cause damage! STR_MOD will copy a fresh copy of your *.STR file to it's
directory if it does not find one there, and if it does find one it will back
it up. So once you make all the changes be sure to copy your *.STR file back
to your gfiles dir & recompile.
2) Edit STR_MOD.CFG to reflect the paths you need. First one is the path to
your .STR file (so it can copy that file to it's directory), and the second
one is the path to your source. Be sure to have a trailing backslash on each
one.
3) Edit STR_STRS.EXC, STR_CHRS.EXC & STR_FUNC.EXC as you see fit. These
files are used to exclude strings from the extracting process (see more on
this above).
4) Edit STR_FILE.LST by adding the files you want STR_MOD to extract from.
This file includes all the files we think are OK to run STR_MOD on, but if you
want to add any that is fine.
5) Make the following mod if you do not have it already:
(A) Load up BBSUTL.C and search for NO.STR.
(B) Directly below that line BEFORE any others add the following line:
set_strings_fn(4, languagedir, "MODS.STR", 0);
This will be different if you have used file number 4 already, and if
your MODS.STR is a different name (but remember that the un reg version
defaults to file number 4 and MODS.STR).
7) Run STR_MOD as you would on each .C file (/F:FILENAME), or use the pick
list function by using the /F switch with no filename included.
8) String Mod backs up the *.C files to *.ORG. All you will need to do is
verify they the converted *.C files are ok, then recompile, and make sure your
NEW MODS.STR file is in the right dir after the STR_MODding.
9) NOW recompile the entire BBS and if you have DGROUP.C you can run that and
check the DGROUP savings you will have.
===============================================================================
Quick Explanation of screen:
NOTE: Some indicators do not work during Report mode.
╔═════════════════════════════════════════════════════════════════════════════╗
║ ┌───────────────────────────────────────────────────────────────────┐ ║
║ │ STR_MOD v5.11b (c) 1993,1994 Titanic BBS (510)-521-9710 │ ║
║ │ Home of SEXnet - The BEST WWIV style adult net in America! │ ║
║ │ Written by Eric W. Joy & Tracy L. Baker │ ║
║ │ Compiled for WWIV v4.23 on Jan 03 1994 │ ║
║ └───────────────────────────────────────────────────────────────────┘ ║
║(1) get_stringx(4,XXXX) (2) Operational Mode: Single File ║
║ ║
║(3) Processing C File : BBS.C (4) Reading Line # ║
║ ║
║(5) Processing STR File: MODS.STR (6) WAITING! ║
║ (7) (8) (9) (10) (11) (12) (13) ║
║ Detecting TXT Srch Comments Chk Case Chk Color Loc MT STR Ign Concat ║
║┌───────────────────────────────────────────────────────────────────────────┐║
║│(14) │║
║│D:\COMPILE\BBS\MODS.STR is backed up into D:\COMPILE\BBS\SM_MODS.STR. │║
║│Reading in Database..... │║
║│Total items detected: 0 │║
║│Finished File. │║
║│---------------------------------------------------------------------------│║
║│Writing Database... │║
║│Time to run: 26.170805 seconds │║
║└───────────────────────────────────────────────────────────────────────────┘║
╚═════════════════════════════════════════════════════════════════════════════╝
Item Explanations -
(1) Represents the actual statement that is being written, this was added more
for the file pointer number then anything else, but it was easy to display it
this way to make it easier to understand.
(2) Operational modes are Single File, Edited Files, All Files, Initialize &
Report mode.
Single File mode - Runs STR_MOD on only one file (/f:filename).
Edited Files mode - Runs STR_MOD on all files from pick list file that
have changed since last STR_MOD.
All Files mode - Runs STR_MOD on all files as listed in pick list file.
Initialize mode - Rebuilds the date database. This mode puts the
CURRENT file dates into the database, so if you run STR_MOD /F
after, it will not process any files, because the database is
re-initialized.
Report mode - This will generate two reports, one is a report on ANY
strings in your *.STR file that do NOT have any get_stringx
statements in ALL your C files. This report will not be created
in any other mode except All Files mode (STR_MOD /A /R). The
other report tells you if you have any get_stringx statements in
the particular C file that have a null string in your *.STR file.
When in Report mode, STR_MOD will NOT extract any strings, it only
reports.
(3) Dual purpose field. While STR_MOD is processing a C file it tells you the
name of that file, or if it is checking the file dates for that file then it
will tell you that too.
(4) Line numbers STR_MOD is either reading from or writing to the C Files.
(5) This tells you the STR file STR_MOD is using to process.
(6) While STR_MOD is processing, but has not detected any strings to replace
this field will say WAITING!, but after it discovers a STR to replace it tells
you if the string is a duplicate of another already in the string file,
Appending this string to the end of the string file (no blank spots) or
Inserting the string into a blank spot.
(7) Flash indicator that tells you what detection phase STR_MOD is in. It
will be either Checking, Detecting or Reporting. Checking means it is running
some text comparisons, Detecting means it is looking for quoted text, and
Reporting means it is reporting on that string.
(8) Flash indicator that tells you what search mode STR_MOD is in. There are
four search modes, (a) TXT Search is searching the STR_STRS.EXC file for
matching strings, (b) CHR Search is searching the STR_CHRS.EXC file for
matching strings (non-exact match), (c) FNC Search is searching the
STR_FUNC.EXC for functions you do not want included in the search, and finally
(d) STR Search is searching the MODS.STR file for matching text. As you may
have noticed that the more STR_*.EXC files you include (these are all
optional) the longer STR_MOD will take, you control the time in that respect.
(9) Flash indicator that tells you if STR_MOD is processing text inside
comments (nested or otherwise).
(10) Switch indicator tells you if STR_MOD is in Ign Case mode or Chk case mode.
(11) Switch indicator tells you if STR_MOD is in Ign Color mode or Chk Color
mode.
(12) Flash indicator that tells you if STR_MOD is looking for an empty place in
the STR file.
(13) Switch indicator that tells you if STR_MOD is reporting concatenated
strings or not.
(14) This is the report window and therefore reports many things, too many to
mention, but they are all pretty self explanatory. One thing to note is that
the log includes ALL the information going to the report window, as well as
MUCH MUCH more. It is nice to note that STR_MOD times itself and reports
memory information as well.
==============================================================================
History:
01/20/94 v5.15 A SERIOUS annoying bug... the STR_CHRS.EXC files did not work
properly, as well as the bug that caused the CONCAT flash indicator to count
forever.... and now they work.... SORRY!!
01/17/94 v5.14 Just a ANNOYING bug fixed that duplicated commented lines in
the output file.
01/14/94 v5.13 NOW SUPPORTS CONCATENATED STRINGS!!!! To any level. v5.12 has
many bugs and should be replaced immediately! It is left out here because of
the many bugs it had.
01/08/94 v5.11 Added the support to create a report that tells you if you have
missing get_stringx statements in your source OR if you have null text for any
get_stringx statements. Some bug fixes as well.
01/06/94 v5.10 So many little changes, I wanted to bust up the version number.
The changes were a few bug fixes, as well as adding the support to exclude
functions now too. I am working on speeding the searching process now, I
sould have that done either by the time we have VGA or before.
01/03/94 v5.04 EVEN FASTER NOW!!! Routines are made even more streamlined.
It also supports commented strings now, meaning it will not extract strings
imbedded into comments (nested or otherwise). Made the concatenated strings
checking a switch as it slows the machine down a LOT. Source file processing
number of total lines as well as STR file number of total lines were added.
01/02/94 v5.02 More improvements to the routines, a few bug fixes. Renamed a
few files to make them more realistic. STR_MOD.CFG was re done, you only need
two lines in it now. First line is full path to the MODS.STR that you are
processing, and the second line is the full path to your source, thats it. Do
not forget the trailing backslash's.
01/01/94 v5.01 Improved the checking routines to make it more then TWICE as
fast as before.
01/01/94 v5.00b BETA because I am not sure how the new routines will work.
But I have discovered that it will not work on a MODS.STR while the BBS has
access to it, so you have to copy MODS.STR to another directory to use it
while the BBS is running. Graphics were added by Tracy L. Baker, Sysop of the
WWIV BBS StarPort Valhalla, 510-522-3583, Alameda, Ca. Cleaned up the code
alot, the error checking routines and the extraction routines were improved.
The /U switch was added.
12/22/93 v4.04 Only a few bug fixes.
12/14/93 v4.03 It now backs up your *.STR file to a file called SM_hhmm.STR
with hh=hour and mm=minute so that if you do one again a bit later you always
have a backup of your old *.STR.
12/13/93 v4.02 Just some bug fixes for the detection phase.
12/13/93 v4.01 Added command line switches /I and /?. /I will reinitialize
the dates in the database for you. Also, a major function is changed, the
output files are now named *.C and the original files are now labeled *.ORG.
12/11/93 v4.00 NOW FREEWARE!! It now will AUTO-DETECT if a C file has been
modified and only run STR_MOD on those files.
12/07/93 v3.10 Major bug fixes, plus made it work with v4.23.
11/25/93 v3.02 Just some bug fixes, like changing hte log file name extension
to LOG.
06/20/93 v3.01 Some bug fixes. Added the / parameters vice straight
parameter input. Cleaned up the code a bit. Re did the password structure
and recomputed passwords for registration.
06/14/93 v3.00 STR_MOD NOW supports files list format. No need to reun it on
every file.
06/12/93 v2.20 STR_MOD will now work with complete paths as defined in the
STR_MOD.CFG file. The registration password will now go into the file
STR_MOD.REG.
06/09/93 v2.10 STR_MOD will now write to empty slots in the MODS.STR file.
Before it only appended, now it writes to empty spots first. I am currently
writing a utility that will create a report to tell you if you have any unused
.STR slots, comparing the source and the .STR file.
04/08/93 v2.00 Fixed some major bugs (especially that annoying Memory
allocation error), added support for full registration, cleaned up the code a
lot.
04/05/93 v1.05(b) Fixed the File not available bug.
04/04/93 v1.04(b) Added some new error checking routines for string detection as
well as a better line duplication check routine.
04/03/93 v1.03(b) Fixed duplicate string writes to the first .STRing line bug.
04/02/93 v1.02(b) Added support for direct writes to *.STR files.
03/22/93 v1.01(b) Some bug fixes, basically the same version.
03/20/93 v1.00(b) created. It read the .C file and wrote to the .TXT file that
was created by STRDEC and then you had to recompile using STRCOM.
===============================================================================
I will write any type of utilities you want given the idea as long as it
seems to be a valid idea, and give you the first copy free and a percentage of
the registration fees, so please send your ideas to me and I will do the work.
My address info:
Eric W. Joy WWIVnet 1@5057
PO Box 126 ICEnet 1@5057
Stirling City, Ca 95978 WWIVlink 1@15056