home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff378.lzh
/
Adapt
/
adapt.doc
< prev
next >
Wrap
Text File
|
1990-10-10
|
5KB
|
125 lines
******************************************************************************
ADAPT
Version 2.2 by Lars Eggert in March 1990
******************************************************************************
About the program
-----------------
Ever had the problem that you had to use files stored on MS-DOS files with
your Amiga? You may have used CrossDOS or Dos2Dos to copy them to your Amiga
disks. This may solve the problem if you live in Britain or in the USA, but
not if you live in a country like Germany or France. If your language
contains special characters (the German ´umlauts´ äöüÄÖÜß for example) most
likely they are not transformed correctly by the programs I mentioned above.
This is where Adapt helps you. It reads a file and changes the MS-DOS codes
for the ´special characters´ to Amiga codes.
This version of Adapt can only handle German ´umlauts´ (simply because I am
German). Please feel free to change the source of Adapt so that it works with
your language. It is easy to do this, even if you are not an experienced
programmer. I will explain somewhere below how to do this.
Another feature of Adapt ist that it will convert any TAB´s to spaces, if you
want it to. This may be useful if you want to work with ´C´ source codes from
MS-DOS on your Amiga. For example, a friend of mine uses TAB sizes of eight
characters in his MS-DOS sources. If I would use them with my editor without
converting them I would get problems, because I use a TAB size of two.
How to use the Program
----------------------
ADAPT <source> <destination> [n]
Parameters: <source> Source file, the file we want to convert.
<destination> Destination file, here we want to store the
converted text.
[n] Number of spaces one TAB will have after converting.
This parameter is optional, if you leave it empty,
Adapt will not touch the TAB´s in your text.
NOTE: The processing of large files may take some time, although I tried to
make Adapt as fast as possible. Be patient!
How to change the source to work with your language
---------------------------------------------------
You will find this piece of code somewhere in the source:
switch(*from)
{
case 132: *(to++) = 'ä'; break;
case 148: *(to++) = 'ö'; break;
case 129: *(to++) = 'ü'; break;
.
.
.
default: *to++ = *from; break;
}
This is where we tell the program how to react on certain characters. Let´s
look at the first line:
case 132: *(to++) = 'ä'; break;
It says: "If you find a character with a code of 132 in the source, then
change it to an ´ä´ in the destination file."
The code of 132 is a MS-DOS ´ä´. If you want to change the program to work,
for example, with the ´è´ of the French language, you will have to look in the
documentation of your PC what code the ´è´ has. Let´s say this code is XYZ.
You will have to modify the program line so it looks like the following:
case XYZ: *(to++) = 'è'; break;
The general form of the line is:
case [MS-DOS CODE]: *(to++) = '[AMIGA CHARACTER]'; break;
Hope you understood my little explanation.
******************************************************************************
ADAPT is Public Domain. You may copy, swap or modify it as you like. Note
that you use this program at your own risk. I will not be liable for any
damage the usage of this program might do to your data. (It never did any
damage to my own files, but heaven knows...)
I would like to get comments and suggestions on how to improve the program.
If you have improved it already, I would appreciate if you would send me a
disk with your latest version.
Lars Eggert
Im Flutgraben 23
6337 Leun-Bissenberg
West Germany
Phone: 06473 / 1695
Hey, if you like to, you can send me some of your programs. But please do not
send any pirated software. I will use your disk for harddisk backups then.
******************************************************************************