(file) Return to smpl_00.c CVS log (file) (dir) Up to [Development] / JSOC / proj / cookbook

Diff for /JSOC/proj/cookbook/smpl_00.c between version 1.4 and 1.6

version 1.4, 2009/07/27 23:42:31 version 1.6, 2011/11/04 00:30:09
Line 2 
Line 2 
  *  smpl_00.c                                           $DRMS/proj/cookbook/  *  smpl_00.c                                           $DRMS/proj/cookbook/
  *  *
  *  An extremely simple program that does (almost) nothing at all.  *  An extremely simple program that does (almost) nothing at all.
  *    It illustrates the use of the   *    It illustrates how a module is called from a driver program, in this
    *    case a locally-provided main program rather than jsoc_main, and the
    *    use of the command line parsing features in (and outside of) the
    *    module.
  *  *
  *  Usage:  *  Usage:
  *    smpl_00 [-avVH]   *    smpl_00 [print= ...]
  *  *
  *  Bugs:  *  Bugs:
  *    The program is of no particular use, and exists merely for heuristic  *    The program is of no particular use, and exists merely for heuristic
Line 27  CmdParams_t cmdparams;
Line 30  CmdParams_t cmdparams;
  
 int DoIt (void) { int DoIt (void) {
   int status;   int status;
   char *msg = cmdparams_get_str (&cmdparams, "print", &status);    char *msg = strdup (cmdparams_get_str (&cmdparams, "print", &status));
   printf ("%s\n", msg);   printf ("%s\n", msg);
   return 0;   return 0;
 } }


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

Karen Tian
Powered by
ViewCVS 0.9.4