Inserting VZGOT development tree within GIT
[safe/jmp/vzgot] / lib / RCS / subapl.h,v
1 head    0.84;
2 access;
3 symbols;
4 locks
5         jmp:0.84.0.0; strict;
6 comment @ * @;
7
8
9 0.84
10 date    2010.03.06.16.39.08;    author jmp;     state Exp;
11 branches
12         0.84.0.0;
13 next    0.83;
14
15 0.83
16 date    2010.03.06.16.39.08;    author jmp;     state Exp;
17 branches
18         0.83.0.0;
19 next    ;
20
21 0.83.0.0
22 date    2010.03.06.16.39.08;    author jmp;     state Exp;
23 branches;
24 next    0.83.0.1;
25
26 0.83.0.1
27 date    2010.03.06.16.39.08;    author jmp;     state Exp;
28 branches;
29 next    ;
30
31 0.84.0.0
32 date    2010.03.06.16.39.08;    author jmp;     state Exp;
33 branches;
34 next    ;
35
36
37 desc
38 @/************************************************/
39 /*                                              */
40 /*      Copyright:                              */
41 /*       Jean-Marc Pigeon <jmp@@safe.ca>         2009   */
42 /*                                              */
43 /************************************************/
44 /* This program is free software; you can       */
45 /* redistribute it and/or modify it under the   */
46 /* terms of the GNU General Public License as   */
47 /* published by the Free Software Foundation    */
48 /* version 2 of the License                     */
49 /*                                              */
50 /* This program is distributed in the hope that */
51 /* it will be useful, but WITHOUT ANY WARRANTY; */
52 /* without even the implied warranty of         */
53 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR  */
54 /* PURPOSE.  See the GNU General Public License */
55 /* for more details.                            */
56 /*                                              */
57 /* You should have received a copy of the GNU   */
58 /* General Public License along with this       */
59 /* program; if not, write to the Free Software  */
60 /* Foundation, Inc., 51 Franklin Street,        */
61 /* Fifth Floor, Boston, MA  02110-1301, USA.    */
62 /************************************************/
63 /*                                              */
64 /*      Define sub level procedure needed by    */
65 /*      the application.                        */
66 /*                                              */
67 /************************************************/
68 #ifndef SUBAPL
69 #define SUBAPL
70 #include        <unistd.h>
71 #include        <stdio.h>
72 #include        <sys/types.h>
73 #include        "lowtyp.h"
74
75
76 /*vzboot application name               */
77 #define VZGOT   "vzgot"
78 /*vzboot current application revision level     */
79 #define VZBVERS "$Revision: 0.84.0.0 $"
80
81
82 /*transit subdirectory name                     */
83 #define TSUFFIX "-S"
84
85 /*defining application directory                */
86 typedef enum    {
87         d_tmp,          /*directory /tmp        */
88         d_crash,        /*the crash directory   */
89         d_etc,          /*directory is /etc     */
90         d_ubin,         /*directory /usr/bin    */
91         d_usbin,        /*directory /usr/sbin   */
92         d_usrlib,       /*directory /usr/lib    */
93         d_varlib,       /*directory /var/lib    */
94         d_spool,        /*spool directory       */
95         d_log,          /*logs directory        */
96         d_lock,         /*locking directory     */
97         d_vzgot,        /*application main dir  */
98         d_null          /*no directoy specified */
99         }DIRENUM;
100
101 typedef struct  {       /*vocable table type    */
102         int code;       /*code value            */
103         const char *key;/*key code              */
104         const void *ptr;/*pay load              */
105         }VOCTYP;
106
107 /*Signal flag definition                        */
108 extern  int sigterm;
109 extern  int sigquit;
110 extern  int sigint;
111
112 /*application current version number            */
113 extern const char *curvers;
114 /*application working base directory            */
115 extern char *base;
116 /*application name                              */
117 extern char *appname;
118 /*application debug level                       */
119 extern int debug;
120 /*application verbosity level                   */
121 extern int verbose;
122 /*application working mode foreground/background*/
123 extern int apl_foreground;
124
125 extern int apl_isdir(char *dirpath);
126 extern char *apl_freestr(char *str);
127 extern char *apl_getvers();
128 extern u_long apl_getmillisec();
129 extern char *apl_uniquename(unsigned int seq);
130 extern u_long apl_date(time_t curtime);
131 extern char *apl_ascsystime(time_t curtime);
132 extern char *apl_ascsysdate(time_t curtime);
133 extern char *apl_ascsysdatetime(time_t curtime);
134 extern char *apl_ascsysstamp(time_t curtime);
135 extern time_t apl_datetimesysasc(char *strdate,char *strtime);
136 extern void apl_alert(const int dlevel,const char *fmt,...);
137 extern void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]);
138 extern char *apl_mkbase(char *newbase);
139 extern char *apl_appdir(DIRENUM dir);
140 extern void apl_trapsegv(int onoff);
141 extern void apl_core_dump(char *frmt, ...);
142 extern void apl_settrap(int set);
143 extern char *apl_strtolower(char *str);
144 extern char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom);
145 extern int apl_createdirs(char *dirname);
146 extern char *apl_getapvers();
147 extern VOCTYP *apl_getvoca(const VOCTYP *table,char *str);
148 extern char *apl_cleanstring(char *str);
149 #endif
150 @
151
152
153 0.84
154 log
155 @upgrade version
156 @
157 text
158 @/************************************************/
159 /*                                              */
160 /*      Copyright:                              */
161 /*       Jean-Marc Pigeon <jmp@@safe.ca>         2009   */
162 /*                                              */
163 /************************************************/
164 /* This program is free software; you can       */
165 /* redistribute it and/or modify it under the   */
166 /* terms of the GNU General Public License as   */
167 /* published by the Free Software Foundation    */
168 /* version 2 of the License                     */
169 /*                                              */
170 /* This program is distributed in the hope that */
171 /* it will be useful, but WITHOUT ANY WARRANTY; */
172 /* without even the implied warranty of         */
173 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR  */
174 /* PURPOSE.  See the GNU General Public License */
175 /* for more details.                            */
176 /*                                              */
177 /* You should have received a copy of the GNU   */
178 /* General Public License along with this       */
179 /* program; if not, write to the Free Software  */
180 /* Foundation, Inc., 51 Franklin Street,        */
181 /* Fifth Floor, Boston, MA  02110-1301, USA.    */
182 /************************************************/
183 /*                                              */
184 /*      Define sub level procedure needed by    */
185 /*      the application.                        */
186 /*                                              */
187 /************************************************/
188 #ifndef SUBAPL
189 #define SUBAPL
190 #include        <unistd.h>
191 #include        <stdio.h>
192 #include        <sys/types.h>
193 #include        "lowtyp.h"
194
195
196 /*vzboot application name               */
197 #define VZGOT   "vzgot"
198 /*vzboot current application revision level     */
199 #define VZBVERS "$Revision: 0.83.0.1 $"
200
201
202 /*transit subdirectory name                     */
203 #define TSUFFIX "-S"
204
205 /*defining application directory                */
206 typedef enum    {
207         d_tmp,          /*directory /tmp        */
208         d_crash,        /*the crash directory   */
209         d_etc,          /*directory is /etc     */
210         d_ubin,         /*directory /usr/bin    */
211         d_usbin,        /*directory /usr/sbin   */
212         d_usrlib,       /*directory /usr/lib    */
213         d_varlib,       /*directory /var/lib    */
214         d_spool,        /*spool directory       */
215         d_log,          /*logs directory        */
216         d_lock,         /*locking directory     */
217         d_vzgot,        /*application main dir  */
218         d_null          /*no directoy specified */
219         }DIRENUM;
220
221 typedef struct  {       /*vocable table type    */
222         int code;       /*code value            */
223         const char *key;/*key code              */
224         const void *ptr;/*pay load              */
225         }VOCTYP;
226
227 /*Signal flag definition                        */
228 extern  int sigterm;
229 extern  int sigquit;
230 extern  int sigint;
231
232 /*application current version number            */
233 extern const char *curvers;
234 /*application working base directory            */
235 extern char *base;
236 /*application name                              */
237 extern char *appname;
238 /*application debug level                       */
239 extern int debug;
240 /*application verbosity level                   */
241 extern int verbose;
242 /*application working mode foreground/background*/
243 extern int apl_foreground;
244
245 extern int apl_isdir(char *dirpath);
246 extern char *apl_freestr(char *str);
247 extern char *apl_getvers();
248 extern u_long apl_getmillisec();
249 extern char *apl_uniquename(unsigned int seq);
250 extern u_long apl_date(time_t curtime);
251 extern char *apl_ascsystime(time_t curtime);
252 extern char *apl_ascsysdate(time_t curtime);
253 extern char *apl_ascsysdatetime(time_t curtime);
254 extern char *apl_ascsysstamp(time_t curtime);
255 extern time_t apl_datetimesysasc(char *strdate,char *strtime);
256 extern void apl_alert(const int dlevel,const char *fmt,...);
257 extern void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]);
258 extern char *apl_mkbase(char *newbase);
259 extern char *apl_appdir(DIRENUM dir);
260 extern void apl_trapsegv(int onoff);
261 extern void apl_core_dump(char *frmt, ...);
262 extern void apl_settrap(int set);
263 extern char *apl_strtolower(char *str);
264 extern char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom);
265 extern int apl_createdirs(char *dirname);
266 extern char *apl_getapvers();
267 extern VOCTYP *apl_getvoca(const VOCTYP *table,char *str);
268 extern char *apl_cleanstring(char *str);
269 #endif
270 @
271
272
273 0.84.0.0
274 log
275 @Ratrapage numero de Version
276 @
277 text
278 @d42 1
279 a42 1
280 #define VZBVERS "$Revision: 0.84 $"
281 @
282
283
284 0.83
285 log
286 @Creation
287 #=================================================================================
288 @
289 text
290 @d42 1
291 a42 1
292 #define VZBVERS "$Revision: 0.84.0.0 $"
293 @
294
295
296 0.83.0.0
297 log
298 @Ratrapage numero de Version
299 @
300 text
301 @d42 1
302 a42 1
303 #define VZBVERS "$Revision: 0.83 $"
304 @
305
306
307 0.83.0.1
308 log
309 @Mise en place su GIT
310 @
311 text
312 @d42 1
313 a42 1
314 #define VZBVERS "$Revision: 0.83.0.0 $"
315 @