diff options
| author | jtc <jtc@NetBSD.org> | 1994-11-01 20:38:40 +0000 |
|---|---|---|
| committer | jtc <jtc@NetBSD.org> | 1994-11-01 20:38:40 +0000 |
| commit | cd439d82af9522ec662102dfebdc44875eb58bf4 (patch) | |
| tree | 78fe55729c4ac3d1f789a33cc7e4612c390ce28b /gnu/usr.bin/diff/context.c | |
| parent | 0f8e6cf96801bbae057bcf623b51ab7d71b765e4 (diff) | |
Upgraded to diffutils 2.7.
Diffstat (limited to 'gnu/usr.bin/diff/context.c')
| -rw-r--r-- | gnu/usr.bin/diff/context.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gnu/usr.bin/diff/context.c b/gnu/usr.bin/diff/context.c index 062a4fb2fba..14f950c5269 100644 --- a/gnu/usr.bin/diff/context.c +++ b/gnu/usr.bin/diff/context.c @@ -1,5 +1,5 @@ /* Context-format output routines for GNU DIFF. - Copyright (C) 1988, 89, 91, 92, 93 Free Software Foundation, Inc. + Copyright (C) 1988,1989,1991,1992,1993,1994 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -17,10 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU DIFF; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef lint -static char *rcsid = "$Id: context.c,v 1.4 1993/09/16 17:39:06 jtc Exp $"; -#endif - #include "diff.h" static struct change *find_hunk PARAMS((struct change *)); @@ -49,9 +45,13 @@ print_context_label (mark, inf, label) if (label) fprintf (outfile, "%s %s\n", mark, label); else - /* See Posix.2 section 4.17.6.1.4 for this format. */ - fprintf (outfile, "%s %s\t%s", - mark, inf->name, ctime (&inf->stat.st_mtime)); + { + char const *ct = ctime (&inf->stat.st_mtime); + if (!ct) + ct = "?\n"; + /* See Posix.2 section 4.17.6.1.4 for this format. */ + fprintf (outfile, "%s %s\t%s", mark, inf->name, ct); + } } /* Print a header for a context diff, with the file names and dates. */ |
