#define EQ(A,B) !strcmp((A),(B))
#define MAXLINE 254 /*when using fgets*/
-#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
{
char str[NINPUT+2];
int state=0;
- char *res;
while (fgets(str, NINPUT, libfp) != NULL)
{
case 0:
if(EQ(str, "<FILE>"))
{
- res = fgets(str, NINPUT, libfp);
- assert(res == str);
+ fgets(str, NINPUT, libfp);
str[NINPUT+1] = '\0';
chop_crlf(str);
if(EQ(str, ModName)) state=1;
while (fgets(str, MAXLINE, libfp) != NULL)
{
- if (NINPUT < MAXLINE)
- str[NINPUT+1] = '\0';
-
+ str[NINPUT+1] = '\0';
chop_crlf(str);
switch(state)
{
char FLine[MAXLINE+1];
int state=0;
long IndexOffset=0, FileOffset;
- char *res;
while(!feof(libfp))
{
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
switch(state)
{
/*The next line has the size of the index*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
IndexOffset=atol(FLine);
state=1;
/*The next line has the name of the module and the offset
of the corresponding embedded file in the library*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
sscanf(FLine, "%s %ld", ModName, &FileOffset);
state=2;
for(j=0; absPath1[j]!=0; j++) absPath1[j]=tolower((unsigned char)absPath1[j]);
for(j=0; absPath2[j]!=0; j++) absPath2[j]=tolower((unsigned char)absPath2[j]);
#else
- char *res;
- res = realpath(FirstFound->libspc, absPath1);
- assert(res == absPath1);
- res = realpath(ThisLibr->libspc, absPath2);
- assert(res == absPath2);
+ realpath(FirstFound->libspc, absPath1);
+ realpath(ThisLibr->libspc, absPath2);
#endif
if( !( EQ(absPath1, absPath2) && EQ(FirstFound->relfil, ThisLibr->relfil) ) )
{
int state=0;
long IndexOffset=0, FileOffset;
pmlibrarysymbol ThisSym = NULL;
- char *res;
while(!feof(libfp))
{
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
switch(state)
{
/*The next line has the size of the index*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
IndexOffset=atol(FLine);
state=1;
/*The next line has the name of the module and the offset
of the corresponding embedded file in the library*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
sscanf(FLine, "%s %ld", ModName, &FileOffset);
state=2;