ReactOS  0.4.12-dev-57-g7050ac4
err.c File Reference
#include "precomp.h"
Include dependency graph for err.c:

Go to the source code of this file.

Functions

void err (int eval, const char *fmt,...)
 
void verr (int eval, const char *fmt, va_list ap)
 
void errx (int eval, const char *fmt,...)
 
void verrx (int eval, const char *fmt, va_list ap)
 
void warn (const char *fmt,...)
 
void vwarn (char *fmt, va_list ap) const
 
void warnx (const char *fmt,...)
 
void vwarnx (char *fmt, va_list ap) const
 

Variables

char__progname
 

Function Documentation

◆ err()

void err ( int  eval,
const char fmt,
  ... 
)

Definition at line 43 of file err.c.

44 {
45  va_list ap;
46  va_start(ap, fmt);
47  verr(eval, fmt, ap);
48  va_end(ap);
49 }
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
void verr(int eval, const char *fmt, va_list ap)
Definition: err.c:52
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943

◆ errx()

void errx ( int  eval,
const char fmt,
  ... 
)

Definition at line 67 of file err.c.

Referenced by verr().

68 {
69  va_list ap;
70  va_start(ap, fmt);
71  verrx(eval, fmt, ap);
72  va_end(ap);
73 }
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
void verrx(int eval, const char *fmt, va_list ap)
Definition: err.c:76
Definition: dsound.c:943

◆ verr()

void verr ( int  eval,
const char fmt,
va_list  ap 
)

Definition at line 52 of file err.c.

Referenced by err().

53 {
54  int sverrno;
55 
56  sverrno = errno;
57  (void)fprintf(stderr, "%s: ", __progname);
58  if (fmt != NULL) {
60  (void)fprintf(stderr, ": ");
61  }
62  (void)fprintf(stderr, "%s\n", strerror(sverrno));
63  exit(eval);
64 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int errno
const char * strerror(int err)
Definition: compat_str.c:23
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
smooth NULL
Definition: ftsmooth.c:416
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
FILE * stderr
void exit(int exitcode)
Definition: _exit.c:33
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
char * __progname
Definition: finger.c:63

◆ verrx()

void verrx ( int  eval,
const char fmt,
va_list  ap 
)

Definition at line 76 of file err.c.

Referenced by errx().

77 {
78  (void)fprintf(stderr, "%s: ", __progname);
79  if (fmt != NULL)
81  (void)fprintf(stderr, "\n");
82  exit(eval);
83 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
smooth NULL
Definition: ftsmooth.c:416
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
FILE * stderr
void exit(int exitcode)
Definition: _exit.c:33
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
char * __progname
Definition: finger.c:63

◆ vwarn()

void vwarn ( char fmt,
va_list  ap 
) const

Definition at line 95 of file err.c.

Referenced by warn().

98 {
99  int sverrno;
100 
101  sverrno = errno;
102  (void)fprintf(stderr, "%s: ", __progname);
103  if (fmt != NULL) {
104  (void)vfprintf(stderr, fmt, ap);
105  (void)fprintf(stderr, ": ");
106  }
107  (void)fprintf(stderr, "%s\n", strerror(sverrno));
108 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
int errno
const char * strerror(int err)
Definition: compat_str.c:23
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
smooth NULL
Definition: ftsmooth.c:416
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
FILE * stderr
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
char * __progname
Definition: finger.c:63

◆ vwarnx()

void vwarnx ( char fmt,
va_list  ap 
) const

Definition at line 120 of file err.c.

Referenced by warnx().

123 {
124  (void)fprintf(stderr, "%s: ", __progname);
125  if (fmt != NULL)
126  (void)vfprintf(stderr, fmt, ap);
127  (void)fprintf(stderr, "\n");
128 }
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:47
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
smooth NULL
Definition: ftsmooth.c:416
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
FILE * stderr
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
char * __progname
Definition: finger.c:63

◆ warn()

void warn ( const char fmt,
  ... 
)

Definition at line 86 of file err.c.

Referenced by verrx().

87 {
88  va_list ap;
89  va_start(ap, fmt);
90  vwarn(fmt, ap);
91  va_end(ap);
92 }
void vwarn(char *fmt, va_list ap) const
Definition: err.c:95
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943

◆ warnx()

void warnx ( const char fmt,
  ... 
)

Definition at line 111 of file err.c.

Referenced by vwarn().

112 {
113  va_list ap;
114  va_start(ap, fmt);
115  vwarnx(fmt, ap);
116  va_end(ap);
117 }
void vwarnx(char *fmt, va_list ap) const
Definition: err.c:120
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943

Variable Documentation

◆ __progname

char* __progname

Definition at line 63 of file finger.c.

Referenced by verr(), verrx(), vwarn(), and vwarnx().