Mail Archives: cygwin/2004/06/02/13:33:49
---559023410-1903590565-1086197614=:18478
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 2 Jun 2004, Gerrit P. Haase wrote:
> Hi Igor,
>
> > The line '0x00 0x0000 # NULL' (with or without whitespace between '#' and
> > 'NULL') appears in most of the mapping files (except roman.txt,
> > MacRoman.txt, and UTF-8.txt), not just cp125[012].txt -- just "grep NULL
> > *.txt". It doesn't seem to make much difference, but the three files you
> > listed above are in DOS (CRLF) format, roman.txt is in Mac (CR) format,
> > and the rest are in Unix (LF) format.
>
> > The error above can be reproduced by running "antiword -m <filename>",
> > where <filename> is a mapping file. FWIW, "antiword -m roman.txt"
> > produces gobs of errors. IIUC, the '#' should start a comment, so
> > whitespace differences after '#' shouldn't matter.
>
> The file roman.txt should only be needed for Mac systems where it hould
> work. Cygwin sees here no linebreaks at all.
Fair enough.
> > Incidentally, it used to be possible to specify the mapping file name
> > without the .txt at the end (e.g., "antiword -m cp1251"). It now seems
> > necessary to add the ".txt" to the filename.
>
> At least with cygwin 1.5.9 it seems that this is not possible:
> I can't open your mapping file (koi8-u)
>
> Seeing the relevant code it was never possible, however, I'm learning C
> right now and I patched the options.c file to enable this, I hope it
> works.
Well, IMO, the best place to patch this would be in chartrans.c, where
bReadCharacterMappingTable() tries to open the file (if it's NULL, try
adding ".txt" and opening that)...
> Everything works ok with cygwin-1.5.9. I'll try to recompile with
> 1.5.10 later, maybe that helps...
>
> Gerrit
Try the attached patch. FWIW, it seems like there's a bug here, but
sscanf used to mask it. Was there a change in the sscanf implementation
since 1.5.9?
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
---559023410-1903590565-1086197614=:18478
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="chartrans.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT GSO DOT 4 DOT 58 DOT 0406021333340 DOT 18478 AT slinky DOT cs DOT nyu DOT edu>
Content-Description:
Content-Disposition: attachment; filename="chartrans.patch"
LS0tIGNoYXJ0cmFucy5jLW9yaWcJMjAwMy0wNi0yNyAxMToyMzozMC4wMDAw
MDAwMDAgLTA0MDANCisrKyBjaGFydHJhbnMuYwkyMDA0LTA2LTAyIDEzOjIz
OjQ5LjM3OTM0ODgwMCAtMDQwMA0KQEAgLTIxNiw3ICsyMTYsNyBAQCBiUmVh
ZENoYXJhY3Rlck1hcHBpbmdUYWJsZShjb25zdCBjaGFyICpzDQogCQkJY29u
dGludWU7DQogCQl9DQogCQlpRmllbGRzID0gc3NjYW5mKHN6TGluZSwgIiV4
ICVseCAlKnMiLCAmdWlMb2NhbCwgJnVsVW5pY29kZSk7DQotCQlpZiAoaUZp
ZWxkcyAhPSAyKSB7DQorCQlpZiAoaUZpZWxkcyA8IDIpIHsNCiAJCQlwY1Rt
cCA9IHN0cmNocihzekxpbmUsICdccicpOw0KIAkJCWlmIChwY1RtcCAhPSBO
VUxMKSB7DQogCQkJCSpwY1RtcCA9ICdcMCc7DQo=
---559023410-1903590565-1086197614=:18478
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
---559023410-1903590565-1086197614=:18478--
- Raw text -