src/conver.h
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 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#ifndef CONVER_H
#define CONVER_H
#define CONVER_VERSION 0x100D
#define CONVER_DIR ".conver"
#define CONVER_DRAFT_FILE ".conver/draft.txt"
#define CONVER_RELEASE_FILE ".conver/release.txt"
#define CONVER_LEGACY_FILE ".conver/legacy.txt"
#define CONVER_HISTORY_FILE ".conver/history.txt"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
typedef enum {
CONVER_OK = 0,
CONVER_ERR_OPEN = 1,
CONVER_ERR_WRITE = 2,
CONVER_ERR_READ = 3,
CONVER_ERR_ALLOC = 4,
CONVER_ERR_STAT = 5,
CONVER_ERR_MKDIR = 6,
CONVER_ERR_INVALID_VALUE = 7,
CONVER_ERR_NO_DRAFT = 8,
} conver_result_t;
char * conver_errors[9] = {
"Success",
"Unable to open file.",
"Unable to write file",
"Unable to read file",
"Unable to allocate memory for file",
"Unable to get file/directory information",
"Unable to create directory",
"Invalid value",
"No draft version configured. Please run: conver draft",
};
#endif // CONVER_H
|