This is a port of Free Recode 3.5 to MSDOS/DJGPP. 1.: DJGPP specific changes. ======================= - Changes needed for NLS support with DJGPP. - Extensive changes in the docs. Added indexing for all command-line options and all supported charsets. - Changes in the test suite to make it work on DOS/Windows with DJGPP tools. Thanks to Eli Zaretskii for contributing the patch for docs and test suite changes. Thanks to Daniel Taupin for contributing a patch for html.c to fixing a bug when attempting to code undefined codes in the form "✏". All changes I have done against the original GNU distribution are documented in the diffs file stored in the contrib subdir of the source package. 2.: Installing the binary package. ============================== 2.1.: Copy the binary distribution into the top DJGPP installation directory. If you are installing Recode on a dual DOS/WINDOWS 9X systems, you should first turn off the generation of numeric tails for 8.3 aliases Windows creats for long file names. For information about how to do this, please read the DJGPP FAQ List V 2.30, chapter 22.19: "How to Set Up a Dual DOS/Windows Installation". Please note that you **MUST** turn off the numeric tail generation for short file names during installation of the binary package if you want to use Recode on both DOS window on Win9X **AND** plain DOS. If this is not done Recode will **NOT** be able to find the .mo files (the catalog files containing the translated strings) on plain DOS. After the installation has been finished you can turn on numeric tail generation again if you like. 2.2.: Copy the binary distribution into the top DJGPP installation directory and unzip it running *ONE* of the following commands: unzip32 rcode35b.zip or djtarx rcode35b.zip or pkunzip -d rcode35b.zip 2.3.: Edit the djgpp.env file which is located in the top DJGPP installation directory. Move to the global part of your djgpp.env and add the following lines: +LANG=xx +LANGUAGE=yy:zz The lines must be completely shifted to the left in your djgpp.env file. Please note the plus sign at the beginning of the lines. This plus sign allows you to overwrite the contain of the environment variable at the command line or from inside a batch file or shell script. The plus sign should **NOT** be omited or a lot of shell scripts, in this and in other packages, that try to reset this value will stop working. The LANG entry is obligatory, the LANGUAGE entry may be omited. The LANGUAGE variable allows you to select an alternate catalog than the one stipulated by LANG but the LANG variable *ALWAYS* determines the the DOS codepage to be used to display the translations and can not be omited or no tarnslations will be perfomed at all. Replace xx, yy and zz by the language code of the catalogs you want to use. Some examples: If you only want to use the catalog containig the translations for your mother tongue (in my case the spanish translations) the above lines will only use the LANG variable and will look like this: +LANG=es If you want to use the spanish (es) and german (de) catalogs the above lines will look like this: +LANG=es +LANGUAGE=es:de In this case a DJGPP binary that has been compiled with NLS support will first search for the spanish translations. If this translations can not be found it will search for the german translations and if this can also not been found it will default to the build-in english messages. If you want to reverse this search order the above lines would look like this one: +LANG=es +LANGUAGE=de:es Please note that if you omit the LANG environment variable, the LANGUAGE variable will not be honuored at all. The LANG varaiable must always be set to your default catalog. With the aid of LANGUAGE you can select other catalogs apart of the default one. If for some reason you want to disable NLS, then you should comment out the LANG variable or select 'C' (uppercase `c' character) as your catalog: +LANG=C Users not familiar with djgpp.env should refer to kb.info. This document can be read running the command: info -f kb -n DJGPP.ENV 2.4.: To create an entry for the recode info docs in your dir file, run from the top DJGPP installation directory the command: install-info --info-dir=./info ./info/recode.info 2.5.: The binaries distributed in this package have NLS support. I.E. run the command: recode and the binary should talk to you in your mother tonge, if supported. For futher information about Free Recode please read the info docs. 3.: Building the binaries from sources. =================================== 3.1.: To build the binaries you will need the following binary packages: djdev203.zip (NOT a prior version) bsh203b.zip (NOT a prior version) gcc2952b.zip, bnu2951b.zip, mak3791b.zip, fil316b.zip, shl112b.zip, txt20b.zip, txi40b.zip, grep24b.zip, sed302b.zip, gtxt037b.zip, licv161b.zip If you want to run the check you will need also: dif272b.zip, m4-14b.zip and perl552b.zip. All this packages can be found in the v2gnu directory of any Simtel.NET mirror. You will need bsh203b.zip and *NOT* a prior version or the build will fail. The same applies to djdev203.zip. You *MUST* use the updated version of fil316b.zip (date: 2000-05-30) and shl112b.zip (date: 2000-08-11). This updated versions have been recompiled with djdev203.zip and know about the "/dev/env" functionality introduced with djdev203.zip. All the other packages are the ones I have used to build the binaries from this sources. Previuos versions of this packages may do the job as well but I have not tested this. 3.2.: Create a temporary directory. Copy the source package: rcode35s.zip into the directory and unzip it runnig ONE of the following commands: unzip32 rcode35s.zip or djtarx rcode35s.zip or pkunzip -d rcode35s.zip 3.3.: This package is preconfigured for NLS support and djdev203. This implies that you *MUST* install the GNU gettext library (gtxt037b.zip) *AND* the libiconv library (licv161b.zip) or later if you want to reconfigure and recompile this package. Of course, this must be done *BEFORE* reconfiguring and recompiling the package. The configuration batch file of this package, located in the djgpp directory, allows you to enable or disable NLS support and to compile from a different partition than from where the sources are located. config.bat always configures the package for NLS support enabled and for in place compilation if no options are given. The available NLS options are: NLS no-NLS If for some reason you want no NLS support you will have to reconfigure the package. For this purpose cd into the top srcdir (recode-3.5) and run the following commands: make distclean contrib\configdj no-NLS Please note that you *MUST* use the "distclean" option or the config.cache file will *NOT* be deleted. In this case you are *NOT* reconfiguring because the configuration informations is read from the cache file instead of being newly computed. You *MUST* specify "no-NLS" or config.bat will default to the "NLS" option. To build the programs in a directory other than where the sources are, you must add the parameter that specifies the source directory, e.g: x:\src\gnu\recode-3.5\contrib\configdj x:/src/gnu/recode-3.5 no-NLS Lets assume you want to build the binaries in a directory placed on a different drive (z:\build in this case) from where the sources are, then you will run the following commands: z: md \build cd \build x:\src\gnu\recode-3.5\contrib\configdj x:/src/gnu/recode-3.5 no-NLS If you want NLS support you will omit the "no-NLS" option or replace it by the "NLS" option in the above examples. The order of the NLS option and the srcdir option does *NOT* matter. You *MUST* use forward slashes to specify the source directory. The batch file will set some environment variables, make MSDOS specific modifications to the Makefile.ins and supply all other needed options to the configure script. If NLS support is wanted the batch file will check if libiconv.a, libintl.a, msgfmt.exe and xgettext.exe are installed. If one of the above items is missed the batch file will automatically default to configure the package without NLS support. 3.4.: To compile the package run from the top srcdir the command: make 3.5.: Now you can run the tests if you like. From the top srcdir run the command: make check Non test should fail. 3.6.: To install the binaries, header, library, catalogs, and info docs run the following command from the top srcdir: make install CATALOGS="xx.gmo yy.gmo zz.gmo" This will install the products into your DJGPP installation tree given by the default prefix "/dev/env/DJDIR". If you prefer to install them into some other directory you will have to set prefix to the appropiate value. Replace xx, yy and zz by the language codes of the catalogs you want to install. Example: make install CATALOGS="xx.gmo yy.gmo zz.gmo" prefix=z:/some/other/dir 3.7.: Now you have to set the LANG and LANGUAGE environment variable. Please refer to 2.3. Send recode specific bug reports to . Send suggestions and bug reports concerning the DJGPP port to comp.os.msdos.djgpp or . Enjoy. Guerrero, Juan Manuel