-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.h
More file actions
34 lines (23 loc) · 917 Bytes
/
error.h
File metadata and controls
34 lines (23 loc) · 917 Bytes
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
#ifndef ERROR_H_
#define ERROR_H_
#include <stdio.h>
#include <stdlib.h>
/* Достигнут конец файлового потока */
#define END_OF_FILE -1
/* Успешное завершение */
#define SUCCESS_RETVAL 0
/* Не удалось выделить/перевыделить память */
#define NOT_ENOUGH_MEMORY 1
/* Несуществующий указатель */
#define INVALID_POINTER 2
/* Ошибка открытия файла */
#define ERROR_OPENING_FILE 3
/* Ошибка во время чтения данных из файлового потока */
#define FILE_ERROR 4
/* Номер ошибки */
extern int err_num;
/* Список сообщений об ошибке */
extern const char* err_messages[];
/* Напечатать сообщение об ошибке и завершиться */
void print_error(const char* msg);
#endif /* ERROR_H_ */