(main): Fix checking of ef_open()'s value. Fixes program exit status

when files can't be opened.

(logerror): The version from libcommon.a does the right thing since
log.c rev. 1.17.  Use it, remove local version.

(log_last_commands): No longer referenced by library code, remove.
This commit is contained in:
Markus Armbruster 2005-05-28 15:57:17 +00:00
parent a127869da2
commit 61cca23d29

View file

@ -123,7 +123,7 @@ main(int argc, char *argv[])
exit(1);
}
for (i = 0; i < EF_MAX; i++) {
if (ef_open(i, O_RDWR | O_CREAT | O_TRUNC, 0) < 0) {
if (!ef_open(i, O_RDWR | O_CREAT | O_TRUNC, 0)) {
perror("ef_open");
exit(1);
}
@ -200,18 +200,3 @@ file_sct_init(coord x, coord y, s_char *ptr)
sp->sct_dist_x = x;
sp->sct_dist_y = y;
}
void
logerror(s_char *format, ...)
{
va_list ap;
va_start(ap, format);
vfprintf(stderr, format, ap);
va_end(ap);
}
void
log_last_commands(void)
{
}