#include #include #include #ifndef __DECONST #define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) #endif static inline const char *getprogname() { return "grep"; } static inline void warnc(int code, const char *fmt, ...) { va_list args; fprintf(stderr, "warning: "); va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr, ": %s\n", strerror(code)); }