static void Process_Common_Options(INT argc, /* Number of command line arguments */ char *argv[], /* Array of command line arguments */ char *envp[]) /* Array of environment pointers */ { INT argidx; for (argidx = 1; argidx < argc; argidx++ ) { if (argv[argidx] != NULL) { if (argv[argidx][0] == '-' ) { (void)Process_Command_Line_Group(&argv[argidx][1], Common_Option_Groups); } } } } /* Process_Common_Options */
//******************************************************* // Process the command line arguments. //******************************************************* void Process_Command_Line(INT argc, char **argv) { INT i; char *cp; for (i = 1; i < argc; i++) { if ( argv[i] != NULL && *(argv[i]) == '-' ) { cp = argv[i]+1; /* Pointer to next flag character */ switch ( *cp++ ) { case 'f': /* file options */ if (*cp == 0) ; else if (*(cp+1) != ',' && *(cp+1) != ':') ; else { switch (*cp) { case 'f': Feedback_File_Name = cp + 2; break; case 'l': /* listing file */ List_Enabled = TRUE; Lst_File_Name = cp + 2; break; case 't': /* Error file: */ Trc_File_Name = cp + 2; break; case 'B': /* WHIRL file */ Irb_File_Name = cp + 2; break; case 'S': /* Spin file */ Spin_File_Name = cp + 2; break; default: break; } } break; case 'O': if (strncmp(cp, "PT:", 3) == 0) Process_Command_Line_Group (cp-1, Common_Option_Groups); break; case 'v': Show_Progress = TRUE; break; default: /* What's this? */ break; } } } }