projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* support/librarian/sdcclib.c:
[fw/sdcc]
/
support
/
librarian
/
sdcclib.c
diff --git
a/support/librarian/sdcclib.c
b/support/librarian/sdcclib.c
index 48e13e8b1873b4f2612909533c9976acdde16497..5ab4c4a5b34dd9d111f6ce7f74d396eabd061901 100644
(file)
--- a/
support/librarian/sdcclib.c
+++ b/
support/librarian/sdcclib.c
@@
-51,12
+51,6
@@
int NumRelFiles=0;
#if 1
#include <assert.h>
#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); \
#define system(CMD) do { \
int __res4568 = system(CMD); \
assert(-1 != __res4568); \
@@
-317,7
+311,7
@@
void AddRel(char * RelName)
fprintf(libindex, "<MODULE>\n%s %ld\n", FLine, newlibpos);
state++;
}
fprintf(libindex, "<MODULE>\n%s %ld\n", FLine, newlibpos);
state++;
}
- }
+ }
break;
case 1:
fprintf(newlib, "%s\n", FLine);
break;
case 1:
fprintf(newlib, "%s\n", FLine);
@@
-365,7
+359,7
@@
void AddRel(char * RelName)
fclose(rel);
fprintf(libindex, "</MODULE>\n");
fprintf(newlib, "</REL>\n<ADB>\n");
fclose(rel);
fprintf(libindex, "</MODULE>\n");
fprintf(newlib, "</REL>\n<ADB>\n");
-
+
adb=fopen(AdbName, "r");
if(adb!=NULL)
{
adb=fopen(AdbName, "r");
if(adb!=NULL)
{
@@
-482,7
+476,7
@@
void ExtractRel(char * RelName)
fgets(FLine, MAXLINE, lib);
CleanLine(FLine);
if(EQ(FLine, ModName)) state=1;
fgets(FLine, MAXLINE, lib);
CleanLine(FLine);
if(EQ(FLine, ModName)) state=1;
- }
+ }
break;
case 1:
if(EQ(FLine, "<REL>")) state=2;
break;
case 1:
if(EQ(FLine, "<REL>")) state=2;
@@
-501,10
+495,10
@@
void ExtractRel(char * RelName)
state=5;
else
fprintf(adb, "%s\n", FLine);
state=5;
else
fprintf(adb, "%s\n", FLine);
- break;
+ break;
}
}
}
}
-
+
fclose(rel);
fclose(lib);
fclose(adb);
fclose(rel);
fclose(lib);
fclose(adb);
@@
-526,10
+520,10
@@
void DumpSymbols(void)
CleanLine(FLine);
if(NEQ(FLine, "<SDCCLIB>"))
{
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;
}
return;
}
-
+
while(!feof(lib))
{
if(state==3) break;
while(!feof(lib))
{
if(state==3) break;
@@
-574,14
+568,14
@@
void DumpSymbols(void)
break;
}
}
break;
}
}
-
+
fclose(lib);
}
int fileexist(char * fname)
{
FILE * fp;
fclose(lib);
}
int fileexist(char * fname)
{
FILE * fp;
-
+
fp=fopen(fname, "r");
if(fp==NULL) return 0;
fclose(fp);
fp=fopen(fname, "r");
if(fp==NULL) return 0;
fclose(fp);
@@
-675,7
+669,7
@@
int main(int argc, char **argv)
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
-
+
case OPT_ADD_LIST:
AddList();
break;
case OPT_ADD_LIST:
AddList();
break;
@@
-686,7
+680,7
@@
int main(int argc, char **argv)
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
for(j=0; j<NumRelFiles; j++) free(RelName[j]);
free(RelName);
break;
-
+
case OPT_DUMP_SYM:
case OPT_DUMP_MOD:
DumpSymbols();
case OPT_DUMP_SYM:
case OPT_DUMP_MOD:
DumpSymbols();