home *** CD-ROM | disk | FTP | other *** search
-
-
- Text-Wandler V3.9
- <><><><><><X><><><><>
- © 1992-1995 by Kai Seidel
-
-
- Introduction:
- *************
-
- Beside my Amiga, I have a PC for the work with my mailbox programs & texts.
- Therefore it is annoying that the Amiga ASCII-table does not correspond
- with the IBM-table.The texts of the Amiga are (almost) not readable on a
- MS-DOS compatible. For that reason, I decided to write a text converter
- which converts the texts between both of the ASCII-formats. Equally, the
- different end of the lines between PC and Amiga is a problem. The Amiga
- uses a $0a (=linefeed) and the PC a $0d0a (=carriage return + linefeed) for
- the end of line.
-
-
- The Program:
- ************
-
- My program solves this problem. It is completely written in assembler and
- consequently uses the FULL speed of the computer. There will always be
- loaded 16KByte (=16384 Bytes) from the text file which is to be converted,
- translated and saved under the new name again. However, there will not be
- only allocated 16KByte memory by the program. Approximately 80 KByte of
- RAM-storage should be free altogether. (Almost?) Every typing error will
- be caught.
- In order to attain a rather high speed, 8 routines separated from each
- other were integrated, two for the conversion of texts between PC and
- Amiga, another two for the conversion of texts between Amiga and Atari, one
- for the conversion into normal ASCII-characters (Ä=Ae), one for the removal
- of unused spaces and tabs, one for the removal of inconvenient ANSI-
- sequences and one for the use of an own conversion table. Three complete
- ASCII-tables which make it possible without problems to translate other
- characters like >ÄÖÜäöoß< as well are also included in the program.
- The program possesses a STARTUP-code for the version 2.0 and higher. Since
- that it can be used from both the CLI/SHELL and the Workbench!
-
- The program converts since version 1.4 the following special characters:
-
- ÄÖÜäöüߢ£¡¤¥§ª«¬°±²µ¶º»¼½¿ÅÆÇÉÑàáâåæçèéêëìíîïñòóôøúûÿ
-
- Those characters are transferred correctly in both conversion-directions.
- Unfortunately, these are the only special characters, which are available
- in both, the MS-DOS- and the AMIGA-ASCII-table.
-
- During the process of converting, the current position of the text-position
- is displayed.
-
-
- System requirements:
- ********************
-
- Actually none. The text-converter should be able to run with every
- configuration. One requirement is certainly kickstart 1.2 or higher!
-
- Kickstart/WB 2.x (Intuition/Gadtools V37 or higher):
- >ASL.LIBRARY< is required for the file requester. These MUST be found in
- the "LIBS:" directory of the boot disk.
-
- Kickstart/WB 1.2/1.3:
-
- >REQ.LIBRARY< is required for the file requester. If it is not found in
- the LIBS: directory, you should look on the fish-disks. Before the
- start, this library must be copied into the LIBS: directory of the
- workbench disk or the boot partition!
-
-
- Installation:
- *************
-
- Copy the files
-
- Text-Wandler
- and Text-Wandler.info
-
- into any directory and start the program from CLI/SHELL or Workbench.
-
-
- WORKBENCH-Start:
- ****************
-
- By clicking the text-converter-icon twice, you start the text-converter
- with the intuition-interface (in Workbench-mode).
-
- According to your kickstart/workbench version, the text-converter opens
- different screens and windows.
-
- The use under kickstart/workbench 1.2/1.3:
- ******************************************
-
- The shareware-version opens an info-window at first. The window disappears
- by clicking its CLOSE-Gadget (=Close-lever) once.
- Now the actual text-converter window appears with the following gadgets:
-
- - Get Source
-
- If you click on this gadget, the file requester of the Req.library
- opens. Now, with its help, you can choose comfortably by mouse the text
- that is to be converted.
-
- - Gadget right of >Get Source<
-
- This is a so called string-gadget. If you choosed the text-data with
- the help of the file requester, the complete file name and the path
- appears here. You can also use your keyboard by clicking on the gadget
- and type in the name of the file directly.
-
- - Get Destination
-
- Here you can choose again the data name of the completely converted file
- with the help of the file requester.
-
- - Gadget right of >Get Destination<
-
- Here again the appertaining string-gadget for the target-data-name +
- path
-
- - Get trans table
-
- If this gadget is clicked, the file requester of the Req.library.
- opens. With its help, you choose the conversion-table (more information
- will be given later).
-
- - Gadget right of >Get trans table<
-
- Here again the appertaining string-gadget for the table-name with path
-
- - Gadget right of >Mode<
-
- Here you can choose the mode to convert the text with.
-
- - OK and STOP
-
- When source, destination text and table is defined you can start the
- conversion by clicking this gadget. While converting the OK-gadget will
- change into STOP. You finally can stop the conversion by clicking the
- STOP-gadget.
-
- Next to >Position:< the actual converting-position will be displayed.
-
- If errors occur they will be shown at >Status<.
-
-
- The use under Kickstart/Workbench 2.x
- *************************************
- The Text-Wandler opens an own screen by using the actual screenmode and a
- window in which the gadgets and file requesters will be displayed. The
- shareware-version first opens an info-window. This window can be closed by
- clicking the "CONTINUE" gadget.
-
- The window consists of the following gadgets:
-
- - Select Source (hotkey 'S')
-
- By clicking this gadget a req.library file requester will be opened.
- Now you can choose the text to be converted.
-
- - Gadget under >Sourcefile< (hotkey 'O')
-
- This is a string-gadget. If you choose the text by the file requester
- the filename with the path will be displayed. You can also type the
- name of the textfile into this gadget without using the file requester.
- The cursor appears if you click on it.
-
- - Select Destination (hotkey 'D')
-
- Here you can choose the destination filename by using the file
- requester.
-
- - Gadget under >Destinationfile< (hotkey 'E')
-
- The filename of the destination file will be shown and can be fitted.
- The source text will be converted later to this filename.
-
- - Select Table (hotkey 'T')
-
- Is this gadget clicked, a file requester appears and asks you for the
- filename of the table.
-
- - Gadget under >Translation Table< (hotkey 'R')
-
- Here again the string-gadget for the filename.
- If Mode isn't 'Use translation table', this gadget and the gadget for
- choosing files by the filerequester will be disabled.
-
- - Gadget under >Mode< (hotkey 'M')
-
- Here you can choose the mode to convert the text with.
-
- - Start/Stop (hotkey 'A')
-
- When source, destination and table filenames are fitted, you can start
- the conversion by clicking this gadget. While operating you can abort
- the conversion by clicking this gadget again.
-
- You can select gadgets by using their hotkeys!
-
- Next to >Position:< the actual text-position will be displayed.
-
- Are there any errors, a message will be displayed at >Status<.
-
- To quit the program click on the close-gadget. The settings like mode,
- file-paths & names will be stored in the ENV:-path. The created file
- called "tw.tmp" will be reloaded when beeing started next time. If you
- make a reset to the computer, the settings will be lost, too.
- To provide that the settings-file will be deleted, copy the file from the
- ENV:-path to the ENVARC:-path.
-
-
-
- CLI/SHELL-Usage:
- ****************
-
- Text-Wandler [-i/-a/-m/-t/-s/-c/-u/-r/-z]
- [-o] [-n] <sourcefile> <destfile> [table]
-
- <> arguments
- [] options
-
-
- Arguments:
- **********
-
- The arguments <sourcefile> and <destfile> MUST be given or an error message
- will be the result. The sequence of giving the filenames must be right,
- too.
-
- When there are spaces in the filename they must be set in quotation marks
- (see examples later).
-
- Additionally to that, instead of giving a destination filename, you can
- declare a path, in which the source file will be converted with the source
- filename.
-
- Options:
- ********
-
- Only one of the following nine options can be choosed:
-
- -i The text is given in Amiga-ASCII-format and is to be converted into
- MS-DOS-ASCII-format which includes special character conversion.
-
- -a The text is given in MS-DOS-ASCII-format and is to be converted into
- Amiga-ASCII-format.
-
- -t The text is given in Amiga-ASCII-format and is to be converted into
- Atari-ST-ASCII-format.
-
- -m The text is given in Atari-ST-ASCII-format and is to be converted into
- Amiga-ASCII-format.
-
- -s The text is either given in Amiga- or MS-DOS-ASCII-format. All
- unnecessary spaces or tabs at the end of lines will be deleted (take a
- look at the limitation of the shareware Version).
-
- -c Vowels i.e. "ÄÖÜ", will be translated into usual ASCII-characters
- "AeOeUe".
-
- -u The Text-Wandler uses the Workbench-Mode. That means a window is
- opened in which several options can be chosen by mouse.
-
- -r ANSI-Sequences will be deleted out of Amiga-texts by that.
-
- -z Uses an own table for conversion. If you use this option, you MUST
- give a third filename refering the translation table (take a look at
- the limitation of the shareware Version).
-
- If none of the listed options is chosen, the text is automatically
- converted into MS-DOS-ASCII-format.
-
- The last two options can be given if necessary:
-
- -o If the destination filename already exists, this option will cause no
- security check whether the file should be erased.
-
- -n Turns off the display of the current text-position while converting
- (saves time).
-
-
- Examples:
- *********
-
- For illustration some examples:
-
- 1. Text on disk in DF0: named "Test.txt" is in Amiga-ASCII-format and is
- to be converted into MS-DOS-ASCII-format. The converted text shall
- get the name "Hello.txt" and be laid into RAM:. Therefore the
- following usage is necessary:
-
- Text-Wandler -i DF0:Test.txt RAM:Hello.txt
-
- 2. Text on harddisk DH0: named "Happy Day.txt" is in Amiga-ASCII-format
- and is to be converted into MS-DOS-Format on Disk DF2: with the same
- name.
-
- Text-Wandler -i "DH0:Happy Day.txt" DF2:
-
- 3. Text on Disk in PC0: named "Read.txt" is in MS-DOS-Format and is to
- be converted into AMIGA-Format on harddisk WORK: with the name "Read
- Me.txt". A possibly existing file with the same name ("Read Me.txt")
- may be deleted.
-
- Text-Wandler -a-o PC0:Read.txt "WORK:Read Me.txt"
-
- 4. Text on RAM: named "Temp.txt" in Amiga- or MS-DOS-ASCII-format. The
- text was just edited and any existing spaces or tabs should be
- deleted. The converted file shall be named "RAM:Ready.txt". For
- speed up, the display of the current text-position should be
- suppressed.
-
- Text-Wandler -s-n RAM:Temp.txt RAM:Ready.txt
-
- 5. Text on disk DF2: named "Text-Wandler.DOC" in Amiga- or
- MS-DOS-ASCII-format possesses vowels. Those should be converted into
- normal characters to disk in DF1: named "TXTWND.DOC".
-
- Text-Wandler -c DF2:Text-Wandler.DOC DF1:TXTWND.DOC
-
- 6. You wish to start the Text-Wandler in workbench mode.
-
- Text-Wandler -u
-
- 7. A capture-file (e.g. from JRComm) consists of annoying ANSI-sequences,
- which are to be deleted. The file is named "DF1:Example.CAP" and
- shall be converted to RAM:
-
- Text-Wandler -r DF1:Example.CAP RAM:
-
- 8. A text shall be converted by an own defined table. The table is named
- "t:Tab.tab". The text to be converted is on RAM: and named "Hello Mr
- XYZ". The converted text shall be on T: with the name
- "Happy_Day.txt".
-
- Text-Wandler -z "RAM:Hello Mr XYZ" T:Happy_Day.TXT t:Tab.tab
-
-
- The conversion Table:
- *********************
-
- Here it is - the Text-Wandler version, many people have waited for!
- Version 3.0 and higher, now the Text-Wandler converts your texts by your
- own will.
-
- The CLI-option "-z" and the conversion-mode "Use conversion table" need a
- so called translation-table. This has got the following structure:
-
- "abc"="def"; /* converts "abc" to "def" */
- 34,"Hello",34="Hi"; // "Hello" is converted into "Hi"
- $0a=$0d,$0a; /* The Amiga-Linefeed will be replaced by
- a MS-DOS carriage return and linefeed */
- .....
- .
- .
- etc.
-
- There may be strings, hex- and decimal-numbers given. Strings must be set
- in quotation marks and hex-numbers need a "$" before the number is given.
-
- The "=" character divides the sequence that shall be converted. At the end
- of a declaration a semicolon ";" is needed.
-
- Comments are also possible. Either normal C or C++ comments may be given.
- Normal C comments begin with "/*" and end with "*/". C++ comments begin
- with "//" and end with the end of a line.
-
- For better understanding some examples:
-
- - The character "a" shall be converted to an "A". Therefore more
- combinations can be given:
-
- $61=$41;
- or
- "a"="A";
- or
- 97=$41;
- etc.
-
- - The characters "-" and "+" shall be exchanged:
-
- $2B=$2D;
- $2D=$2B;
- or
- "-"="+";
- "+"="-";
- ect.
-
- - All spaces shall be replaced by a "_":
-
- $20=$5f;
- or
- 32="_";
-
- - Every "!" shall be deleted:
-
- "!"=;
-
- You can generate your own ASCII-character set!
-
-
- Error messages:
- ***************
-
- For the following problems/errors there are messages:
-
- - No input is given
- - Wrong/No option(s) is(/are) given
- - No filename or none given
- - Source- or destination-filename are equal *)
- - Source-file does not exist
- - Destination-file already exists
- - Destination-path not allowed
- - Not enough free memory
- - Error while reading/writing from/to source-/destination-file
- - Incorrect line in table will be displayed
-
- Attention !!! The marked "*)" error messages will be ignored by
- using the Workbench-mode!
-
-
- Hints for converting:
- *********************
-
- If you convert large texts, it will be expedient to copy them to RAM,
- because the text will be read faster from RAM than from disk or harddisk.
-
- All switches can be set on any position. Only the succession of source-,
- destination- and table-filename must be given !
-
-
- Known bugs:
- ***********
-
- None! Most bugs always appear if you don't need them!
-
- I always try to remove bugs if they get known.
-
- If you find a bug, please let me know!
-
-
- Important information:
- **********************
-
- There is neither a guarantee for the 100% working capability of this
- program nor does the programmer take any responsibility for consequences
- that result of wrong commands or the general usage of the program. You use
- this software on your own risk.
-
- Only use ASCII-text-files, or crashes can be the result.
-
-
- If errors appear:
- *****************
-
- Please send a message with a complete error-report to the following address:
-
- Kai Seidel
- Traunsteiner Str. 19
- 83355 Grabenstaett
- GERMANY
-
- or via EMail: +49 (0)8661-8104 (24h online; 1200-33600 baud)
-
- Or if even you have ideas to be installed into Text-Wandler write to that
- address!
-
- I'm also reachable via Zerberus-Net: SYSOP@CHIEMGAU.zer.sub.org or
- INTERNET : mail061@fh-rosenheim.de
-
- Restrictions of the shareware version:
- **************************************
-
- The space and tab deleting routine only can convert Amiga-ASCII-texts and
- only spaces will be deleted! The "ß" won't be converted by the "-c"
- option.
-
- If you start Text-Wandler in Workbench-mode, a nerv-requester appears that
- won't be displayed in the registered version.
-
- The "ANSI-Remove"- and "Use translation table"-mode only can be used in
- Workbench-Mode.
-
- If you use your own table, only a length of 32 characters of the table is
- allowed. All following characters won't be read. This can cause an error
- message if you define a sequence that is longer than 32 characters. The
- following line will be read and the source-text be converted with:
-
- "ä"="ae";"ö"="oe";"ü"="ue";
-
- These are 28 characters. I think this will be enough for testing Text-
- Wandler !
-
- All these restrictions are removed in the registered version!
-
-
- Shareware fee:
- **************
-
- If you like this program or use it regularly, please pay 10 US Dollar or
- any equal amount in your currency.
- For registration use the "Registration.TXT". Print it and send it filled
- out back to me. If you are not able to print out the registration form,
- write your address, telephone number, computer- configuration and your way
- of paying to a sheet of paper and send it to the address listed in the
- registration form. For bank transfer use the bank information also listed
- in the registration form.
-
-
- As a registered user of Text-Wandler, you're then entitled to own the
- newest, registered version!
-
-
- Copyright information:
- **********************
-
- Shareware version:
-
- The Program may only be copied with this manual and the registration
- form. The manufacturing-/copy-fee mustn't be greater than 4 US Dollar!
- The package may be adapted by any PD-groups ,e.g. FRED FISH.
-
- Registered version:
-
- The registered version mustn't be copied, rented or published or even be
- put on PD-Disks to be offered other people!
-
-
- The Req.Library is Copyright by Colin Fox and Bruce Dawson!
-
- The ReqTools.Library is Copyright by Nico François!
-
-
- Special Thanks:
- ***************
-
- ... to my brother Roger and to his friend Sebastian Schmucker for this
- translation and for correcting the documents!
-
- ... to Ralph Babel and Garry Glendown for helping me, when I had
- questions about programming.
-
- ... to Colin Fox and Bruce Dawson for their great req.library!
-
- ... to Nico François for his great ReqTools.library!
-
- ... to Commodore for this great machine, because ONLY AMIGA MAKES IT
- POSSIBLE !!!
-
-
- Development phases:
- *******************
-
- V1.0 First version from 04/25/92
- V1.1 Version from 05/01/92
- -supports filenames with spaces by using quotation marks
- -tests, if two equal filenames are given
- V1.2 Version from 07/03/92
- -big bug removed when converting to MS-DOS-ASCII-format
- -memory-allocation-routine shifted -> shorter conversion
- time
- -additional routines improved
- V1.2a Version from 07/06/92
- -wrong USAGE-Text corrected
- V1.3 Version from 07/11/92
- -conversion-puffer has been decreased to 16384 bytes
- -further conversion bug removed; carriage returns weren't
- converted correctly while translated into Amiga-ASCII-format
- -additional routines improved -> very short conversion times
- when converting from harddisk to harddisk
- -bug that prevent a correct running under Kickstart 1.2/1.3
- has been removed
- V1.4 Version from 07/21/92
- -additional special-characters are also converted
- V1.5 Version from 07/24/92
- -the chars "|" and "ª" were exchanged uncorrectly and, in version
- 1.4, corrected; very necessary if you convert c-sources!
- -if you give a directory instead a filename as a destination, the
- text will be converted to that directory with the source-name
- -security check added on a perhaps existing destination-file
- -new switch (-o) added; turns off the security check listed before;
- if there exists already a file with the same destination-name,
- it will be overwritten by the new one
- -the text will be converted to MS-DOS-ASCII-format if there is
- no switch given
- V1.6 Version from 08/11/92
- -shorter code because of better programmed routines
- -the Text-Wandler can be aborted now by pressing CTRL-C
- -the program displays now the actual byte-position while
- converting; the display can be turned off by using the "-n"
- switch
- -new routine added for deleting unused spaces and tabs at the end of
- a line
- V1.7 Version from 08/13/92
- -the first character of the source-text was ignored when
- converting to Amiga-ASCII-format
- -vowels are now converted to usual ASCII-characters, e.g.
- "ö" to "oe"
- V2.0 Version from 09/12/92
- -Workbench-mode added; you can control all functions via
- mouse now
- V2.1 Version from 09/23/92
- -If you convert to Amiga-ASCII-format the end of lines will be
- checked for a carriage return and a linefeed
- -Text-Wandler now can remove ANSI-sequences from any texts
- V2.2 Version from 11/22/92
- -when using Text-Wandler under Kickstart 1.x, the string-
- gadget didn't work correctly; removed that bug
- -conversion from Amiga- to Atari-ASCII-format added
- -version-string added; the version-number now can be displayed
- by using the "Version" command
- -the usage text will now stop being displayed after every 12
- lines and will wait until the return-key is pressed
- V2.2a Version from 11/30/92
- -more bugs corrected
- + the ANSI-remove-routine didn't work correctly
- + the security check didn't read the following return-key
- V2.3 Version from 12/06/92
- -the "STOP"-gadget had a bug; it caused a reset
- -too large ANSI-sequences weren't deleted
- V3.0 Version from 01/15/93
- -OS 2.x user interface added
- -Text-Wandler can now convert texts using your own conversion
- table
- -string-gadget-bug when using Kickstart 1.x corrected
- V3.1 Version from 02/22/93
- -The usage text now adapts on the height of the CLI-/Shell-
- window; if it is full it will wait for a return-key
- -when using the Workbench-mode, some conversion-routines
- were exchanged - now corrected
- V3.5 Version from 03/27/94 Programlength: 23132 (english version)
- 23576 (german version)
- -now there is a German and an English version
- -the translation table may now consist of decimal numbers
- and of strings
- -characters are no longer converted 1:1; definitions may
- now have any length
- V3.5 Version from 05/21/94 Programlength: 23500 (english version)
- 23948 (german version)
- -The "ß" was converted to "uz" instead of "sz" - Bug fixed
- -The CLI-Window is now switched into RAW-mode. This means that
- only one character can be read
- -If the CLI-Output is diverted to a file an existing destination
- file will be overwritten by a new one. This is for use the
- converter with a BBS System or else...
- V3.6 Version from 05/21/94 Programlength: 23500 (english version)
- 23948 (german verison)
- -The "ß" was converted to "us" instead of "sz" - Bug removed
- -The shell window is now switched into RAW-mode for reading
- single characters!
- -An existing destinationfile will be overwritten if the output-
- stream of text-wandler is divert into a file. Thats because
- of better use in BBS-systems.
- V3.7 Version from 10/09/94 Programlength: 23112 (english version)
- 23604 (german version)
- -The table-conversion-routine is much faster now !!!
- -Conversion bug removed
- V3.8 Version from 08/06/95 Programlength: 24244 (english version)
- 24732 (german version)
- -Settings will now be stored when leaving the program, and
- reloaded when starting up again
- -If you choosed files by the filerequester, always the last
- path was used; now all three filerequesters have their own
- last path
- -If you don't convert with your own table, the table-gadgets
- are disabled now
- V3.9 Version from 10/03/95 Programlength: 24424 (english version)
- 24928 (german version)
- -When choosing another conversion table using WB mode the
- table wasn't processed correctly - corrected now
- -Registered version: When using kick 1.3 the name of the
- registered person was written outside the window if the
- length has exceeded
- -The workbench mode has been added some more status texts
- -Kick 2.x and above wb mode: If the destination file
- exists a requester will be opened and a security check
- well be made to the user
- -Kick 2.x and above wb mode: If the destination path is
- a directory a requester opens and asks the user if the
- source filename should be used to be converted to the
- destination
- -The conversion Table will now be sorted in memory
- -A decimal '0' wasn't processed correctly using in the
- conversion table
- -The subroutine that gets the CLI window structure caused
- an error when running ENFORCER - now runs correct
-