Initial release of Maemo 5 port of gnuplot
[gnuplot] / src / variable.h
1 /*
2  * $Id: variable.h,v 1.13 2004/04/13 17:24:03 broeker Exp $
3  */
4
5 /* GNUPLOT - variable.h */
6
7 /*[
8  * Copyright 1999, 2004   Lars Hecking
9  *
10  * Permission to use, copy, and distribute this software and its
11  * documentation for any purpose with or without fee is hereby granted,
12  * provided that the above copyright notice appear in all copies and
13  * that both that copyright notice and this permission notice appear
14  * in supporting documentation.
15  *
16  * Permission to modify the software is granted, but not the right to
17  * distribute the complete modified source code.  Modifications are to
18  * be distributed as patches to the released version.  Permission to
19  * distribute binaries produced by compiling modified sources is granted,
20  * provided you
21  *   1. distribute the corresponding source modifications from the
22  *    released version in the form of a patch file along with the binaries,
23  *   2. add special version identification to distinguish your version
24  *    in addition to the base release version number,
25  *   3. provide your name and address as the primary contact for the
26  *    support of your modified version, and
27  *   4. retain our contact information in regard to use of the base
28  *    software.
29  * Permission to distribute the released version of the source code along
30  * with corresponding source modifications in the form of a patch file is
31  * granted with same provisions 2 through 4 for binary distributions.
32  *
33  * This software is provided "as is" without express or implied warranty
34  * to the extent permitted by applicable law.
35 ]*/
36
37 /* The death of global variables - part one. */
38
39 #ifndef VARIABLE_H
40 # define VARIABLE_H
41
42 #include "syscfg.h"
43 #include "national.h"
44
45 /* Generic defines */
46
47 #ifdef ACTION_NULL
48 # undef ACTION_NULL
49 #endif
50
51 #ifdef ACTION_INIT
52 # undef ACTION_INIT
53 #endif
54
55 #ifdef ACTION_SHOW
56 # undef ACTION_SHOW
57 #endif
58
59 #ifdef ACTION_SET
60 # undef ACTION_SET
61 #endif
62
63 #ifdef ACTION_GET
64 # undef ACTION_GET
65 #endif
66
67 #ifndef ACTION_SAVE
68 # undef ACTION_SAVE
69 #endif
70
71 #ifdef ACTION_CLEAR
72 # undef ACTION_CLEAR
73 #endif
74
75 #define ACTION_NULL   0
76 #define ACTION_INIT   (1<<0)
77 #define ACTION_SHOW   (1<<1)
78 #define ACTION_SET    (1<<2)
79 #define ACTION_GET    (1<<3)
80 #define ACTION_SAVE   (1<<4)
81 #define ACTION_CLEAR  (1<<5)
82
83 /* Loadpath related */
84
85 char *loadpath_handler __PROTO((int, char *));
86
87 #define init_loadpath()    loadpath_handler(ACTION_INIT,NULL)
88 #define set_var_loadpath(path) loadpath_handler(ACTION_SET,(path))
89 #define get_loadpath()     loadpath_handler(ACTION_GET,NULL)
90 #define save_loadpath()    loadpath_handler(ACTION_SAVE,NULL)
91 #define clear_loadpath()   loadpath_handler(ACTION_CLEAR,NULL)
92
93 /* Fontpath related */
94
95 char *fontpath_handler __PROTO((int, char *));
96
97 #define init_fontpath()    fontpath_handler(ACTION_INIT,NULL)
98 #define set_var_fontpath(path) fontpath_handler(ACTION_SET,(path))
99 #define get_fontpath()     fontpath_handler(ACTION_GET,NULL)
100 #define save_fontpath()    fontpath_handler(ACTION_SAVE,NULL)
101 #define clear_fontpath()   fontpath_handler(ACTION_CLEAR,NULL)
102
103 /* Locale related */
104
105 char *locale_handler __PROTO((int, char *));
106
107 #define INITIAL_LOCALE ("C")
108
109 #define init_locale()      locale_handler(ACTION_INIT,NULL)
110 #define set_var_locale(path)   locale_handler(ACTION_SET,(path))
111 #define get_locale()       locale_handler(ACTION_GET,NULL)
112 #define save_locale()      locale_handler(ACTION_SAVE,NULL)
113 #define clear_locale()     locale_handler(ACTION_CLEAR,NULL)
114
115 extern char full_month_names[12][32];
116 extern char abbrev_month_names[12][8];
117 extern char full_day_names[7][32];
118 extern char abbrev_day_names[7][8];
119
120 #endif /* VARIABLE_H */