Die Prozedure "filter"
void filter( FILE *ifp, int out)
{
int flag = 0;
int attr_wert = 0;
int l_format = 0;
char line[max_len];
char buffer[max_len];
extern char *attr_bez[max_attr];
line[first]='\0';
buffer[first]='\0';
while ((fscanf( ifp, "%s\n",line )) != EOF )
{
strcat( buffer, line);
strcpy( line, buffer);
buffer[first]='\0';
/* Erkennen eines bestimmten Wortformats */
l_format = line_format( line );
if(l_format == 5)
{
strcpy( buffer, line+16);
line[16]='\0';
}
/* Zustandsaenderung durch erkanntes Wortformaten */
flag = next_state( flag, l_format);
new_format( out, flag, l_format, line );
if(((out == 2) || (out == 3)) && (flag == 0) && (l_format == 2))
{
print_ds();
delete_ds();
}
line[first]='\0';
}
fprintf( stdout, "\n", datensatz[0]);
}
CSLIB 2000
Zurück: Persönliche Hypertexte