home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
402.lha
/
RepString_v2.0
/
RepString2.0.doc
< prev
next >
Wrap
Text File
|
1990-07-31
|
8KB
|
187 lines
RepString V2.0 Copyright © 1990 by Luciano Bertato
~~~~~~~~~~~~~~
--------------------------------------------------------------------------
This software package contains:
RepString - Version 2.0 RepString program
RepString2.0.doc - this file (documentation)
arp.library - needed for RepString and several other pieces
of software. Be sure you have arp.library in
your LIBS: directory before you use RepString.
The version included with this package is V39.1.
Please keep these files together, so that everybody can get all the
information they need. I STRONGLY ENCOURAGE everybody to spread this
program around to their friends, and ESPECIALLY to other BBS's. But
the following conditions MUST be met:
1) RepString, RepString2.0.doc and arp.library MUST NOT in any way
be modified.
2) All Copyright notices MUST NOT be removed from RepString,
RepString2.0.doc and arp.library.
3) All three (RepString, RepString2.0.doc and arp.library) must
stay together if in an archived format such as .LZH, .ZOO, .ZIP,
.ARC etc....
4) If in an unarchived format, then RepString and RepString2.0.doc must
stay together, and arp.library can optionally be kept out.
5) Non-commercial purposes unless given direct permission by the author.
6) No profit is made directly from this program.
Thanks a lot......Ok, now here's the documentation....
--------------------------------------------------------------------------
This Utility will replace any type of string in any type of file
with another string of any type.
Usage: RepString <input file> <output file> <old string> <new string>
Or
RepString FROM <group file>
where - input file : a file you want to modify (binary or text).
output file: the new file to be created.
old string : the string to be replaced.
new string : the string that will replace the old string.
group file - a file containing multiple repstring
parameters (see examples #9, #10).
(read on...).
examples -
1> repstring df0:message1 df1:message2 horse cat
This will replace every occurrence of horse to
cat in df0:message1 and create the new file
called df1:message2.
2> repstring df1:message3 df0:message4 "RAM File" "Text String"
Use double quotes if the string has at least
one space.
3> repstring df0:message5 ram:message6 $0A $0D0A
By putting a dollar sign in front of a hexadecimal
string, you can replace any type of binary string.
This will replace any occurrence of $0A (linefeed)
to $0D0A (carriage return + linefeed). This can be
useful when you want to view a text file in other
types of editors which needs the carriage returns.
4> repstring message ram:buffer $434154 "small mouse"
You can mix up the string types. $434154 is
hex for CAT. You can have a very long hex string
like the example above.
5> repstring ram:record1 vd0:record2 "$50.95" "$452.98"
If you want to replace the character $ then
you must put it in double quotes, like the example
above. Or.....
6> repstring ram:file1 df2:file2 $24 $a
Or, you can use the ascii hex value of $ ($24).
This will replace every $ to linefeeds ($0A).
7> repstring df1:record6 df0:message change $22446f6722
If a double quote is in a string, then use
its ascii hex value of $22, like the above example.
This will replace the string 'change' to
$22446f6722 which is hex for "Dog".
8> repstring "File 5" "ram:record four" "$24.00" "Twenty-Four Dollars"
If there is a space in a filename, then use the
double quotes, like the above example.
9> repstring from dh1:s/multifile
You can have a text file which contains multiple
lines of repstring parameters. For example, the
text file will look like the following:
from a text file called dh1:s/multifile:
Cfile file1 "/* end of plane 0 */" $20
file1 Afile "/* end of plane 1 */" $20
Afile file1 "/* end of plane 2 */" $20
file1 Afile " 0x" "$"
Afile file1 $2c0a $0a
file1 Afile $2c $0a
Afile file1 "$" " dc.w $"
file1 Afile $200a $0a
RepString 2.0 or greater will execute the text file
lines one at a time. The above example is a file that
I use to actually convert a standard Amiga 'C' block
of image data to a 68000 Assembler block of data.
Just one of several uses!
10> repstring rad:work/code ram:code.tmp FINAL TEMP from dh0:s/sfile
the group of parameters in the CLI line will be
executed, then RepString will start executing the
parameters in dh0:s/sfile as explained in example #9.
11> repstring <return>
you will get a display of information about
RepString.
12> repstring ? <return>
you will get RepString's template like the regular
AmigaDOS and ARP C: commands.
--------------------------------------------------------------------------
A USEFUL NOTE: If at any time you want to ABORT RepString, then just
do a ^C (Control-c), and RepString will exit immediately.
A NOTE ABOUT GROUP FILES: Be sure that the last line is followed by
a linefeed, or else that line may not be
executed.
ANOTHER NOTE ABOUT GROUP FILES: A group file within a group file
cannot be executed.
NOTE: If you want to alter an executable program, you should alter only
text within the program, and the old string must be of equal length
to the new string, or else the new file may crash when run.
Programmers can patch (alter bytes) if they know what they're doing.
Just don't alter copyrighted software, because I think that this
is not allowed, or something like that (right?).
ANOTHER NOTE: RepString V2.0 or greater can now be made resident.
--------------------------------------------------------------------------
History: July 29, 1990 RepString V2.0 was released
- completely re-written
- designed completely with ARP
- ^C break capability added
- line parsing improved with ARP
- now RepString 2.0+ can be made RESIDENT
- group file introduced for multiple
executions from one command.
- minor changes in CLI appearance
- written in 100% assembly language
May 18, 1988 RepString V1.0 was released
- brand new, released to Compuserve and CRS
and added to Fred Fish collection
- Fred Fish disk #180
--------------------------------------------------------------------------
If you discover ANY bugs in the program, or have any suggestions on
how to improve it, feel free to send me E-mail.
Thanks to everybody who contacted me about RepString V1.0!!
Address - L. Bertato
P.O. Box 627
King City, Ontario
Canada L0G 1K0
CompuServe - 79246,1744
Canada Remote Systems - (Amiga Conference) LUCIANO BERTATO
No modem?? Get one. I strongly recommend it. It will connect your
computer to the rest of the computing world.
--------------------------------------------------------------------------
Enjoy........