ReactOS 0.4.15-dev-8102-g108db8f
err.c File Reference
#include "err.h"
#include <stdarg.h>
#include <assert.h>
Include dependency graph for err.c:

Go to the source code of this file.

Classes

struct  chmcErr
 

Functions

void chmcerr_clean (void)
 
int chmcerr_code (void)
 
const charchmcerr_message (void)
 
void chmcerr_set (int code, const char *fmt,...)
 

Variables

static struct chmcErr chmc_err
 

Function Documentation

◆ chmcerr_clean()

void chmcerr_clean ( void  )

Definition at line 37 of file err.c.

37 {
38 chmc_err.code = CHMC_NOERR;
39 chmc_err.msg[0] = '\0';
40}
static struct chmcErr chmc_err
Definition: err.c:32
#define CHMC_NOERR
Definition: err.h:39

Referenced by chmc_init().

◆ chmcerr_code()

int chmcerr_code ( void  )

Definition at line 42 of file err.c.

42 {
43 return chmc_err.code;
44}

Referenced by chmc_section_add(), and main().

◆ chmcerr_message()

const char * chmcerr_message ( void  )

Definition at line 46 of file err.c.

46 {
47 return chmc_err.msg;
48}

◆ chmcerr_set()

void chmcerr_set ( int  code,
const char fmt,
  ... 
)

Definition at line 50 of file err.c.

51{
52 int len;
53 va_list ap;
54
55 chmc_err.code = code;
56
57 va_start(ap, fmt);
58
60 if (len == CHMC_ERRMAXLEN)
61 chmc_err.msg[CHMC_ERRMAXLEN] = '\0';
62
64
65 va_end(ap);
66}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define assert(x)
Definition: debug.h:53
GLenum GLsizei len
Definition: glext.h:6722
#define CHMC_ERRMAXLEN
Definition: err.h:35
Definition: inflate.c:139
Definition: dsound.c:943
#define vsnprintf
Definition: tif_win32.c:406
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36

Referenced by chmc_init(), chmc_section_create(), and chmc_system_done().

Variable Documentation

◆ chmc_err

struct chmcErr chmc_err
static
Initial value:
= {
'\0',
}

Definition at line 32 of file err.c.

Referenced by chmcerr_clean(), chmcerr_code(), chmcerr_message(), and chmcerr_set().