[BACK]Return to oxhtmlhelp.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / util

Annotation of OpenXM/src/util/oxhtmlhelp.c, Revision 1.1

1.1     ! takayama    1: #include <stdio.h>
        !             2: #include <stdlib.h>
        !             3: #include <string.h>
        !             4: #define BUFSIZE 1024
        !             5: /* BUG:  it is only for knoppix/math */
        !             6:
        !             7: main(int argc, char *argv[]) {
        !             8:   char *oxhome;
        !             9:   char browser[BUFSIZE];
        !            10:   char fname[BUFSIZE];
        !            11:   char comm[BUFSIZE];
        !            12:   int i;
        !            13:
        !            14:   fname[0] = 0;
        !            15:   oxhome = getenv("OpenXM_HOME");
        !            16:   if (oxhome == NULL) oxhome="/usr/local/OpenXM";
        !            17:   for (i=1; i<argc; i++) {
        !            18:     strcpy(fname,argv[i]);
        !            19:   }
        !            20:   if (getenv("BROWSER") == NULL) {
        !            21:     strcpy(browser,"firefox");
        !            22:   }else{
        !            23:     strcpy(browser,getenv("BROWSER"));
        !            24:   }
        !            25:
        !            26:   if (fname[0] == 0) {
        !            27:     strcpy(fname,oxhome);
        !            28:     strcat(fname,"/doc");
        !            29:   }
        !            30:
        !            31:   sprintf(comm,"%s %s",browser,fname);
        !            32:   system(comm);
        !            33:
        !            34:   return 0;
        !            35:
        !            36: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>