Print this page
3833 err(3c): 'status' should be changed to 'eval'


  51 \fBvoid\fR \fBvwarnx\fR(\fBconst char *\fR\fIfmt\fR, \fBva_list\fR \fIargs\fR);
  52 .fi
  53 
  54 .SH DESCRIPTION
  55 .sp
  56 .LP
  57 The \fBerr()\fR and \fBwarn()\fR family of functions display a formatted error
  58 message on the standard error output. In all cases, the last component of the
  59 program name, followed by a colon character and a space, are output. If the
  60 \fIfmt\fR argument is not \fINULL\fR, the formatted error message is output. In
  61 the case of the \fBerr()\fR, \fBverr()\fR, \fBwarn()\fR, and \fBvwarn()\fR
  62 functions, the error message string affiliated with the current value of the
  63 global variable \fBerrno\fR is output next, preceded by a colon character and a
  64 space if \fIfmt\fR is not \fINULL\fR. In all cases, the output is followed by a
  65 newline character.  The \fBerrx()\fR, \fBverrx()\fR, \fBwarnx()\fR, and
  66 \fBvwarnx()\fR functions will not output this error message string.
  67 .sp
  68 .LP
  69 The \fBerr()\fR, \fBverr()\fR, \fBerrx()\fR, and \fBverrx()\fR functions do not
  70 return, but instead cause the program to terminate with the status value given
  71 by the argument status.
  72 .SH EXAMPLES
  73 .LP
  74 \fBExample 1 \fRDisplay the current \fBerrno\fR information string and
  75 terminate with status indicating failure.
  76 .sp
  77 .in +2
  78 .nf
  79 if ((p = malloc(size)) == NULL)
  80     err(EXIT_FAILURE, NULL);
  81 if ((fd = open(file_name, O_RDONLY, 0)) == -1)
  82     err(EXIT_FAILURE, "%s", file_name);
  83 .fi
  84 .in -2
  85 
  86 .LP
  87 \fBExample 2 \fRDisplay an error message and terminate with status indicating
  88 failure.
  89 .sp
  90 .in +2
  91 .nf




  51 \fBvoid\fR \fBvwarnx\fR(\fBconst char *\fR\fIfmt\fR, \fBva_list\fR \fIargs\fR);
  52 .fi
  53 
  54 .SH DESCRIPTION
  55 .sp
  56 .LP
  57 The \fBerr()\fR and \fBwarn()\fR family of functions display a formatted error
  58 message on the standard error output. In all cases, the last component of the
  59 program name, followed by a colon character and a space, are output. If the
  60 \fIfmt\fR argument is not \fINULL\fR, the formatted error message is output. In
  61 the case of the \fBerr()\fR, \fBverr()\fR, \fBwarn()\fR, and \fBvwarn()\fR
  62 functions, the error message string affiliated with the current value of the
  63 global variable \fBerrno\fR is output next, preceded by a colon character and a
  64 space if \fIfmt\fR is not \fINULL\fR. In all cases, the output is followed by a
  65 newline character.  The \fBerrx()\fR, \fBverrx()\fR, \fBwarnx()\fR, and
  66 \fBvwarnx()\fR functions will not output this error message string.
  67 .sp
  68 .LP
  69 The \fBerr()\fR, \fBverr()\fR, \fBerrx()\fR, and \fBverrx()\fR functions do not
  70 return, but instead cause the program to terminate with the status value given
  71 by the argument \fIeval\fR.
  72 .SH EXAMPLES
  73 .LP
  74 \fBExample 1 \fRDisplay the current \fBerrno\fR information string and
  75 terminate with status indicating failure.
  76 .sp
  77 .in +2
  78 .nf
  79 if ((p = malloc(size)) == NULL)
  80     err(EXIT_FAILURE, NULL);
  81 if ((fd = open(file_name, O_RDONLY, 0)) == -1)
  82     err(EXIT_FAILURE, "%s", file_name);
  83 .fi
  84 .in -2
  85 
  86 .LP
  87 \fBExample 2 \fRDisplay an error message and terminate with status indicating
  88 failure.
  89 .sp
  90 .in +2
  91 .nf