IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2007, 4:26:31 PM (20 years ago)
Author:
eugene
Message:

added module system; added panstarrs user features; panstarrs threaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/help.c

    r7917 r11084  
    33int help (int argc, char **argv) {
    44
     5  int Nbytes;
    56  FILE *f;
    6   char *helpdir, file[1024], buff[512];
     7  char *helpdir, *file, buff[512];
    78
    89  helpdir = get_variable ("HELPDIR");
     
    1819  }
    1920
    20   sprintf (file, "%s/%s", helpdir, argv[1]);
     21  Nbytes = strlen(helpdir) + strlen(argv[1]) + 2;
     22  ALLOCATE (file, char, Nbytes);
     23  snprintf (file, Nbytes, "%s/%s", helpdir, argv[1]);
    2124
    2225  f = fopen (file, "r");
     26  free (file);
     27
    2328  if (f == NULL) {
    2429    gprint (GP_ERR, "No help for: %s\n", argv[1]);
Note: See TracChangeset for help on using the changeset viewer.