From a4b0aae1e56d3166e436f63f25ae4073220ba503 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 28 Dec 2008 19:54:16 +0100 Subject: [PATCH] Change info not to prepend a header line to the info page The contents of the line was partly useless (repetition of the command argument) and partly misleading (modification time of the formatted info file, ifndef _WIN32). --- src/lib/commands/info.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/commands/info.c b/src/lib/commands/info.c index d29bbc80..3a2a43bb 100644 --- a/src/lib/commands/info.c +++ b/src/lib/commands/info.c @@ -154,8 +154,7 @@ info(void) fclose(fp); return RET_FAIL; } - pr("Information on: %s Last modification date: %s", - name, ctime(&statb.st_mtime)); + while (fgets(buf, sizeof(buf), fp) != 0) pr("%s", buf); (void)fclose(fp); @@ -369,8 +368,7 @@ info(void) filename, strerror(errno)); return RET_FAIL; } - } - else { + } else { DWORD fAttrib = GetFileAttributes(filename); if ((fAttrib == (DWORD)-1) || /* INVALID_FILE_ATTRIBUTES */ ((fAttrib != FILE_ATTRIBUTE_NORMAL) && @@ -384,7 +382,6 @@ info(void) } } - pr("Information on: %s", name); while (fgets(buf, sizeof(buf), fp) != 0) pr("%s", buf); (void)fclose(fp);