x-engine-c v0.2.13
The C engine for x-lang
Loading...
Searching...
No Matches
x-sys.h
Go to the documentation of this file.
1#ifndef X_SYS_H
2#define X_SYS_H
3
22#include "x.h"
23
24#include <stdio.h> /* For *EOF* */
25#include <unistd.h> /* For *STD*_FILENO* */
26
28#ifndef X_SYS_EOF
29#define X_SYS_EOF EOF
30#endif /* X_SYS_EOF */
31
33#ifndef X_SYS_EXIT_SUCCESS
34#define X_SYS_EXIT_SUCCESS 0
35#endif /* X_SYS_EXIT_SUCCESS */
36
38#ifndef X_SYS_EXIT_FAILURE
39#define X_SYS_EXIT_FAILURE 1
40#endif /* X_SYS_EXIT_FAILURE */
41
48void *x_sys_malloc(size_t size);
49
51void x_sys_free(void *ptr);
52
54ssize_t x_sys_read(int fd, void *p_buf, size_t size);
55
57ssize_t x_sys_write(int fd, const void *p_buf, size_t size);
58
60void x_sys_exit(int status);
61
63int x_sys_open(const char *path, int flags);
64
66int x_sys_close(int fd);
67
69int x_sys_read_char(int fd);
70
71#ifdef X_SYS_CLOCK
73x_int_t x_sys_clock(void);
74#endif /* X_SYS_CLOCK */
75
78#endif /* X_SYS_H */
int x_sys_close(int fd)
Definition x-sys.c:119
void x_sys_exit(int status)
Definition x-sys.c:45
ssize_t x_sys_write(int fd, const void *p_buf, size_t size)
Definition x-sys.c:96
ssize_t x_sys_read(int fd, void *p_buf, size_t size)
Definition x-sys.c:79
void x_sys_free(void *ptr)
Definition x-sys.c:66
void * x_sys_malloc(size_t size)
Definition x-sys.c:56
int x_sys_open(const char *path, int flags)
Definition x-sys.c:108
int x_sys_read_char(int fd)
Definition x-sys.c:131
Core definitions for computational expressions.
long x_int_t
Definition x.h:129