File: error.h

package info (click to toggle)
debfoster 2.7-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,188 kB
  • sloc: sh: 4,243; ansic: 2,397; perl: 39; makefile: 26; sed: 16
file content (25 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _ERROR_H
#define _ERROR_H

#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdarg.h>

typedef enum {
	ERROR_NONE,
	ERROR_USER,
	ERROR_CONFIG,
	ERROR_SYSTEM,
	ERROR_INTERNAL
} error_t;

extern void perror_exit(error_t, const char *msg);
extern void error_exit(error_t, const char *msg, ...);

extern void *xmalloc(size_t);
extern char *xstrdup(const char *);
extern char *xstrndup(const char *, int);
extern char *xstrcat(const char *, const char *);

#endif