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

File: [Development] / JSOC / proj / cookbook / smpl_00.c (download)
Revision: 1.4, Mon Jul 27 22:42:31 2009 UTC (13 years, 10 months ago) by rick
Branch: MAIN
CVS Tags: Ver_5-3, Ver_5-2, NetDRMS_Ver_2-0b1
Changes since 1.3: +15 -26 lines
*** empty log message ***

/*
 *  smpl_00.c						$DRMS/proj/cookbook/
 *
 *  An extremely simple program that does (almost) nothing at all.
 *    It illustrates the use of the 
 *
 *  Usage:
 *    smpl_00 [-avVH]
 *
 *  Bugs:
 *    The program is of no particular use, and exists merely for heuristic
 *      and testing purposes.
 *
 *  Revision history is at end of file.
 */
#include <cmdparams.h>
#include <timeio.h>
				    /*  sample module arguments declaration  */
ModuleArgs_t module_args[] = {
				   /*  module-specific argument declarators  */
  {ARG_STRING,	"print", "done", "message to print on successful completion"},
				       /*  required end (or blank) argument  */
  {ARG_END}
};
       /*  required global declaration (normally included in module driver)  */
CmdParams_t cmdparams;

int DoIt (void) {
  int status;
  char *msg = cmdparams_get_str (&cmdparams, "print", &status);
  printf ("%s\n", msg);
  return 0;
}

int main (int argc, char **argv) {
  int status = cmdparams_parse (&cmdparams, argc, argv);
  if (status >= 0) return DoIt ();
}

/*
 *  Revision History
 *
 *  09.07.27	file created by R Bogart
 */

Karen Tian
Powered by
ViewCVS 0.9.4