/[gnats]/gnats/gnats/client.c
ViewVC logotype

Diff of /gnats/gnats/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.46 by yngves, Mon Nov 25 13:58:33 2002 UTC revision 1.47 by andrewg, Sat Aug 30 07:58:14 2003 UTC
# Line 329  get_reply (FILE *outfp) Line 329  get_reply (FILE *outfp)
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:
# Line 1216  netSetEditEmailAddr (const char *addr) Line 1224  netSetEditEmailAddr (const char *addr)
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)
# Line 1233  netSendPRCmd (const char *cmd, FILE *fil Line 1241  netSendPRCmd (const char *cmd, FILE *fil
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
# Line 1298  netEditField (FILE *fp, const char *prnu Line 1306  netEditField (FILE *fp, const char *prnu
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
# Line 1310  netModifyPR (FILE *file, const char *prN Line 1318  netModifyPR (FILE *file, const char *prN
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    

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26