blob: 216d66617723256f2bd0c5404a0887548476edfb (
plain)
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
48
|
/* ISC license. */
#ifndef S6_INTERNAL_H
#define S6_INTERNAL_H
#include <stdlib.h>
#include <skalibs/functypes.h>
#include <s6-frontend/config.h>
/* util */
extern int keycmp (void const *, void const *) ;
#define BSEARCH(type, key, array) bsearch(key, (array), sizeof(array)/sizeof(type), sizeof(type), &keycmp)
/* help */
extern int help (char const *const *) ;
/* version */
extern int version (char const *const *) ;
/* main */
struct global_s
{
unsigned int verbosity ;
} ;
#define GLOBAL_ZERO \
{ \
.verbosity = 1, \
}
extern struct global_s *g ;
struct command_s
{
char const *s ;
main_func_ref f ;
} ;
#define COMMAND_ZERO { .s = 0, .f = 0 }
#endif
|