typedef char int32_size_is_correct [sizeof(int32_t) == 4?1:-1];
/* intptr_t / uintptr_t correct size check */
typedef char uintptr_size_is_correct[sizeof(intptr_t) == sizeof(int*)?1:-1];
-typedef char uintptr_size_is_correct[sizeof(uintptr_t)== sizeof(int*)?1:-1];
+typedef char intptr_size_is_correct [sizeof(uintptr_t)== sizeof(int*)?1:-1];
//===================================================================
//============================ lex.c ================================
/* look inside the table for a keyword .. */
for (it = 0; it < sizeof(lex_keywords)/sizeof(*lex_keywords); it++)
- if (!strncmp(file->lastok, lex_keywords[it], sizeof(lex_keywords[it])))
+ if (!strncmp(file->lastok, lex_keywords[it], strlen(lex_keywords[it])))
return it;
/* try a type? */
info->byte = byte;
info->file = file;
- util_debug("MEM", "allocation: %08u (bytes) address 0x%08X @ %s:%u\n", byte, data, file, line);
+ util_debug("MEM", "allocation: % 8u (bytes) address 0x%08X @ %s:%u\n", byte, data, file, line);
mem_at++;
mem_ab += info->byte;
return data;
void *data = (void*)((uintptr_t)ptrn-sizeof(struct memblock_t));
struct memblock_t *info = (struct memblock_t*)data;
- util_debug("MEM", "released: %08u (bytes) address 0x%08X @ %s:%u\n", info->byte, data, file, line);
+ util_debug("MEM", "released: % 8u (bytes) address 0x%08X @ %s:%u\n", info->byte, data, file, line);
mem_db += info->byte;
mem_dt++;
free(data);
va_start(va, ms);
fprintf (stdout, "DEBUG: ");
fputc ('[', stdout);
- fprintf (stdout, area);
+ fprintf(stdout, "%s",area);
fputs ("] ", stdout);
vfprintf(stdout, ms, va);
va_end (va);
chr = *n + *lineptr - pos;
strcpy(tmp,*lineptr);
- if (!(*lineptr = tmp))
+ if (!(*lineptr = tmp)) {
+ mem_d (tmp);
return -1;
-
+ }
pos = *n - chr + *lineptr;
}
- if (ferror(stream))
+ if (ferror(stream))
return -1;
if (c == EOF) {
if (pos == *lineptr)