Annotation of OpenXM/src/asir-doc/html_tools/conv_index.c, Revision 1.1.1.1
1.1 noro 1: #include <stdio.h>
2:
3: main ()
4: {
5: int c,c1,i,j;
6: char buf[BUFSIZ],fname[BUFSIZ],kname[BUFSIZ];
7:
8: while ( 1 ) {
9: c = getchar();
10: if ( c == EOF )
11: exit(0);
12: if ( c == '<' ) {
13: c1 = getchar();
14: if ( c1 == 'A' ) {
15: fgets(buf,BUFSIZ,stdin);
16: for ( i = 0; buf[i] != '='; i++ );
17: i++; i++;
18: for ( j = 0; buf[i] != '#'; i++, j++ ) fname[j] = buf[i];
19: fname[j] = 0;
20: for ( ; buf[i] != '>'; i++ );
21: i++;
22: if ( buf[i] == '<' ) {
23: for ( ; buf[i] != '>'; i++ );
24: i++;
25: }
26: for ( j = 0; buf[i] != '<'; i++, j++ ) kname[j] = buf[i];
27: kname[j] = 0;
28: printf("<OBJECT type=\"text/sitemap\">\n");
29: printf("<param name=\"Name\" value=\"%s\">\n",kname);
30: printf("<param name=\"Local\" value=\"html\\%s\">\n",fname);
31: printf("</OBJECT>\n");
32: } else {
33: putchar(c);
34: putchar(c1);
35: do putchar(c=getchar()); while ( c != '>' );
36: }
37: } else putchar(c);
38: }
39: }
40:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>