diff options
author | root <root@ka-ata-killa.ourano.james.local> | 2021-03-20 16:20:42 +0000 |
---|---|---|
committer | root <root@ka-ata-killa.ourano.james.local> | 2021-03-20 16:20:42 +0000 |
commit | 5b8f47a70a57765ba04a4d75dfa31a2f55f75029 (patch) | |
tree | 7f74f74344d9e8fdca1a6e0cfee2f957e1135540 /app/ptb.h | |
parent | 4342064ee35d4facf1ad4cbde8f6f84460df02a0 (diff) | |
download | clock-5b8f47a70a57765ba04a4d75dfa31a2f55f75029.tar.gz clock-5b8f47a70a57765ba04a4d75dfa31a2f55f75029.tar.bz2 clock-5b8f47a70a57765ba04a4d75dfa31a2f55f75029.zip |
add alarm support
Diffstat (limited to 'app/ptb.h')
-rw-r--r-- | app/ptb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/ptb.h b/app/ptb.h new file mode 100644 index 0000000..865cacf --- /dev/null +++ b/app/ptb.h @@ -0,0 +1,5 @@ + +#define PTB_INIT(b) int _ptb_len=0,_ptb_left=sizeof(b)-1; char * _ptb_ptr=b; +#define PTB_ADD(a...) do { int _ptb_writ=snprintf(_ptb_ptr,_ptb_left,a ); if (_ptb_writ >=0 ) { _ptb_left-=_ptb_writ; _ptb_len+=_ptb_writ; _ptb_ptr+=_ptb_writ; } } while (0) +#define PTB_LEN _ptb_len + |