> Sfront v0.37 8/27/99 is now release, available at:
Hi John,
thanks for sfront it's great.
I just got it working (elpelele builds fine) under windows 95 with the
borland c++ compiler (bcb32 v5.2, C++Builder 1) no problems just by
importing all of the c files into a new project and compiling.
I found the inclusion of parsehelp.c into parser.tab.c confusing, I know if
I'd used the makefile I wouldnt have had this problem. I'm happy to create a
parsehelp.h file if you like so that parser.tab.c can include it and
parsehelp.c can be linked normally.
I have included some code cleanups below. I found a few inconsistencies
between prototypes and definitions of functions with empty parameter lists.
Sometimes you'd declared the parameter list (void) other times left it empty
() and sometimes the prototype in tree.h didn' match the definition. These
caused warnings on my compiler, so I also included the fixes for those
below.
writeop.c line 452, unused variable, delete:
int i = 1;
writeorc.c line 39, unused variable, delete:
int first = 0;
writeorc.c line 222, unused variable, delete:
int first = 0;
writeorc.c line 254, unused variable, delete:
int first = 0;
blocktree.c line 570, unused statement, delete:
aptr = tptr->down->next->next->next->down;
corecode.c line 76, unprototyped function, include void in param list:
void kescape(void)
and add prototype to tree.h ~line 983:
extern void kescape(void);
corecode.c line 2558, unused variable, delete:
char dname[1024];
coreinline.c, lines 367,368,369 unused variable declarations, delete:
// char name[128];
// float fval, rval;
// long ival;
lex.c, line 175 was reporting call without prototype - probably a C/C++
issue. To fix it I added an explicit function signature to mp4read.c line
513:
int orclex (void)
and updated the prototype in tree .h ~line 1023:
extern int orclex(void);
mp4write.c line 212, unused variable, delete:
char name[1024];
mp4write.c line 243, j is assigned a value that is never used (see line
244), delete:
j = 0;
tree.h ~line 1052, change prototype to match definition:
extern void readmidi(void);
readmidi.c line 411, initialisation to zero never used, change:
int i = 0;
to
int i;
writemain.c line 328 added void to param list:
void makebufferinit(void)
readmidi line 167, add void to parameter list of tickval to avoid warning
about missing prototype
unsigned long tickval(void)
tree.h ~line1024, add void to param list to match definition:
extern tnode * scolex(void);
writemain.c line 404, unused variable, delete:
sigsym * s2ptr = instrpresets;
writepre.c line 814, unused variable, delete:
int latesample;
tparse.c line 409, unused variable, delete:
tnode * tptr = * ident;
The assignments in readscore.c and lex.c: buf[i]=c should probably be
explicitly cast to make it clear you are aware of the type conversion:
buf[i]=(char)c
The following (and similar) code in ascwrite.c generates a "code has no
effect" statement on the tptr statement in the for loop initialiser:
tptr = tableroot;
for (tptr; tptr != NULL; tptr = tptr->next)
slinewrite(tptr->down);
wouldn't it be cleaner to move the tptr = tableroot assignment inside the
for loop initialiser?
There are a number of functions in readscore.c that call badline() and hence
don't return a value. It would be nice if there was at least a comment in
the code to say that badline() never returns so that "function should return
a value" warnings don't generate too much distress.
I know some of this in nitpicking but it's never a good feeling to build
code that throws up a lot of warnings. There were other issues as well, but
I've had enough for one day.
Best Regards,
Ross.
This archive was generated by hypermail 2b29 : Wed May 10 2000 - 12:15:30 EDT