1092 |
else if (strcmp(argv[i], "--report-dir") == 0) { |
else if (strcmp(argv[i], "--report-dir") == 0) { |
1093 |
i++; |
i++; |
1094 |
if (i == argc) { |
if (i == argc) { |
1095 |
fatal("--report-dir: option requires an argument"); |
fatal_command_line("--report-dir: option requires an argument"); |
1096 |
} |
} |
1097 |
report_directory = argv[i]; |
report_directory = argv[i]; |
1098 |
} |
} |
1103 |
else if (strcmp(argv[i], "--document-root") == 0) { |
else if (strcmp(argv[i], "--document-root") == 0) { |
1104 |
i++; |
i++; |
1105 |
if (i == argc) { |
if (i == argc) { |
1106 |
fatal("--document-root: option requires an argument"); |
fatal_command_line("--document-root: option requires an argument"); |
1107 |
} |
} |
1108 |
document_root = argv[i]; |
document_root = argv[i]; |
1109 |
} |
} |
1114 |
else if (strcmp(argv[i], "--encoding") == 0) { |
else if (strcmp(argv[i], "--encoding") == 0) { |
1115 |
i++; |
i++; |
1116 |
if (i == argc) { |
if (i == argc) { |
1117 |
fatal("--encoding: option requires an argument"); |
fatal_command_line("--encoding: option requires an argument"); |
1118 |
} |
} |
1119 |
jscoverage_encoding = argv[i]; |
jscoverage_encoding = argv[i]; |
1120 |
} |
} |
1125 |
else if (strcmp(argv[i], "--ip-address") == 0) { |
else if (strcmp(argv[i], "--ip-address") == 0) { |
1126 |
i++; |
i++; |
1127 |
if (i == argc) { |
if (i == argc) { |
1128 |
fatal("--ip-address: option requires an argument"); |
fatal_command_line("--ip-address: option requires an argument"); |
1129 |
} |
} |
1130 |
ip_address = argv[i]; |
ip_address = argv[i]; |
1131 |
} |
} |
1140 |
else if (strcmp(argv[i], "--no-instrument") == 0) { |
else if (strcmp(argv[i], "--no-instrument") == 0) { |
1141 |
i++; |
i++; |
1142 |
if (i == argc) { |
if (i == argc) { |
1143 |
fatal("--no-instrument: option requires an argument"); |
fatal_command_line("--no-instrument: option requires an argument"); |
1144 |
} |
} |
1145 |
no_instrument[num_no_instrument] = argv[i]; |
no_instrument[num_no_instrument] = argv[i]; |
1146 |
num_no_instrument++; |
num_no_instrument++; |
1153 |
else if (strcmp(argv[i], "--port") == 0) { |
else if (strcmp(argv[i], "--port") == 0) { |
1154 |
i++; |
i++; |
1155 |
if (i == argc) { |
if (i == argc) { |
1156 |
fatal("--port: option requires an argument"); |
fatal_command_line("--port: option requires an argument"); |
1157 |
} |
} |
1158 |
port = argv[i]; |
port = argv[i]; |
1159 |
} |
} |
1170 |
} |
} |
1171 |
|
|
1172 |
else if (strncmp(argv[i], "-", 1) == 0) { |
else if (strncmp(argv[i], "-", 1) == 0) { |
1173 |
fatal("unrecognized option `%s'", argv[i]); |
fatal_command_line("unrecognized option `%s'", argv[i]); |
1174 |
} |
} |
1175 |
else { |
else { |
1176 |
fatal("too many arguments"); |
fatal_command_line("too many arguments"); |
1177 |
} |
} |
1178 |
} |
} |
1179 |
|
|
1181 |
char * end; |
char * end; |
1182 |
unsigned long numeric_port = strtoul(port, &end, 10); |
unsigned long numeric_port = strtoul(port, &end, 10); |
1183 |
if (*end != '\0') { |
if (*end != '\0') { |
1184 |
fatal("--port: option must be an integer"); |
fatal_command_line("--port: option must be an integer"); |
1185 |
} |
} |
1186 |
if (numeric_port > UINT16_MAX) { |
if (numeric_port > UINT16_MAX) { |
1187 |
fatal("--port: option must be 16 bits"); |
fatal_command_line("--port: option must be 16 bits"); |
1188 |
} |
} |
1189 |
|
|
1190 |
/* is this a shutdown? */ |
/* is this a shutdown? */ |