]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(init_header): Move dcl of FMT into block where it's used.
authorJim Meyering <jim@meyering.net>
Thu, 5 Dec 1996 04:55:51 +0000 (04:55 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 5 Dec 1996 04:55:51 +0000 (04:55 +0000)
src/pr.c

index 15f15a0ece0f4fe824b74aa407fbb98fcd9fe178..e15beadb782ec9dbb4333d345a46685b6c279b23 100644 (file)
--- a/src/pr.c
+++ b/src/pr.c
@@ -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);