diff options
Diffstat (limited to 'runit/runit_lib.h')
-rw-r--r-- | runit/runit_lib.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/runit/runit_lib.h b/runit/runit_lib.h index f594f8f69..ea4b33123 100644 --- a/runit/runit_lib.h +++ b/runit/runit_lib.h | |||
@@ -27,6 +27,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
27 | 27 | ||
28 | /*** buffer.h ***/ | 28 | /*** buffer.h ***/ |
29 | 29 | ||
30 | #if 0 | ||
30 | typedef struct buffer { | 31 | typedef struct buffer { |
31 | char *x; | 32 | char *x; |
32 | unsigned p; | 33 | unsigned p; |
@@ -35,17 +36,17 @@ typedef struct buffer { | |||
35 | int (*op)(int fd,char *buf,unsigned len); | 36 | int (*op)(int fd,char *buf,unsigned len); |
36 | } buffer; | 37 | } buffer; |
37 | 38 | ||
38 | #define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) } | 39 | //#define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) } |
39 | #define BUFFER_INSIZE 8192 | 40 | //#define BUFFER_INSIZE 8192 |
40 | #define BUFFER_OUTSIZE 8192 | 41 | #define BUFFER_OUTSIZE 8192 |
41 | 42 | ||
42 | extern void buffer_init(buffer *,int (*)(int fd,char *buf,unsigned len),int,char *,unsigned); | 43 | extern void buffer_init(buffer *,int (*)(int fd,char *buf,unsigned len),int,char *,unsigned); |
43 | 44 | ||
44 | extern int buffer_flush(buffer *); | 45 | extern int buffer_flush(buffer *); |
45 | extern int buffer_put(buffer *,const char *,unsigned); | 46 | //extern int buffer_put(buffer *,const char *,unsigned); |
46 | extern int buffer_putalign(buffer *,const char *,unsigned); | 47 | extern int buffer_putalign(buffer *,const char *,unsigned); |
47 | extern int buffer_putflush(buffer *,const char *,unsigned); | 48 | extern int buffer_putflush(buffer *,const char *,unsigned); |
48 | extern int buffer_puts(buffer *,const char *); | 49 | //extern int buffer_puts(buffer *,const char *); |
49 | extern int buffer_putsalign(buffer *,const char *); | 50 | extern int buffer_putsalign(buffer *,const char *); |
50 | extern int buffer_putsflush(buffer *,const char *); | 51 | extern int buffer_putsflush(buffer *,const char *); |
51 | 52 | ||
@@ -77,6 +78,7 @@ extern int buffer_unixread(int,char *,unsigned); | |||
77 | /* Actually, int buffer_unixwrite(int,const char *,unsigned), | 78 | /* Actually, int buffer_unixwrite(int,const char *,unsigned), |
78 | but that 'const' will produce warnings... oh well */ | 79 | but that 'const' will produce warnings... oh well */ |
79 | extern int buffer_unixwrite(int,char *,unsigned); | 80 | extern int buffer_unixwrite(int,char *,unsigned); |
81 | #endif | ||
80 | 82 | ||
81 | 83 | ||
82 | /*** byte.h ***/ | 84 | /*** byte.h ***/ |
@@ -102,7 +104,7 @@ extern int fd_move(int,int); | |||
102 | 104 | ||
103 | /*** fifo.h ***/ | 105 | /*** fifo.h ***/ |
104 | 106 | ||
105 | extern int fifo_make(const char *,int); | 107 | //extern int fifo_make(const char *,int); |
106 | 108 | ||
107 | 109 | ||
108 | /*** fmt.h ***/ | 110 | /*** fmt.h ***/ |
@@ -292,9 +294,9 @@ extern int openreadclose(const char *,stralloc *,unsigned); | |||
292 | 294 | ||
293 | /*** pathexec.h ***/ | 295 | /*** pathexec.h ***/ |
294 | 296 | ||
295 | extern void pathexec_run(const char *,char *const *,char *const *); | 297 | //extern void pathexec_run(const char *,char *const *,char *const *); |
296 | extern int pathexec_env(const char *,const char *); | 298 | //extern int pathexec_env(const char *,const char *); |
297 | extern void pathexec(char **); | 299 | //extern void pathexec(char **); |
298 | 300 | ||
299 | 301 | ||
300 | /*** pmatch.h ***/ | 302 | /*** pmatch.h ***/ |
@@ -304,8 +306,8 @@ extern unsigned pmatch(const char *, const char *, unsigned); | |||
304 | 306 | ||
305 | /*** prot.h ***/ | 307 | /*** prot.h ***/ |
306 | 308 | ||
307 | extern int prot_gid(int); | 309 | //extern int prot_gid(int); |
308 | extern int prot_uid(int); | 310 | //extern int prot_uid(int); |
309 | 311 | ||
310 | 312 | ||
311 | /*** readclose.h ***/ | 313 | /*** readclose.h ***/ |
@@ -345,14 +347,14 @@ extern unsigned scan_8long(const char *,unsigned long *); | |||
345 | 347 | ||
346 | /*** seek.h ***/ | 348 | /*** seek.h ***/ |
347 | 349 | ||
348 | typedef unsigned long seek_pos; | 350 | //typedef unsigned long seek_pos; |
349 | 351 | ||
350 | extern seek_pos seek_cur(int); | 352 | //extern seek_pos seek_cur(int); |
351 | 353 | ||
352 | //extern int seek_set(int,seek_pos); | 354 | //extern int seek_set(int,seek_pos); |
353 | extern int seek_end(int); | 355 | //extern int seek_end(int); |
354 | 356 | ||
355 | extern int seek_trunc(int,seek_pos); | 357 | //extern int seek_trunc(int,seek_pos); |
356 | 358 | ||
357 | //#define seek_begin(fd) (seek_set((fd),(seek_pos) 0)) | 359 | //#define seek_begin(fd) (seek_set((fd),(seek_pos) 0)) |
358 | 360 | ||
@@ -368,8 +370,8 @@ extern int seek_trunc(int,seek_pos); | |||
368 | //extern int sig_term; | 370 | //extern int sig_term; |
369 | 371 | ||
370 | extern void sig_catch(int,void (*)(int)); | 372 | extern void sig_catch(int,void (*)(int)); |
371 | #define sig_ignore(s) (sig_catch((s),SIG_IGN)) | 373 | #define sig_ignore(s) (sig_catch((s), SIG_IGN)) |
372 | #define sig_uncatch(s) (sig_catch((s),SIG_DFL)) | 374 | #define sig_uncatch(s) (sig_catch((s), SIG_DFL)) |
373 | 375 | ||
374 | extern void sig_block(int); | 376 | extern void sig_block(int); |
375 | extern void sig_unblock(int); | 377 | extern void sig_unblock(int); |
@@ -383,8 +385,8 @@ extern void sig_dfl(int); | |||
383 | 385 | ||
384 | extern unsigned str_chr(const char *,int); /* never returns NULL */ | 386 | extern unsigned str_chr(const char *,int); /* never returns NULL */ |
385 | 387 | ||
386 | #define str_diff(s,t) strcmp((s),(t)) | 388 | #define str_diff(s,t) strcmp((s), (t)) |
387 | #define str_equal(s,t) (!strcmp((s),(t))) | 389 | #define str_equal(s,t) (!strcmp((s), (t))) |
388 | 390 | ||
389 | 391 | ||
390 | /*** wait.h ***/ | 392 | /*** wait.h ***/ |