util.h (604B)
1 #include "shared.h" 2 3 #define TERMCMD(...) cspawn((char *[]){ "st", "-e", __VA_ARGS__, NULL }) 4 5 #define SPRINTF(str, ...) ({ \ 6 int len = snprintf(str, BLOCKLENGTH, __VA_ARGS__); \ 7 len < BLOCKLENGTH ? len + 1 : BLOCKLENGTH; \ 8 }) 9 10 void cspawn(char *const *arg); 11 void csigself(int sig, int sigval); 12 size_t getcmdout(char *const *arg, char *cmdout, size_t cmdoutlen); 13 int readint(const char *path, int *var); 14 void uspawn(char *const *arg);