Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.bin/pr Pullup 1.9 [kleink]:



details:   https://anonhg.NetBSD.org/src/rev/6a919ff472b5
branches:  netbsd-1-5
changeset: 489985:6a919ff472b5
user:      tv <tv%NetBSD.org@localhost>
date:      Wed Oct 25 16:29:11 2000 +0000

description:
Pullup 1.9 [kleink]:
Don't abuse LC_TIME for strftime(3) format strings.

diffstat:

 usr.bin/pr/pr.c |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 986fd5b9f797 -r 6a919ff472b5 usr.bin/pr/pr.c
--- a/usr.bin/pr/pr.c   Wed Oct 25 16:29:02 2000 +0000
+++ b/usr.bin/pr/pr.c   Wed Oct 25 16:29:11 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pr.c,v 1.7.10.1 2000/07/13 03:23:33 simonb Exp $       */
+/*     $NetBSD: pr.c,v 1.7.10.2 2000/10/25 16:29:11 tv Exp $   */
 
 /*-
  * Copyright (c) 1991 Keith Muller.
@@ -47,7 +47,7 @@
 #if 0
 from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: pr.c,v 1.7.10.1 2000/07/13 03:23:33 simonb Exp $");
+__RCSID("$NetBSD: pr.c,v 1.7.10.2 2000/10/25 16:29:11 tv Exp $");
 #endif
 #endif /* not lint */
 
@@ -101,7 +101,7 @@
 int    sflag;                  /* -s option for multiple columns */
 int    nohead;                 /* do not write head and trailer */
 int    pgwd;                   /* page width with multiple col output */
-char   *timefrmt;              /* time conversion string */
+char   *timefrmt = TIMEFMT;    /* time conversion string */
 
 /*
  * misc globals
@@ -1605,7 +1605,7 @@
                }
        } else
                err = stderr;
-       while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?w:")) != -1) {
+       while ((c = egetopt(argc, argv, "#adFmrte?h:i?l:n?o:s?T:w:")) != -1) {
                switch (c) {
                case '+':
                        if ((pgnm = atoi(eoptarg)) < 1) {
@@ -1734,6 +1734,9 @@
                                return(1);
                        }
                        break;
+               case 'T':
+                       timefrmt = eoptarg;
+                       break;
                case 't':
                        ++nohead;
                        break;
@@ -1834,7 +1837,5 @@
                }
        }
 
-       if ((timefrmt = getenv("LC_TIME")) == NULL)
-               timefrmt = TIMEFMT;
        return(0);
 }



Home | Main Index | Thread Index | Old Index