minor changes in the simple DEF-->EDF converter

svn path=/trunk/; revision=588
This commit is contained in:
Emanuele Aliberti 1999-07-12 21:02:06 +00:00
parent 221e27f1fa
commit 0584d3755f

View file

@ -1,4 +1,4 @@
/* $Id: defedf.c,v 1.1 1999/07/04 11:14:15 ea Exp $ /* $Id: defedf.c,v 1.2 1999/07/12 21:02:06 ea Exp $
* *
* reactos/iface/dll/defedf.c * reactos/iface/dll/defedf.c
* *
@ -106,10 +106,14 @@ ParseInput (
r = strrchr( InputBuffer, '\n' ); r = strrchr( InputBuffer, '\n' );
if (r) *r = '\0'; if (r) *r = '\0';
#ifdef DEBUG
printf("ParseInput(%s)\n",InputBuffer); printf("ParseInput(%s)\n",InputBuffer);
#endif
if (0 == strlen(InputBuffer)) if (0 == strlen(InputBuffer))
{ {
#ifdef DEBUG
printf("LineEmpty\n"); printf("LineEmpty\n");
#endif
return LineEmpty; return LineEmpty;
} }
@ -120,20 +124,32 @@ printf("LineEmpty\n");
if (*r == ';') if (*r == ';')
{ {
strcpy( InputBuffer, r ); strcpy( InputBuffer, r );
#ifdef DEBUG
printf("LineComment\n"); printf("LineComment\n");
#endif
return LineComment; return LineComment;
} }
r = strchr( InputBuffer, '=' );
if (r)
{
printf( "Fatal error: can not process DEF files with aliases!\n");
exit(EXIT_FAILURE);
}
r = strchr( InputBuffer, '@' ); r = strchr( InputBuffer, '@' );
if (r) if (r)
{ {
strcpy( CleanName, InputBuffer ); strcpy( CleanName, InputBuffer );
r = strchr( CleanName, '@' ); r = strchr( CleanName, '@' );
*r = '\0'; *r = '\0';
#ifdef DEBUG
printf("LineSymbol: \"%s\"=\"%s\"\n",InputBuffer,CleanName); printf("LineSymbol: \"%s\"=\"%s\"\n",InputBuffer,CleanName);
#endif
return LineSymbol; return LineSymbol;
} }
/* can not recognize it; copy it verbatim */ /* can not recognize it; copy it verbatim */
#ifdef DEBUG
printf("LineComment\n"); printf("LineComment\n");
#endif
return LineComment; return LineComment;
} }