Mail Archives: djgpp-workers/1996/10/17/14:03:26
Hi Eli:
>> So if better if all the files are UNIX. That's the same for info.exe and
>> the files are little smaller in this way, so I don't see any reason to
>> distribute some files in DOS format.
>Please don't do that. Info.exe can read both DOS- and Unix-style files,
>both compressed and uncompressed, so why shouldn't your Info reader do the
>same? It is so simple! Previous versions of info.exe indeed required
>Unix-style files, but this produced a flood of FAQs (the FAQ list still
>includes an answer to such a question in section 6.8; that problem was
>solved in the port of Texinfo 3.6). Making Info files Unix-style only
>means that if anybody touches such a file with a DOS editor, they
>immediately have a file that will fail Info. It just doesn't make any
>sense to introduce such a limitation where a solution is so simple (less
>than 10 lines in the Info sources).
Actually my code automatically converts all the DOS files to UNIX, first ask
to the operator if he wants that. Is NOT the same, I use the binary mode for
the files becase is:
a) Much more fast.
b) Much more safe, I tried with text mode but is imposible, soon or later some
thing fails in the seek routines, I'm not making any pointer arithmetic, I'm
just storing values returned by ftell and then using it with fseek, that's
works the major part of the time but not ever. My task uses a lot of seeks and
I tried with at least 20 .inf files, and some of them have problems. If I use
binary mode the pointers in the .inf file only works if the file don't have
CR+LF, so if I use binary mode the file MUST be in UNIX.
If somebody touchs one of the .inf files with a DOS editor is crazy because
that isn't the way to modify the file, you destroy can mess the pointers of the
indirect table!!!, the right way is modify the SOURCES not the .infs, if the
same that somebody trys to modify an EXE, that's isn't the way. Anyways if
somebody loads the .inf file and your editor converts it to DOS my routines
will ask to this person if want to convert it again to UNIX, so that's isn't
any problem.
My problem is with the compressed files, I CAN'T uncompress, convert and
compress again in a totally safe way!!.
>> b) My routines calls to the decompressor using system(), and I saw that
>> after 10 or 12 calls part of my memory is corrupted.
>The version of `system' in the stock v2.0 libc has a bug: it loses
>handles when you use redirection in the command you invoke. v2.01
>corrects this bug. A patch is available from the DJGPP bug-tracking
>system, in case you cannot wait for v2.01.
Thanks I'll try to see if that's cure my problem, actually I'm using
redirection to uncompress the file.
SET.
********************************************************************************
Salvador Eduardo Tropea (SET) - salvador AT inti DOT edu DOT ar
Work: INTI (National Institute of Industrial Technology) Sector: ICE
(Electronic Control & Instrumentation)
Post (Home): Curapaligue 2124 - Caseros (1678)- Buenos Aires - Argentina
- Raw text -