[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gnome-pim: Cannot open user-cal.vcf or GnomeCard.gcrd on PPC



Thank you very much for this discussion.  I have learned a great deal,
and will try in the future to avoid making assumptions about sign of a
char, and casting between char and int.

It seems the best fix to gnome-pim is the attached one-line patch, it
prevents the return from fgetc from being down-cast to a char and back
again.  If other subroutines want to cast the lexGetc_() return to a
char, that's their problem, but many routines depend on it to return the
EOF character, which must be returned as an int to distinguish it from
possible char values and prevent char sign confusion.

With this patch, gnomecal and gnomecard run beautifully on Debian-ARM
and -PPC.

I don't know where the code in question came from (couldn't find it in
bison), but it looks like some standard lex implementation, so the
gnome-pim authors should send this "upstream"...

[Sorry to have generated all this traffic to a "-done" address at bugs.]

Thanks again!

-Adam P.

--- libversit/vcc.y.bak	Fri Sep 17 14:46:51 1999
+++ libversit/vcc.y	Thu Apr 13 00:51:12 2000
@@ -508,7 +508,7 @@
     return 0;
     }
 
-static char lexGetc_()
+static int lexGetc_()
     {
     /* get next char from input, no buffering. */
     if (lexBuf.curPos == lexBuf.inputLen)

Reply to: