329 |
} |
} |
330 |
else |
else |
331 |
{ |
{ |
332 |
read_server (outfp); |
if (outfp != NULL) |
333 |
|
read_server (outfp); |
334 |
|
else |
335 |
|
{ |
336 |
|
fprintf (stderr, "%s: unexpected %d received\n", |
337 |
|
program_name, r->state); |
338 |
|
safe_exit(); |
339 |
|
} |
340 |
} |
} |
341 |
break; |
break; |
342 |
|
|
343 |
case CODE_INFORMATION: |
case CODE_INFORMATION: |
344 |
fprintf (outfp, "%s\n", r->text); |
if (outfp != NULL) |
345 |
|
fprintf (outfp, "%s\n", r->text); |
346 |
break; |
break; |
347 |
|
|
348 |
case CODE_NONEXISTENT_PR: |
case CODE_NONEXISTENT_PR: |
1224 |
} |
} |
1225 |
|
|
1226 |
static void |
static void |
1227 |
netSendPRCmd (const char *cmd, FILE *file) |
netSendPRCmd (const char *cmd, FILE *file, int show_information) |
1228 |
{ |
{ |
1229 |
char *line; |
char *line; |
1230 |
if (debug) |
if (debug) |
1241 |
} |
} |
1242 |
fprintf (serv_write, ".\r\n"); |
fprintf (serv_write, ".\r\n"); |
1243 |
/* if get_reply finds errors it writes messages and doesn't return */ |
/* if get_reply finds errors it writes messages and doesn't return */ |
1244 |
get_reply (stdout); |
get_reply (show_information ? stdout : NULL); |
1245 |
} |
} |
1246 |
|
|
1247 |
void |
void |
1248 |
netCheckPR (FILE *file, int initial) |
netCheckPR (FILE *file, int initial) |
1249 |
{ |
{ |
1250 |
netSendPRCmd (initial ? "CHEK INIT" : "CHEK", file); |
netSendPRCmd (initial ? "CHEK INIT" : "CHEK", file, 1); |
1251 |
} |
} |
1252 |
|
|
1253 |
void |
void |
1306 |
} |
} |
1307 |
|
|
1308 |
void |
void |
1309 |
netSubmitNewPR (FILE *file) |
netSubmitNewPR (FILE *file, int show_prnum) |
1310 |
{ |
{ |
1311 |
netSendPRCmd ("SUBM", file); |
netSendPRCmd ("SUBM", file, show_prnum); |
1312 |
} |
} |
1313 |
|
|
1314 |
void |
void |
1318 |
|
|
1319 |
netSetEditEmailAddr (editEmailAddr); |
netSetEditEmailAddr (editEmailAddr); |
1320 |
asprintf (&buf, "EDIT %s", prNum); |
asprintf (&buf, "EDIT %s", prNum); |
1321 |
netSendPRCmd (buf, file); |
netSendPRCmd (buf, file, 1); |
1322 |
free (buf); |
free (buf); |
1323 |
} |
} |
1324 |
|
|