WPC` 2B ZR X#|HHP DeskJet PlusHPDESPLU.PRSH6X@,;xX,P0!JX@+?HHH,H6X@,;X@?xxx,[x6X@8;X@?,]6X@9;X@T?<<<,-C;<6X@8;X@2;8s^Courier 16.67cpiCourier 10cpiCourier 5cpiCourier 20cpiUSOZ 3'3'Standard6&6&StandardJet Plus :T+۰   X` hp x (#%'0*,.8135@8: [opts] [] [opts] uuwhere: uu: : $optsO .8are sets of options that can be specified." uu: : $8is the name of the source file. This file holds the data that is to be reformatted." uu: : $8is the name of the file to which the reformatted data will be sent." uu: : $[] .8All parameters enclosed within square brackets are optional." As you can see, the only parameter that has to be included is the source file name. If the destination file name is not specified, then the source file is overwritten with the reformatted data. The options let you control how the reformatting is to be done. If an option is not specified on the command line, then a default value will be used for that option. In some cases, the default can be specified by Amiga environmental variables. The following four notes relate to how options are specified on the command line. NOTES:uu: : $The order of options on the command line is not important.": uu: : $The option letters are shown in lower case letters below. They can be entered in either UPPER or LOWER case letters.": uu: : $Some options may be followed by some data relating to that option (Eg. A Number). The option and the data may be separated by an equal sign (=). The equal sign is shown below within square brackets to show that it is optional. Do not type in the square brackets in any case.": uu: : $Options can be strung together in one command line parameter. For example:": uu: : $ .8©ntANNKspecifies both options n and t"N uu: : $ .8©ntANNKalso specifies options n and t"N uu: : $ .8©nti=3Aspecifies options n, t and i. The i option uses the data 3." uu: : $If an option is followed by data, that option must be the last option specified in the command line parameter.": The next section describes all the options that can be specified on the command line. uu©i[=]"u uu: : $This option specifies what number of characters the tabs represent in the source file. The number can be in the range of 0 to 32767. If i=0 is specified, then the following happens.": uu: : $ .Retab will replace strings of white space with tab characters. Any existing tab characters in the source file represent a size as specified by the o option.M uu: : $ .If i=0 and o=0, then no retabbing will occur.M uu: : $ .If this option is not specified on the command line, then retab will try to obtain this value by examining the number inside the environmental variable 'ReTabInTab'. If this environmental variable does not exist, or it does not contain a valid numerical string, or the n option is specified, then the default value of 8 is used."  uu©o[=]"u uu: : $This option specifies what number of characters the tabs will represent in the destination file. The number can be in the range of 0 to 32767. If o=0 is specified, the following happens.": uu: : $ .Retab will expand all tabs in the source file into the relevantP-F1.. number of spaces in the destination file.M uu: : $ .If this option is not specified on the command line, then retab will try to obtain this value by examining the number inside the environmental variable 'ReTabOutTab'. If this environmental variable does not exist, or if it does not contain a valid numerical string, or the n option is specified, then the default value of 0 is used." uu©t"u uu: : $This option will trim all lines of any trailing spaces and/or tabs as it reformats it. That is, the line will end at the last visible character. This option will also be active if the environmental variable 'ReTabTrim' exists and the n option is not specified. It does not matter what ReTabTrim contains.": huu©p[[=]]"u uu: : $In some cases you might want spaces and tabs that are enclosed within a certain character, not to be reformatted. This will be especially true of strings within language source files.": uu: : $Example: (Say a variant of BASIC)": uu: : $ .PHONE1$ = 'J. Smith 8765432'" uu: : $ .PHONE2$ = 'S. Jackson 7654321'" uu: : $ .In this example, you do not want to reformat any tabs or spaces between the character ' hence, in the command line you would specify (do not include the <> characters)." uu: : $If there are an odd number of on the line, then all of the tabs and spaces after the last to the end of the line are protected. Trimming though will still occur if the t option is specified.": uu: : $If p is placed on the command line without a then the default character " (double quote) is used.": uu: : $If the p option is not specified on the command line, then (if the n option is not specified) retab will see if the environmental variable 'ReTabProtect' exists. If so, the protect feature will be active and the protect character will be the first character in the string contained in the environmental variable. A double quote character will be used if it holds a Null string.": h uu©c"u uu: : $This option is very similar to the p=" option but it is used for reformatting C source files. Like p=", it will protect all spaces and tabs between double quote characters, but with the following three differences.": uu: : $ .It will detect C escaped double quotes, (that is, \") and it will not consider these as protect characters.M uu: : $ .It will not consider any double quote characters that are within C comment fields to be protect characters.M uu: : $ .C++ type comments (//) are also recognized and treated similarly." uu: : $ .Always use this option if you are reformatting C or C++ source files." uu: : $This option will also be active if the environmental variable 'ReTabCQuote' exists and the n option is not specified. It does not matter what ReTabCQuote contains.": uuũn"u uu: : $If this option is specified, it will disable retab from checking for environmental variables if an option is not specified on the command line. The inbuilt default will be used for all options not specified.": 'F1..Ԍuuũl[=]"u uu: : $This specifies the maximum length line the source file can have within it. If a line in the source file is longer than this, the task will abort the retab operation and print a message showing which line number was too long. This feature will probably help you if you inadvertently retab a binary file. It also is used internally in the program to determine how much memory is needed. The value specified must be in the range 0 to 32767. If this option is not specified on the command line, a default value of 256 is used.":  uu? uu: : $This option prints a help message to the standard output file (normally the screen). This message summarises what retab does and how it is used. It briefly describes all the options. The message will also display the programs release number.":  ? 3uuTHE ENVIRONMENTAL VARIABLES"u There are 5 environmental variables which can be set up to specify what actions the process retab should take if the relevant options are not on the command line. In effect, these environmental variables specify new defaults. The n option forces the program to ignore all environmental variables and use the inbuilt defaults. The use of the environmental variables is covered in the previous section, but they will be summarised below. uu ReTabInTab .8(i option)"u uuThis environmental variable defines the default size of tabs in the source file. It must contain a numerical ascii string in the range 0 to 32767."u uu ReTabOutTab .8(o option)"u uuThis environmental variable defines the default size of tabs in the destination file. It must contain a numerical ascii string in the range 0 to 32767."u uu ReTabTrim .8(t option)"u uuIf this environmental variable exists, then all lines will be trimmed of trailing spaces and tabs. The contents of ReTabTrim are ignored."u uu ReTabProtect .8(p option)"u uuThe first character within this environmental variable is the protect character to be used. If it does not contain any characters, a double quote character (") is used. All spaces and tabs enclosed within the protect character are not reformatted."u uu ReTabCQuote .8(c option)"u uuIf this environmental variable exists, all spaces and tabs enclosed within double quote characters (") will not be reformatted. Double quote characters are not considered as protect characters in the following two instances. A C escaped double quote character (\") is not considered one of the protect characters. Double quotes within C comment fields are not considered as protect characters."u#F1..  ? 4uuUSAGE EXAMPLES"u uuThe following examples demonstrate the usage of the task retab. a)uuIf you have a file called 'mysrc' that in which tabs represent 3 spaces and you want them to represent 8 spaces:"u uu: : $retab mysrc i=3 o=8 b)uuIf you want to also trim all lines of trailing spaces and tabs:"u uu: : $retab i=3 o=8 mysrc t uuNote that the position of options in the command line do not matter"u c)uuYou may always want to trim all lines. To save you from always having to type in the option t, you may specify it with its environmental variable."u uu: : $set ReTabTrim 1 uu: : $retab i=3 mysrc o=8 uu: : $retab i=3 yoursrc o=8 uuIt does not matter what data the environmental variable ReTabTrim contains."u d)uuYou may want to leave the file 'mysrc' unchanged but create a new file, 'newdest', which has the new format."u uu: : $retab mysrc newdest i=3 o=8": e)uuIf the new file is to have all the tab characters replaced by spaces:"u uu: : $retab i=3 mysrc o=0 spacdest uuOnce again, note that the position of the options in the command line do not matter."u f)uuIf you want to replace spaces in a file with tabs (you may find it easier to edit the file this way):"u uu: : $retab i=0 spacesrc o=4 tabdest uuThe file 'tabdest' will have as many spaces as allowable replaced with tabs that represent a size of four characters."u g)uuYou may need to do this for a lot of files. In this case it would be easier to set up some environmental variables. You may also want to trim the lines of some of these files."u uu: : $set ReTabInTab 0 uu: : $set ReTabOutTab 4 uu: : $set ReTabTrim uu: : $retab spac1src tab1dest uu: : $retab spac2src tab2dest uu: : $retab spac3src tab3dest uu: : $retab i=3 tab1src o=0 spac1dest uu: : $retab i=3 tab2src spac2dest n": uuThe second last line in the above examples, show how the command line options will overruleP-F1.. environmental variables. File spac1dest will have no tabs within it. The last line shows the action of the n option. File 'spac2dest' will not have any of its lines trimmed. It will also have all its tabs replaced by spaces as that is the inbuilt default."u h)uuC programmers should always reformat their C or C++ source files with the c option."u uu: : $retab i=3 csrc.c co=8 cdest.c uu: : $ .or uu: : $set ReTabCQuote 1 uu: : $retab i=3 csrc.c o=8 cdest.c uu: : $retab i=3 o=8 cplussrc.cp cplusdest.cp": i)uuSome other files may use other characters to mark strings or other data. An example are the Lattice LMK files (makefiles). They use the character < to enclose data."u uu: : $retab i=0 makesrc o=8 makedest p=< j)uuIf you have a file that has very long lines in it, say up to 10000 characters, you will have to use the l option."u uu: : $retab i=3 longsrc o=8 longdest l=10001 uuDo not make the l value too large or retab may not be able to run as it may not be able to get enough memory for its internal work areas. In this case you will get the message,"u uu: : $'Could not obtain the required memory!' uuand it will not perform the retabbing operation."u xk)uuIf you have files with tab characters representing a size of 3 characters, you could develop a special 'type' command for these files."u uu: : $alias mytype retab i=3 o=8 [] * uu: : $mytype x l)uuRetab can be used to trim all lines of trailing spaces and tabs without any retabbing of tabs within a file."u uu: : $retab i0 o0 t srcfile": @F1..  ? 5uuTECHNICAL INFORMATION"u This section presents some technical information about how the task works. The Retabbing Retab identifies space/tab groups. Space/tab groups are sets of consecutative characters that are either space or tab characters. Space/tab groups can not cross line boundaries. If the i option <> 0 uuThe spaces and tabs within a space/tab group will be reformatted if that space/tab group contains at least one tab character. Otherwise the spaces in the space/tab group will not be retabbed."u If the i option = 0 uuAs in the previous case, spaces and tabs within a space/tab group will be reformatted if that space/tab group contains at least one tab character. All tab characters represent a tab size as specified by the o option."u uuIf there are only spaces in the space/tab group, it will still be reformatted if the group covers at least one tab division on the line. A line is divided into tab divisions. The o option specifies the size of these divisions. For example, on a line:"u uu: : $If o=3,": uu: : $ .characters 1 to 3ANNK 1st tab division" uu: : $ .characters 4 to 6ANNK 2nd tab division" uu: : $ .characters 7 to 9ANNK 3rd tab division" uu: : $ .8etc. uu: : $If o=8,": uu: : $ .characters 1 to 8ANNK 1st tab division" uu: : $ .characters 9 to 16ANNK 2nd tab division" uu: : $ .characters 17 to 24NNKU 3rd tab division" uu: : $ .8Aetc. uuIf i=0 and o=0 then tab divisions are undefined as no retabbing takes place."u uuNote:: : $If the i option does not equal 0, then the i option specifies the tab division size in the source file and the o option specifies the tab division size in the destination file.M: hTemporary files and multitasking. If the retab is started with no destination file in the command line (ie, source file will be overwritten), retab will create a temporary file in which it places the reformatted data. In this case, if the retabbing was successful, then the source file is deleted and the temporary file is renamed to the name of the source file. This temporary file will always be created in the same directory as the source file. It will have the name: uuretab_xx.tmp"u uuxx is a number between 00 and 99"u Retab will always ensure that it does not overwrite an existing temporary file. This allows retab to be made resident and more that one copy of it can run simultaneously. Retab is a pure process! If for any reason retab is aborted, then you may have to purge the directory of any retab temporary files. Note:uuMultitasking is not relevant in MSDOS version of retab."u hCommand line parameters Some notes about command line parameters.P-F1..ԌuuFor the i, o, and l options, white space may be placed between the option and the option data. If the equal sign is used (=), then it must immediately follow the option letter."u uuFor the p option, no white space can exist between the option letter and the option data."u uuIf a file name contains white space, enclose it within double quotes."u uuIf a file name begins with a dash (), then the file will have to be renamed as retab cannot accept a file name beginning with a dash."u F1..  ? 6uuSHAREWARE AND OTHER STUFF"u Four files should be included within this package: uuretab: : $ .The executable process." uuretab.docO .This documentation in ascii format." uuretab.wpf .This documentation in WordPerfect format. (Amiga version 4.1)" uuretab.hst .Release/history information about this task. In ascii format." No ancillary files are required when running retab. This is shareware and the normal shareware rules apply. If you find this program useful you owe me. Say $20 (AUS). Send cheques payable to an Australian Bank to my address: uu: : $ .Paul Klink" uu: : $ .PO. Box 169" uu: : $ .WooriYallock 3139" uu: : $ .Australia" I'm interested in any feedback. Especially of bugs. If you find any bugs, and want an immediate update, I'll try my best to fix them as soon as possible and send you out an update BUT you will have to have registered plus send $7 for disk and postage. If you are interested in the source files, write to me and I will think about it. uu: : $HAVE FUN