


SMANHTML(1)              USER COMMANDS                SMANHTML(1)



NAME
     smanhtml - filter out manual page from source file into HTML
     page

SYNOPSIS
     smanhtml (sourcefile(s))

DESCRIPTION
     smanhtml reads text from its standard input or the filenames
     supplied  and  reformats  into  HTML  any nroff macros found
     between the markers /**MAN and */.  It  is  used  to  format
     manual  pages  from  SFS  source  files  (where  authors are
     requested to include the manual page in the file).

VERSION/AUTHOR
     1.0        -        Mark        Huckvale                  if
     (strncmp(iline,"/**MAN",6)==0) start=1;      } }

     int main(int argc,char **argv)  {       extern  int  optind;
          extern      char     *optarg;          int  c,errflg=0;
          FILE *ip;                                         while
     ((c=getopt(argc,argv,"I"))!=EOF) switch (c) {      case 'I':
               fprintf(stderr,"%s: Get manual page from source in
     HTML       Vs%s0,PROGNAME,PROGVERS);                exit(0);
          default:            errflg=1;            break;       }
          if    (errflg)              error("usage:    %s    (-I)
     (sourcefiles)",PROGNAME);

          printf("<html><head><title>SFS                   Manual
     Page</title></head><body>0);           if     (optind==argc)
               procfile(stdin);                else           for
     (;optind<argc;optind++)            {                      if
     ((ip=fopen(argv[optind],"r"))==NULL)
                    error("could  not  open  '%s'",argv[optind]);
               procfile(ip);               fclose(ip);          }
          printf("</body></html>0);      exit(0); }

SOURCE
     /users/mark/sfs/man/../util/smanhtml.c
















UTIL                    Last change: SFS                        1



