Die Prozedure "new_format"
void new_format ( int art, int flag, int format, char *line)
{
int i = 0;
int j = 0;
int f = 0;
char w[max_len];
/* Vorsetze eines Leer-Zeichens innerhalb eines Attributwertes */
if((flag == 7) || ((flag == 9) && (format == 9)))
{
w[i]=' ';
++i;
++j;
}
/* bei Format "...," im Zustand 9 und 8 muss '"' vor das Wort gestellt werden
*/
w[i]='"';
if((flag == 8) || ((flag == 9) && (format == 11)))
{
++i;
++j;
}
/* Zeile copieren */
for( ; ( i < max_len ) && ( *(line+(i-j)) != '\0'); ++i)
{
if((umlaute( *(line+(i-j)), &f)) && (art == 3))
{
i=i-4;
j=j+4;
switch(f)
{
case 4: w[i]=ae; break;
case 5: w[i]=AE; break;
case 6: w[i]=oe; break;
case 7: w[i]=OE; break;
case 8: w[i]=ue; break;
case 9: w[i]=UE; break;
default: w[i]=Ss; break;
}
}
else
w[i]=*(line+(i-j));
}
/* Ausblenden von ',' am Ende bei "...," */
w[((((( flag == 9 ) || (flag == 8))
&& (i>0) && (w[i-1] == ',')))
|| ((flag == 2) && ( format == 5)) ? (i-1) : (i))]='\0';
/* Anhaengen von '"' am Ende bei "...," */
if((flag == 8) || ((flag == 9) && (format == 11)))
strcat(w, "\"");
/* Anhaengen des des PIPE bei Ende des aktuellen Attributes */
if(((flag == 8) || (flag == 9)) && (format !=2))
strcat( w, PIPE);
/* Ausgabe */
switch(flag)
{
case 0 :
if(art > 1)
fprintf( stdout, "\n", flag, format, w );
break;
case 1 : /* fprintf( ofp, "", flag, format, w ); */ break;
case 3 : /* fprintf( ofp, "", flag, format, w ); */ break;
case 2 : set_attribut(incert_bez(w)); break;
case 4 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w);
} break;
case 5 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w); break;
} break;
case 6 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w); break;
} break;
case 7 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s" , w); */ incert_wert(w); break;
} break;
case 8 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w); break;
} break;
case 9 :
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w); break;
} break;
case 10:
if(( art == 2 ) || ( art == 3 ))
{
/* fprintf( ofp, "%s", w); */ incert_wert(w); break;
} break;
}
}
CSLIB 2000
Zurück: Persönliche Hypertexte