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 >
Text File  |  1990-07-31  |  8KB  |  187 lines

  1.  
  2.            RepString V2.0  Copyright © 1990 by Luciano Bertato
  3.            ~~~~~~~~~~~~~~
  4. --------------------------------------------------------------------------
  5. This software package contains:
  6.  
  7. RepString         - Version 2.0 RepString program
  8. RepString2.0.doc  - this file (documentation)
  9. arp.library       - needed for RepString and several other pieces
  10.                     of software. Be sure you have arp.library in
  11.                     your LIBS: directory before you use RepString.
  12.                     The version included with this package is V39.1.
  13.  
  14. Please keep these files together, so that everybody can get all the
  15. information they need. I STRONGLY ENCOURAGE everybody to spread this
  16. program around to their friends, and ESPECIALLY to other BBS's. But
  17. the following conditions MUST be met:
  18.  
  19. 1) RepString, RepString2.0.doc and arp.library MUST NOT in any way
  20.    be modified.
  21. 2) All Copyright notices MUST NOT be removed from RepString,
  22.    RepString2.0.doc and arp.library.
  23. 3) All three (RepString, RepString2.0.doc and arp.library) must
  24.    stay together if in an archived format such as .LZH, .ZOO, .ZIP,
  25.    .ARC etc....
  26. 4) If in an unarchived format, then RepString and RepString2.0.doc must
  27.    stay together, and arp.library can optionally be kept out.
  28. 5) Non-commercial purposes unless given direct permission by the author.
  29. 6) No profit is made directly from this program.
  30.  
  31. Thanks a lot......Ok, now here's the documentation....
  32. --------------------------------------------------------------------------
  33.  
  34. This Utility will replace any type of string in any type of file
  35. with another string of any type.
  36.  
  37. Usage: RepString <input file> <output file> <old string> <new string>
  38.        Or
  39.        RepString FROM <group file>
  40.  
  41. where - input file : a file you want to modify (binary or text).
  42.         output file: the new file to be created.
  43.         old string : the string to be replaced.
  44.         new string : the string that will replace the old string.
  45.         group file  - a file containing multiple repstring
  46.                       parameters (see examples #9, #10).
  47.  
  48.                      (read on...).
  49. examples -
  50.  
  51. 1> repstring df0:message1 df1:message2 horse cat
  52.                       This will replace every occurrence of horse to
  53.                       cat in df0:message1 and create the new file
  54.                       called df1:message2.
  55.  
  56. 2> repstring df1:message3 df0:message4 "RAM File" "Text String"
  57.                       Use double quotes if the string has at least
  58.                       one space.
  59.  
  60. 3> repstring df0:message5 ram:message6 $0A $0D0A
  61.                       By putting a dollar sign in front of a hexadecimal
  62.                       string, you can replace any type of binary string.
  63.                       This will replace any occurrence of $0A (linefeed)
  64.                       to $0D0A (carriage return + linefeed). This can be
  65.                       useful when you want to view a text file in other
  66.                       types of editors which needs the carriage returns.
  67.  
  68. 4> repstring message ram:buffer $434154 "small mouse"
  69.                       You can mix up the string types. $434154 is
  70.                       hex for CAT. You can have a very long hex string
  71.                       like the example above.
  72.  
  73. 5> repstring ram:record1 vd0:record2 "$50.95" "$452.98"
  74.                       If you want to replace the character $ then
  75.                       you must put it in double quotes, like the example
  76.                       above. Or.....
  77.  
  78. 6> repstring ram:file1 df2:file2 $24 $a
  79.                       Or, you can use the ascii hex value of $ ($24).
  80.                       This will replace every $ to linefeeds ($0A).
  81.  
  82. 7> repstring df1:record6 df0:message change $22446f6722
  83.                       If a double quote is in a string, then use
  84.                       its ascii hex value of $22, like the above example.
  85.                       This will replace the string 'change' to
  86.                       $22446f6722 which is hex for "Dog".
  87.  
  88. 8> repstring "File 5" "ram:record four" "$24.00" "Twenty-Four Dollars"
  89.                       If there is a space in a filename, then use the
  90.                       double quotes, like the above example.
  91.  
  92. 9> repstring from dh1:s/multifile
  93.                       You can have a text file which contains multiple
  94.                       lines of repstring parameters. For example, the
  95.                       text file will look like the following:
  96.  
  97. from a text file called dh1:s/multifile:
  98.  
  99. Cfile file1 "/*  end of plane 0 */" $20
  100. file1 Afile "/*  end of plane 1 */" $20
  101. Afile file1 "/*  end of plane 2 */" $20
  102. file1 Afile "  0x" "$"
  103. Afile file1 $2c0a $0a
  104. file1 Afile $2c $0a
  105. Afile file1 "$" "   dc.w     $"
  106. file1 Afile $200a $0a
  107.  
  108.                  RepString 2.0 or greater will execute the text file
  109.                  lines one at a time. The above example is a file that
  110.                  I use to actually convert a standard Amiga 'C' block
  111.                  of image data to a 68000 Assembler block of data.
  112.                  Just one of several uses!
  113.  
  114. 10> repstring rad:work/code ram:code.tmp FINAL TEMP from dh0:s/sfile
  115.                  the group of parameters in the CLI line will be
  116.                  executed, then RepString will start executing the
  117.                  parameters in dh0:s/sfile as explained in example #9.
  118.  
  119. 11> repstring <return>
  120.                  you will get a display of information about
  121.                  RepString.
  122.  
  123. 12> repstring ? <return>
  124.                  you will get RepString's template like the regular
  125.                  AmigaDOS and ARP C: commands.
  126.  
  127. --------------------------------------------------------------------------
  128.  
  129. A USEFUL NOTE: If at any time you want to ABORT RepString, then just
  130.                do a ^C (Control-c), and RepString will exit immediately.
  131.  
  132. A NOTE ABOUT GROUP FILES: Be sure that the last line is followed by
  133.                           a linefeed, or else that line may not be
  134.                           executed.
  135.  
  136. ANOTHER NOTE ABOUT GROUP FILES: A group file within a group file
  137.                                 cannot be executed.
  138.  
  139. NOTE: If you want to alter an executable program, you should alter only
  140.       text within the program, and the old string must be of equal length
  141.       to the new string, or else the new file may crash when run.
  142.       Programmers can patch (alter bytes) if they know what they're doing.
  143.       Just don't alter copyrighted software, because I think that this
  144.       is not allowed, or something like that (right?).
  145.  
  146. ANOTHER NOTE: RepString V2.0 or greater can now be made resident.
  147.  
  148. --------------------------------------------------------------------------
  149.  
  150. History: July 29, 1990 RepString V2.0 was released
  151.                       - completely re-written
  152.                       - designed completely with ARP
  153.                       - ^C break capability added
  154.                       - line parsing improved with ARP
  155.                       - now RepString 2.0+ can be made RESIDENT
  156.                       - group file introduced for multiple
  157.                         executions from one command.
  158.                       - minor changes in CLI appearance
  159.                       - written in 100% assembly language
  160.  
  161.           May 18, 1988 RepString V1.0 was released
  162.                       - brand new, released to Compuserve and CRS
  163.                         and added to Fred Fish collection
  164.                       - Fred Fish disk #180
  165.  
  166. --------------------------------------------------------------------------
  167.  
  168.    If you discover ANY bugs in the program, or have any suggestions on
  169. how to improve it, feel free to send me E-mail.
  170.    Thanks to everybody who contacted me about RepString V1.0!!
  171.  
  172. Address - L. Bertato
  173.           P.O. Box 627
  174.           King City, Ontario
  175.           Canada L0G 1K0
  176.  
  177. CompuServe - 79246,1744
  178.  
  179. Canada Remote Systems - (Amiga Conference) LUCIANO BERTATO
  180.  
  181. No modem?? Get one. I strongly recommend it. It will connect your
  182. computer to the rest of the computing world.
  183.  
  184. --------------------------------------------------------------------------
  185. Enjoy........
  186.  
  187.