continued with draw.c abstraction, also started util.{h,c} implementation, that will be used by draw.c as well
This commit is contained in:
parent
c0ba635c50
commit
f21d46ea7d
6 changed files with 80 additions and 29 deletions
17
util.c
Normal file
17
util.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void
|
||||
die(const char *errstr, ...) {
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, errstr);
|
||||
vfprintf(stderr, errstr, ap);
|
||||
va_end(ap);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue