Annotation of OpenXM/src/asir-doc/html_tools/conv_index.c, Revision 1.2
1.1 noro 1: #include <stdio.h>
1.2 ! noro 2: #include <string.h>
1.1 noro 3:
4: main ()
5: {
1.2 ! noro 6: char buf[BUFSIZ];
! 7: char *fname,*ptr,*ptr1;
1.1 noro 8:
1.2 ! noro 9: printf("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n");
! 10: printf("<HTML>\n<HEAD>\n");
! 11: printf("<meta name=\"GENERATOR\" content=\"Microsoft® HTML Help Workshop 4.1\">\n");
! 12: printf("<!-- Sitemap 1.0 -->\n</HEAD><BODY>\n");
! 13: printf("</HEAD><BODY>\n");
! 14:
! 15: while ( 1 ) {
! 16: fgets(buf,BUFSIZ,stdin);
! 17: if ( !strncmp(buf,"Jump to:",strlen("Jump to:")) )
! 18: break;
! 19: }
1.1 noro 20: while ( 1 ) {
1.2 ! noro 21: fgets(buf,BUFSIZ,stdin);
! 22: if ( !strncmp(buf,"Jump to:",strlen("Jump to:")) )
! 23: break;
! 24: if ( fname = strstr(buf,"man_") ) {
! 25: ptr = strchr(buf,'#');
! 26: *ptr = 0;
! 27: ptr = strchr(ptr+1,'>');
! 28: ptr++;
! 29: ptr1 = strchr(ptr,'<');
! 30: *ptr1 = 0;
! 31: printf("<LI><OBJECT type=\"text/sitemap\">\n");
! 32: printf("<param name=\"Name\" value=\"%s\">\n",ptr);
! 33: printf("<param name=\"Local\" value=\"html\\%s\">\n",fname);
! 34: printf("</OBJECT>\n");
! 35: }
1.1 noro 36: }
1.2 ! noro 37: printf("</BODY></HTML>\n");
1.1 noro 38: }
39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>