I'm using Debian 3.0 (woody) with gcc 2.95.4.
when compiling window.c I get:
gcc `xmms-config --cflags` `gtk-config --cflags`
`xml2-config --cflags` -fPIC -O2 -Wall
-DSCRIPTDIR=\"/usr/share/lyrc\"
-DLOCALEDIR=\"/usr/share/locale\" -c window.c
window.c: In function `init_window':
window.c:97: parse error before `int'
window.c:126: `cnt' undeclared (first use in this function)
window.c:126: (Each undeclared identifier is reported
only once
window.c:126: for each function it appears in.)
make: *** [window.o] Error 1
This is fixed by moving "int cnt=0;" to the beginning
of the function.
Also you are not calling strndup correctly in
string_tool.c:
gcc `xmms-config --cflags` `gtk-config --cflags`
`xml2-config --cflags` -fPIC -O2 -Wall
-DSCRIPTDIR=\"/usr/share/lyrc\"
-DLOCALEDIR=\"/usr/share/locale\" -c string_tool.c
string_tool.c: In function `strip_html':
string_tool.c:209: warning: implicit declaration of
function `strndup'
And in lyrc_site.c I get:
gcc `xmms-config --cflags` `gtk-config --cflags`
`xml2-config --cflags` -fPIC -O2 -Wall
-DSCRIPTDIR=\"/usr/share/lyrc\"
-DLOCALEDIR=\"/usr/share/locale\" -c lyrc_site.c
lyrc_site.c: In function `upload_lyrics':
lyrc_site.c:212: parse error before `w'
lyrc_site.c:216: `w' undeclared (first use in this
function)
lyrc_site.c:216: (Each undeclared identifier is
reported only once
lyrc_site.c:216: for each function it appears in.)
lyrc_site.c:216: `hw' undeclared (first use in this
function)
make: *** [lyrc_site.o] Error 1
Same problem there. The three variables "w", "h", and
"hw" need to be moved to the beginning of the function.
Hint: You should probably declare all your variables at
the beginning of your function :)
Logged In: YES
user_id=746102
Sorry for that... I generally try to do things that way (Declare
all variables at the beginning...)
But for my defense,
1. I didn't worked on those two functions for a long time
2. on my system, I don't get those two errors (that's the main
reason in fact) ;)
For the "strndup", ok, i've been lazy... I don't really
understand the problem, since it's a "string.h" function...
Perhap's it's because I didn't made a configure script. This
strip_html function will disappear soon, so this won't be a
problem anymore!
Anyway, those problems are corrected now.
Thanks!