[2562] in SIPB bug reports
pfrom
daemon@ATHENA.MIT.EDU (David Krikorian)
Sat Mar 7 00:49:06 1992
Date: Sat, 7 Mar 92 00:48:42 -0500
From: David Krikorian <dkk@Athena.MIT.EDU>
To: bug-sipb@Athena.MIT.EDU
Reply-To: dkk@mit.edu
According to my experience a few minutes ago, plus a perusal of the
sources in /mit/sipbsrc/src/pfrom/, the pfrom command sometimes
incorrectly sends error messages to stdout, rather than to stderr.
Here is a patch with some fixes (compiled and tested, but not
extensively):
------------
*** /mit/sipbsrc/src/pfrom/pfrom.c Sat Feb 15 19:26:18 1992
--- pfrom.c Fri Mar 6 23:51:07 1992
***************
*** 124,130 ****
lusage()
{
! printf("Usage: %s [-v] [-s sender] [-h host] [user]\n", progname);
exit(1);
}
--- 124,131 ----
lusage()
{
! fprintf(stderr, "Usage: %s [-v] [-s sender] [-h host] [user]\n",
! progname);
exit(1);
}
***************
*** 271,279 ****
error (s1, s2)
char *s1, *s2;
{
! printf ("pop: ");
! printf (s1, s2);
! printf ("\n");
}
char *re_comp();
--- 272,280 ----
error (s1, s2)
char *s1, *s2;
{
! fprintf (stderr, "pop: ");
! fprintf (stderr, s1, s2);
! fprintf (stderr, "\n");
}
char *re_comp();
***************
*** 314,320 ****
if (!s)
return(NULL);
if (!(cp = malloc((unsigned) strlen(s)+1))) {
! printf("Out of memory!!!\n");
abort();
}
return(strcpy(cp,s));
--- 315,321 ----
if (!s)
return(NULL);
if (!(cp = malloc((unsigned) strlen(s)+1))) {
! fprintf(stderr, "Out of memory!!!\n");
abort();
}
return(strcpy(cp,s));