#include #include #include #ifndef DEFFILEMODE #define DEFFILEMODE 0666 #endif #ifndef ALLPERMS #define ALLPERMS 07777 #endif static inline const char *getprogname() { return "sed"; } static inline void errc(int status, int code, const char *fmt, ...) { va_list args; fprintf(stderr, "error: "); va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr, ": %s\n", strerror(code)); exit(status); }