* src/pic16/main.c, src/SDCC.lex, src/z80/main.c:
small cosmetic changes
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4518
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2006-12-18 Borut Razem <borut.razem AT siol.net>
+
+ * src/SDCCutil.c: fixed a bug in (get_pragma_token)
+ * src/pic16/main.c, src/SDCC.lex, src/z80/main.c:
+ small cosmetic changes
+
2006-12-18 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* doc/sdccman.lyx: added the long missed iCode table
2006-12-18 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
* doc/sdccman.lyx: added the long missed iCode table
int warn;
cp = get_pragma_token(cp, &token);
int warn;
cp = get_pragma_token(cp, &token);
-
- if (token.type != TOKEN_INT)
+ if (TOKEN_INT != token.type)
long val = strtol(s, &end, 0);
long val = strtol(s, &end, 0);
- if (end != s && ('\0' == *end || isspace(*s)))
+ if (end != s && ('\0' == *end || isspace(*end)))
{
token->val.int_val = val;
token->type = TOKEN_INT;
{
token->val.int_val = val;
token->type = TOKEN_INT;
* debug link the debug libary
* anything else, will link as-is */
* debug link the debug libary
* anything else, will link as-is */
- if(!strcmp(lmodule, "c"))libflags.want_libc = 1;
+ if(!strcmp(lmodule, "c"))
+ libflags.want_libc = 1;
else if(!strcmp(lmodule, "math"))
libflags.want_libm = 1;
else if(!strcmp(lmodule, "io"))
else if(!strcmp(lmodule, "math"))
libflags.want_libm = 1;
else if(!strcmp(lmodule, "io"))
{
const char *str = get_pragma_string(&token);
{
const char *str = get_pragma_string(&token);
- strcpy(buffer, (0 == strcmp("BASE", str)) ? "HOME" : str);
+ strncpyz(buffer, (0 == strcmp("BASE", str)) ? "HOME" : str, sizeof buffer);