-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus.h
47 lines (42 loc) · 1.06 KB
/
status.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
46
47
/********************************************************************
*
* $Id: status.distGoal 1989 2015-10-16 18:19:52Z phil $
*
********************************************************************
*/
/**
* Minimal system for error handling.
*
* Each value of the "status" enum is associated with an error message.
* Every function (but some of those returning pointers) should return a
* status. In the case of non-void functions, the former return value has
* to be placed in the parameter list (by address)
*
********************************************************************/
#ifndef __STATUS_H
#define __STATUS_H
typedef enum {
OK,
ERROPEN,
ERRACCESS,
ERRCLOSE,
ERRALLOC,
ERRDATE,
ERRFULL,
ERREMPTY,
ERRABSENT,
ERREXIST,
ERRINDEX,
ERRUNABLE,
ERRADDCITY,
ERRADDNEIGHBOUR,
ERRMAPCONNECTIVITY,
ERRASTAR,
ERRUNKNOWN,
} status;
/** get message associated with the given status value (O(1)).
* @param s the status value
* @return the associated message
*/
extern char *message(status s);
#endif