Reimplemented from confStruct. Definition at line 144 of file clientConf.cpp. 00144 { 00145 int c = 0; 00146 while((c = getopt(argc, argv, confDef)) != -1){ 00147 switch(c){ 00148 case 'p': 00149 intArray[0] = charToInt(0, strlen(optarg), optarg); 00150 confFound[0] = 1; 00151 break; 00152 case 'i': 00153 charArray[1] = optarg; 00154 confFound[1] = 1; 00155 break; 00156 case 'c': 00157 charArray[2] = optarg; 00158 confFound[2] = 1; 00159 break; 00160 case 'n': 00161 charArray[3] = optarg; 00162 confFound[3] = 1; 00163 break; 00164 case 'o': 00165 intArray[4] = charToInt(0, strlen(optarg), optarg); 00166 confFound[4] = 1; 00167 break; 00168 case 'a': 00169 charArray[5] = optarg; 00170 confFound[5] = 1; 00171 break; 00172 case '?': 00173 if(optopt == 'p' || optopt == 'i' || optopt == 'm' || optopt == 'h' || optopt == 'l' || optopt == 'b' || optopt == 'l' || optopt == 't') 00174 fprintf (stderr, "Option -%c requires an argument.\n", optopt); 00175 else if(isprint (optopt)) 00176 fprintf (stderr, "Unknown option `-%c'.\n", optopt); 00177 else 00178 fprintf (stderr, "Unknown option character `\\x%x'.\n", optopt); 00179 default: 00180 usage(); 00181 } 00182 } 00183 return 0; 00184 }
|
1.5.1