Files
2026-07-06 19:08:36 +08:00

28 lines
489 B
C

#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#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);
}