Allow optional "+" in "-dF[+]filename" even if the filename is "stdout"

or "stderr".  Previously, the "+" was alowed only for real file names,
but it's easier to write the documentation if the "+" is always allowed.
This commit is contained in:
apb 2008-10-18 14:35:32 +00:00
parent aaf8f8f981
commit 1dd3e3655e

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.151 2008/10/06 22:09:21 joerg Exp $ */
/* $NetBSD: main.c,v 1.152 2008/10/18 14:35:32 apb Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: main.c,v 1.151 2008/10/06 22:09:21 joerg Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.152 2008/10/18 14:35:32 apb Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: main.c,v 1.151 2008/10/06 22:09:21 joerg Exp $");
__RCSID("$NetBSD: main.c,v 1.152 2008/10/18 14:35:32 apb Exp $");
#endif
#endif /* not lint */
#endif
@ -263,16 +263,16 @@ parse_debug_options(const char *argvalue)
if (*++modules == '+')
mode = "a";
else {
if (!strcmp(modules, "stdout")) {
debug_file = stdout;
return;
}
if (!strcmp(modules, "stderr")) {
debug_file = stderr;
return;
}
mode = "w";
}
if (!strcmp(modules, "stdout")) {
debug_file = stdout;
return;
}
if (!strcmp(modules, "stderr")) {
debug_file = stderr;
return;
}
len = strlen(modules);
fname = malloc(len + 20);
memcpy(fname, modules, len + 1);