This is gck_cmdline.c in view mode; [Download] [Up]
/* ******************************************************************** */ /* * GCK * */ /* * A Circuit Simulation Program * */ /* * by Tanju Cataltepe * */ /* * (c) Copyright 1989 * */ /* ******************************************************************** */ /* (c) Copyright 1989, Tanju Cataltepe */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <time.h> #ifdef Macintosh #include <console.h> #include <Files.h> #else #include <sys/types.h> #include <sys/stat.h> #endif #include <math.h> #include <float.h> #include "gck.h" #include "gck_vars.h" #include "gck_protos.h" #include "gck_errors.h" void parseCommandLineOptions(temp) char *temp; { long i; for (i = 1; i < (long) strlen(temp); i++) { switch (toupper(temp[i])) { case '0': flag_dialog = DIALOG_NONE; break; case '1': flag_dialog = DIALOG_NORMAL; break; case '2': flag_dialog = DIALOG_HIGHLIGHTS; break; case '3': flag_dialog = DIALOG_PAINFUL_DETAIL; break; case 'C': flag_compiler = COMPILER_FORCE_COMPILATION; break; case 'Q': flag_compiler = COMPILER_QUICK_MODE; break; case 'Z': flag_compiler = COMPILER_COMPILE_AND_QUIT; break; } } } void parseCommandLineSymbol(temp) char *temp; { long i; aWord symbol; aWord value; up_to_date = FALSE; cmdline_symbols = TRUE; strcpy(symbol,temp); /* case insensitivity */ for (i = 0; i < (long) strlen(symbol); i++) symbol[i] = toupper(symbol[i]); for (i = 1; i < (long) strlen(symbol); i++) { if (symbol[i] == '=') break; } if (i == strlen(symbol)) errorReport(ERROR_COMMAND_LINE_SYMBOL,symbol,ERR_VOID,0); strcpy(value,&symbol[i+1]); symbol[i] = NULL_CHAR; createCommandSymbol(symbol,value); }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.