17 lines
298 B
C
17 lines
298 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
void DieWithUserMessage(const char *msg, const char *detail) {
|
|
fputs(msg, stderr);
|
|
fputs(": ", stderr);
|
|
fputs(detail, stderr);
|
|
fputc('\n', stderr);
|
|
exit(1);
|
|
}
|
|
|
|
void DieWithSystemMessage(const char *msg) {
|
|
perror(msg);
|
|
exit(1);
|
|
}
|
|
|