-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkspace.h
41 lines (32 loc) · 956 Bytes
/
workspace.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
/**
* @file workspace.h
*
* @date Apr 25, 2014
* @author Craig Hesling
*/
#ifndef _WORKSPACE_H_
#define _WORKSPACE_H_
#define WORKSPACE_NAME_SIZE 10
#define WORKSPACE_SIZE 10
/// Indicates that a specified name has not been defined. For use in @ref workspace_get.
#define WORKSPACE_NOTSET ((void *)(long)(-1))
/// Indicates that the @ref workspace_set operation was successful.
#define WORKSPACE_OK 0
/// Indicates that the @ref workspace_set operation failed because the the workspace is full.
#define WORKSPACE_FULL 1
/// Indicates that the @ref workspace_set operation failed because the the name argument is invalid.
#define WORKSPACE_NAME 2
/**
* Resets all workspace entries to unset.
* @note Must be run before workspace use.
*/
void
workspace_init(void);
int
workspace_set(char *name, void *data);
void
workspace_unset(char *name);
void *
workspace_get(char *name);
#endif /* _WORKSPACE_H_ */
/* vim: set ts=4 sw=4 expandtab: */