F_error, F_error32
-print error message for last error
#include stdio.h>
#include "fml.h"
extern int Ferror;
void
F_error(char *msg)
#include "fml32.h"
extern int Ferror32;
void
F_error32(char *msg)
The function F_error()
works like perror
(3) for UNIX System errors; that is, it produces a message on the standard error output (file descriptor 2), describing the last error encountered during a call to a system or library function. The argument string msg is printed first, then a colon and a blank, then the message and a newline. If msg is a null pointer or points to a null string, the colon is not printed. To be of most use, the argument string should include the name of the program that incurred the error. The error number is taken from the external variable Ferror
, which is set when errors occur but not cleared when non-erroneous calls are made. In the MS-DOS and OS/2 environments, Ferror
is redefined to FMLerror
.
To immediately print an error message, F_error()
should be called on an error return from another FML function. When the error message is FEUNIX
. Uunix_err
(3) is called.
F_error32
is used with 32-bit FML.
F_error
() is declared a void
and as such does not have return values.
Fintro
(3)perror
(3) in a UNIX System reference manualUunix_err
(3)