+2008-12-26 Borut Razem <borut.razem AT siol.net>
+
+ * support/librarian/sdcclib.c:
+ fixed bug 2466950: "sdcclib broken"
+ by removing fgets return value check
+
2008-12-26 Philipp Klaus Krause <pkk AT spth.de>
* src/z80/main.c,
src/z80/gen.c,
#if 1
#include <assert.h>
-#define fgets(S, SIZE, STREAM) do { \
- char *__s4567 = S; \
- char *__res4567 = fgets(__s4567, SIZE, STREAM); \
- assert(__s4567 == __res4567); \
-} while (0)
-
#define system(CMD) do { \
int __res4568 = system(CMD); \
assert(-1 != __res4568); \
fprintf(libindex, "<MODULE>\n%s %ld\n", FLine, newlibpos);
state++;
}
- }
+ }
break;
case 1:
fprintf(newlib, "%s\n", FLine);
fclose(rel);
fprintf(libindex, "</MODULE>\n");
fprintf(newlib, "</REL>\n<ADB>\n");
-
+
adb=fopen(AdbName, "r");
if(adb!=NULL)
{
fgets(FLine, MAXLINE, lib);
CleanLine(FLine);
if(EQ(FLine, ModName)) state=1;
- }
+ }
break;
case 1:
if(EQ(FLine, "<REL>")) state=2;
state=5;
else
fprintf(adb, "%s\n", FLine);
- break;
+ break;
}
}
-
+
fclose(rel);
fclose(lib);
fclose(adb);
CleanLine(FLine);
if(NEQ(FLine, "<SDCCLIB>"))
{
- printf("ERROR: File '%s' was not created with '%s'\n", LibName, ProgName);
+ printf("ERROR: File '%s' was not created with '%s'\n", LibName, ProgName);
return;
}
-
+
while(!feof(lib))
{
if(state==3) break;
break;
}
}
-
+
fclose(lib);
}
int fileexist(char * fname)
{
FILE * fp;
-
+
fp=fopen(fname, "r");
if(fp==NULL) return 0;
fclose(fp);
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
-
+
case OPT_ADD_LIST:
AddList();
break;
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
-
+
case OPT_DUMP_SYM:
case OPT_DUMP_MOD:
DumpSymbols();