Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
dpid_common.h
Go to the documentation of this file.
1#ifndef DPID_COMMON_H
2#define DPID_COMMON_H
3
12#include <dirent.h>
13#include <stddef.h> /* size_t */
14#include <sys/types.h> /* ssize_t */
15
16#include "../dlib/dlib.h"
17
18/*
19 * Debugging macros
20 */
21#define _MSG(...)
22#define MSG(...) printf("[dpid]: " __VA_ARGS__)
23#define MSG_ERR(...) fprintf(stderr, "[dpid]: " __VA_ARGS__)
24
25#define dotDILLO_DPI ".dillo/dpi"
26#define dotDILLO_DPIDRC ".dillo/dpidrc"
27#define dotDILLO_DPID_COMM_KEYS ".dillo/dpid_comm_keys"
28
29#define ERRMSG(CALLER, CALLED, ERR)\
30 errmsg(CALLER, CALLED, ERR, __FILE__, __LINE__)
31#define _ERRMSG(CALLER, CALLED, ERR)
32
33
37#define CKD_WRITE(fd, msg) ckd_write(fd, msg, __FILE__, __LINE__)
38#define CKD_CLOSE(fd) ckd_close(fd, __FILE__, __LINE__)
39
47
48
49void errmsg(char *caller, char *called, int errornum, char *file, int line);
50
51ssize_t ckd_write(int fd, char *msg, char *file, int line);
52ssize_t ckd_close(int fd, char *file, int line);
53
54#endif
ssize_t ckd_close(int fd, char *file, int line)
Definition dpid_common.c:50
ssize_t ckd_write(int fd, char *msg, char *file, int line)
Definition dpid_common.c:32
void errmsg(char *caller, char *called, int errornum, char *file, int line)
Definition dpid_common.c:20
file_type
Definition dpid_common.h:43
@ DPI_FILE
Definition dpid_common.h:44
@ UNKNOWN_FILE
Definition dpid_common.h:45