24 lines
No EOL
632 B
C
24 lines
No EOL
632 B
C
#ifndef COMMON_H
|
|
#define COMMON_H
|
|
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <sys/stat.h>
|
|
#include <math.h>
|
|
#include <zlib.h>
|
|
#include <errno.h>
|
|
#include <dirent.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
#define IS_ALPHA(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
|
|
#define IS_DIGIT(c) (c >= '0' && c <= '9')
|
|
#define IS_ALNUM(c) (IS_ALPHA(c) || IS_DIGIT(c))
|
|
#define IS_PUNCT(c) ((c >= 33 && c <= 47) || (c >= 58 && c <= 64) || (c >= 91 && c <= 96) || (c >= 123 && c <= 126))
|
|
|
|
char* get_file_content(char*);
|
|
char* get_file_content_with_size(char*, size_t*);
|
|
|
|
#endif // COMMON_H
|