summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukem <lukem@NetBSD.org>1997-10-11 02:01:02 +0000
committerlukem <lukem@NetBSD.org>1997-10-11 02:01:02 +0000
commit098ef9272dbfc3deff7afcd768ea90836e72a163 (patch)
treefa7f578063fca1ce93e1c0c5d89eae28a0b5fe9c
parent0f4a9f53cbb30716248d418a66224f0440651ea8 (diff)
downloadbsdgames-darwin-098ef9272dbfc3deff7afcd768ea90836e72a163.tar.gz
bsdgames-darwin-098ef9272dbfc3deff7afcd768ea90836e72a163.tar.zst
bsdgames-darwin-098ef9272dbfc3deff7afcd768ea90836e72a163.zip
use warn instead of perror/fprintf/...
-rw-r--r--atc/log.c10
-rw-r--r--atc/main.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/atc/log.c b/atc/log.c
index fa61cc0c..dd4db972 100644
--- a/atc/log.c
+++ b/atc/log.c
@@ -1,4 +1,4 @@
-/* $NetBSD: log.c,v 1.5 1997/10/10 02:07:25 lukem Exp $ */
+/* $NetBSD: log.c,v 1.6 1997/10/11 02:01:02 lukem Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -50,7 +50,7 @@
#if 0
static char sccsid[] = "@(#)log.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: log.c,v 1.5 1997/10/10 02:07:25 lukem Exp $");
+__RCSID("$NetBSD: log.c,v 1.6 1997/10/11 02:01:02 lukem Exp $");
#endif
#endif not lint
@@ -115,7 +115,7 @@ log_score(list_em)
umask(0);
fd = open(_PATH_SCORE, O_CREAT|O_RDWR, 0644);
if (fd < 0) {
- perror(_PATH_SCORE);
+ warn("open %s", _PATH_SCORE);
return (-1);
}
/*
@@ -124,7 +124,7 @@ log_score(list_em)
*/
fp = fdopen(fd, "r+");
if (fp == NULL) {
- perror(_PATH_SCORE);
+ warn("fdopen %s", _PATH_SCORE);
return (-1);
}
#ifdef BSD
@@ -134,7 +134,7 @@ log_score(list_em)
while (lockf(fileno(fp), F_LOCK, 1) < 0)
#endif
{
- perror("flock");
+ warn("flock %s", _PATH_SCORE);
return (-1);
}
for (;;) {
diff --git a/atc/main.c b/atc/main.c
index 29bf723f..8ef87974 100644
--- a/atc/main.c
+++ b/atc/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.5 1997/10/10 02:07:30 lukem Exp $ */
+/* $NetBSD: main.c,v 1.6 1997/10/11 02:01:05 lukem Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -55,7 +55,7 @@ __COPYRIGHT("@(#) Copyright (c) 1990, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: main.c,v 1.5 1997/10/10 02:07:30 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.6 1997/10/11 02:01:05 lukem Exp $");
#endif
#endif /* not lint */
@@ -229,7 +229,7 @@ read_file(s)
file = s;
yyin = fopen(s, "r");
if (yyin == NULL) {
- perror(s);
+ warn("fopen %s", s);
return (-1);
}
retval = yyparse();
@@ -252,7 +252,7 @@ default_game()
strcat(games, GAMES);
if ((fp = fopen(games, "r")) == NULL) {
- perror(games);
+ warn("fopen %s", games);
return (NULL);
}
if (fgets(line, sizeof(line), fp) == NULL) {
@@ -278,7 +278,7 @@ okay_game(s)
strcat(games, GAMES);
if ((fp = fopen(games, "r")) == NULL) {
- perror(games);
+ warn("fopen %s", games);
return (NULL);
}
while (fgets(line, sizeof(line), fp) != NULL) {
@@ -312,7 +312,7 @@ list_games()
strcat(games, GAMES);
if ((fp = fopen(games, "r")) == NULL) {
- perror(games);
+ warn("fopen %s", games);
return (-1);
}
puts("available games:");