diff options
author | Jim Meyering <jim@meyering.net> | 1996-12-05 04:55:51 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-12-05 04:55:51 +0000 |
commit | 2882d4477ddad61a4ee298a06c08b33d6f6bb46f (patch) | |
tree | 2ba3b426bd2bca7767141a0931f46254aaab8746 | |
parent | 27932239077dbbfaa570afba25fec907e02b5459 (diff) | |
download | coreutils-2882d4477ddad61a4ee298a06c08b33d6f6bb46f.tar.xz |
(init_header): Move dcl of FMT into block where it's used.
-rw-r--r-- | src/pr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1360,13 +1360,11 @@ init_header (char *filename, int desc) int chars_per_middle, chars_free, lhs_blanks, rhs_blanks; char *f = filename; char *no_middle = ""; - char *header_text, *fmt, *t_buf; + char *header_text, *t_buf; struct tm *tmptr; struct stat st; char *datim = "- Date/Time --"; - fmt = "%y-%m-%d %H:%M"; /* date/time short format */ - if (filename == 0) f = ""; @@ -1384,6 +1382,8 @@ init_header (char *filename, int desc) { size_t t_buf_size = 15; + cons tchar *fmt = "%y-%m-%d %H:%M"; /* date/time short format */ + t_buf = (char *) xmalloc (t_buf_size); tmptr = localtime (&st.st_mtime); strftime (t_buf, t_buf_size, fmt, tmptr); |