[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Many error msgs for all user-documents in lout 3.38 (MS Vista + Cygw
From: |
KHMan |
Subject: |
Re: Many error msgs for all user-documents in lout 3.38 (MS Vista + Cygwin) |
Date: |
Mon, 26 Jan 2009 21:17:01 +0800 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
Volker Renneberg wrote:
Finally, I succeeded to compile lout 3.38 under Cygwin/Windows Vista.
However, I cannot compile any of the delivered lout documents (slides,
expert, user, design).
It gives a lot of messages of the form:
lout file "all":
69,1: width missing from 0i
69,1: /, | and & must be enclosed in double quotes
I have attached the compilation report for the slides-document.
I have set OSDOS to 1 and OSUNIX to 0. I have tried it with locale
turned on and off. I did not change any of the include-files.
Right now, I do not know where this problem comes from neither where to
look at.... Any ideas?
[Sorry for threading messages like this, I can never get back my
own e-mail from gmail, it's a known problem...]
Here's a stopgap measure, I got all the docs generated on
Cygwin/WinXP with the attached very ugly hack (z17.diff).
Basically I think the scanf theory holds.
I used the following changes to the Makefile:
PREFIX = /usr/local
USELOC = 0
And I have it installed to /usr/local before processing the
documents. Appears to go normally, the slides output is correct,
but I haven't tried to scrutinize the other docs yet.
I'm not really sure if newlib's sscanf is really at fault, because
its behaviour sounds wrong if we use "man scanf", but sounds right
if we use the ISO C draft standard n1256. So it seems all very
ambiguous...
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
--- z17_ORIG.c 2008-09-24 05:33:52.000000000 +0800
+++ z17.c 2009-01-26 21:02:39.421875000 +0800
@@ -193,6 +193,7 @@
void GetGap(OBJECT x, STYLE *style, GAP *res_gap, unsigned *res_inc)
{ int w; float num;
FULL_CHAR *str;
+ FULL_CHAR conv[32];
debug2(DGW, D, "GetGap( %s, %s, res_gap, res_inc )",
EchoObject(x), EchoStyle(style));
@@ -220,7 +221,14 @@
else if( *str == CH_DECGAP ) *res_inc = GAP_DEC, str++;
/* read the gap width */
- if( sscanf((char *) str, "%f", &num) != 1 )
+ if( sscanf((char *) str, "%31[0-9.]", &conv) != 1)
+ { Error(17, 2, "width missing from %s", WARN, &fpos(x), string(x));
+ Error(17, 3, "%s, %s and %s must be enclosed in double quotes",
+ WARN, &fpos(x), KW_VCAT_NJ, KW_HCAT_NJ, KW_ACAT_NJ);
+ debug0(DGW, D, "GetGap failing (width missing)");
+ return;
+ }
+ if( sscanf((char *) conv, "%f", &num) != 1 )
{ Error(17, 2, "width missing from %s", WARN, &fpos(x), string(x));
Error(17, 3, "%s, %s and %s must be enclosed in double quotes",
WARN, &fpos(x), KW_VCAT_NJ, KW_HCAT_NJ, KW_ACAT_NJ);