repositories
/
mTask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
actually working code
[mTask.git]
/
int
/
interface_linux.c
diff --git
a/int/interface_linux.c
b/int/interface_linux.c
index
33fd003
..
1ec9347
100644
(file)
--- a/
int/interface_linux.c
+++ b/
int/interface_linux.c
@@
-144,7
+144,25
@@
void setup(void)
pdie("accept");
}
pdie("accept");
}
-void
test(void
)
+void
debug(char *fmt, ...
)
{
{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+}
+void pdie(char *s)
+{
+ perror(s);
+ die("");
+}
+
+void die(char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ exit(EXIT_FAILURE);
}
}