Make msgfile optional like other OS's
This commit is contained in:
parent
8e707c4932
commit
6e1ec48784
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: gencat.1,v 1.12 2009/03/09 19:24:32 joerg Exp $
|
||||
.\" $NetBSD: gencat.1,v 1.13 2011/12/29 16:41:38 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
@ -29,7 +29,7 @@
|
||||
.\"
|
||||
.\" Written by Kee Hinckley <nazgul@somewhere.com>
|
||||
.\"
|
||||
.Dd November 4, 2008
|
||||
.Dd December 29, 2011
|
||||
.Dt GENCAT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -38,14 +38,13 @@
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Ar catfile
|
||||
.Ar msgfile
|
||||
.Op Ar msgfile ...
|
||||
.Op Ar msgfile|- ...
|
||||
.Sh DESCRIPTION
|
||||
The
|
||||
.Nm
|
||||
utility generates a formatted message catalog
|
||||
.Ar catfile
|
||||
from one or more message source text files
|
||||
from stdin or one or more message source text files
|
||||
.Ar msgfile .
|
||||
The file
|
||||
.Ar catfile
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gencat.c,v 1.32 2011/09/21 14:33:35 christos Exp $ */
|
||||
/* $NetBSD: gencat.c,v 1.33 2011/12/29 16:41:38 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: gencat.c,v 1.32 2011/09/21 14:33:35 christos Exp $");
|
||||
__RCSID("$NetBSD: gencat.c,v 1.33 2011/12/29 16:41:38 christos Exp $");
|
||||
#endif
|
||||
|
||||
/***********************************************************
|
||||
@ -163,7 +163,7 @@ main(int argc, char *argv[])
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (argc < 2) {
|
||||
if (argc < 1) {
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
@ -193,8 +193,8 @@ main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (((*argv)[0] == '-') && ((*argv)[1] == '\0')) {
|
||||
if (argc != 2)
|
||||
if (argc < 2 || (((*argv)[0] == '-') && ((*argv)[1] == '\0'))) {
|
||||
if (argc > 2)
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
MCParse(STDIN_FILENO);
|
||||
|
Loading…
Reference in New Issue
Block a user