Back to index

im-sdk  12.3.91
Defines | Functions
xaux_ext_help.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DEFAULT_HELP_PATH   "file:/usr/lib/iiim/le/sampleja4/help/"

Functions

void HelpInvoke (char *)

Define Documentation

#define DEFAULT_HELP_PATH   "file:/usr/lib/iiim/le/sampleja4/help/"

Definition at line 55 of file xaux_ext_help.h.


Function Documentation

void HelpInvoke ( char *  )

Definition at line 822 of file xaux_ext_common.c.

{
    char *browser;
    char *basepath;

    pid_t pid, pid2;

    if (!path) {
      return;
    }

#ifdef linux
    pid = fork();
#else
    pid = fork1();
#endif

    if (getenv("HTT_HELP_BROWSER")){
      browser = getenv("HTT_HELP_BROWSER");
    } else {
      browser = "/usr/bin/netscape";
    }

    if (getenv("HTT_HELP_PATH")){
      basepath = getenv("HTT_HELP_PATH");
    } else {
      basepath = DEFAULT_HELP_PATH;
    }

    if (pid == (pid_t) (-1)) {
        return;
    } else if (0 == pid) {
        pid2 = fork();
        if(pid2 == -1) {
            _exit(1);
        } else if(pid2 == 0) {
           char *help = (char*)malloc(strlen(basepath) + strlen(path) +1 );
           sprintf(help, "%s%s", basepath, path);
           execl(browser, browser, help, NULL);
           free(help);
            _exit(1);
        } else {
            _exit(0);
        }
    } else {
        waitpid(pid, NULL, 0);
    }
    return;
}

Here is the caller graph for this function: