File: misc.h

package info (click to toggle)
prayer 1.3.5-dfsg1-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 6,596 kB
  • sloc: ansic: 43,163; makefile: 817; sh: 445; perl: 166
file content (32 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (6)
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
26
27
28
29
30
31
32
/* $Cambridge: hermes/src/prayer/lib/misc.h,v 1.4 2010/07/01 17:45:15 dpc22 Exp $ */

typedef int BOOL;

#ifndef NIL
#define NIL (0)
#endif

#ifndef T
#define T (1)
#endif

#define CRLF "\015\012"

/* Fix ctype.h macros. */
#define UC (unsigned char)
#define Uisspace(c) isspace(UC(c))
#define Uisalpha(c) isalpha(UC(c))
#define Uisalnum(c) isalnum(UC(c))
#define Uisdigit(c) isdigit(UC(c))
#define Uisxdigit(c) isxdigit(UC(c))
#define Uiscntrl(c) iscntrl(UC(c))
#define Utoupper(c) toupper(UC(c))
#define Utolower(c) tolower(UC(c))

void *xmalloc(unsigned long size);
void *xrealloc(void *old, unsigned long size);

void log_fatal(char *fmt, ...);
void log_misc(char *fmt, ...);
void log_debug(char *fmt, ...);
void log_panic(char *fmt, ...);