From 2b6c28f287528c14f9d614f398e75f297d8ff6c3 Mon Sep 17 00:00:00 2001 From: thepish Date: Sun, 18 Oct 1998 04:46:24 +0000 Subject: PR: 7583 Submitted by: Dave Glowacki Support input via stdin if no input file name specified explicitly --- usr.bin/indent/indent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.bin/indent') diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index 4dba8d5..ff5e420 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -46,7 +46,7 @@ static const char copyright[] = static char sccsid[] = "@(#)indent.c 5.17 (Berkeley) 6/7/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: indent.c,v 1.2 1997/07/15 09:50:59 charnier Exp $"; #endif /* not lint */ #include @@ -209,10 +209,10 @@ main(argc, argv) set_option(argv[i]); } /* end of for */ if (input == 0) { - usage(); + input = stdin; } if (output == 0) - if (troff) + if (troff || input == stdin) output = stdout; else { out_name = in_name; @@ -1133,7 +1133,7 @@ check_type: static void usage() { - fprintf(stderr, "usage: indent file [ outfile ] [ options ]\n"); + fprintf(stderr, "usage: indent [ file [ outfile ] ] [ options ]\n"); exit(1); } -- cgit v1.1