Mercurial > projects > pwm
comparison pager.h @ 19:5c6155c8e9b6
Handle signals
Handled signals are generally blocked and only unblocked when doing blocking
I/O, i.e. either when reading commands or printing results. A (possibly
queued) signal will then interrupt I/O and can be dealt with in the main loop.
author | Guido Berhoerster <guido+pwm@berhoerster.name> |
---|---|
date | Fri, 01 Sep 2017 22:33:41 +0200 |
parents | a08ef0674d8e |
children |
comparison
equal
deleted
inserted
replaced
18:1e39a251cbe9 | 19:5c6155c8e9b6 |
---|---|
25 #ifndef PAGER_H | 25 #ifndef PAGER_H |
26 #define PAGER_H | 26 #define PAGER_H |
27 | 27 |
28 #include <stdarg.h> | 28 #include <stdarg.h> |
29 | 29 |
30 #include "io.h" | |
31 | |
30 struct pager; | 32 struct pager; |
31 | 33 |
32 struct pager * pager_create(FILE *fp); | 34 struct pager * pager_create(int); |
33 void pager_destroy(struct pager *); | 35 void pager_destroy(struct pager *); |
34 int pager_vprintf(struct pager *, const char *, va_list); | 36 int pager_vprintf(struct pager *, const char *, va_list); |
35 int pager_printf(struct pager *, const char *, ...); | 37 int pager_printf(struct pager *, const char *, ...); |
36 void pager_show(struct pager *); | 38 enum io_status pager_show(struct pager *); |
37 | 39 |
38 #endif /* !PAGER_H */ | 40 #endif /* !PAGER_H */ |