Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/bc/bc Spelling correction. Get long options workin...
details: https://anonhg.NetBSD.org/src/rev/4eeb10affaa1
branches: trunk
changeset: 503928:4eeb10affaa1
user: phil <phil%NetBSD.org@localhost>
date: Sun Feb 18 06:58:05 2001 +0000
description:
Spelling correction. Get long options working correctly.
diffstat:
gnu/dist/bc/bc/main.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (49 lines):
diff -r 698649477209 -r 4eeb10affaa1 gnu/dist/bc/bc/main.c
--- a/gnu/dist/bc/bc/main.c Sun Feb 18 06:51:18 2001 +0000
+++ b/gnu/dist/bc/bc/main.c Sun Feb 18 06:58:05 2001 +0000
@@ -30,6 +30,7 @@
#include "bcdefs.h"
#include <signal.h>
+#include <errno.h>
#include "global.h"
#include "proto.h"
#include "getopt.h"
@@ -63,7 +64,7 @@
printf ("usage: %s [options] [file ...]\n%s%s%s%s%s%s%s", progname,
" -h --help print this usage and exit\n",
" -i --interactive force interactive mode\n",
- " -l --mathlib use the predefine math routnes\n",
+ " -l --mathlib use the predefined math routines\n",
" -q --quiet don't print initial banner\n",
" -s --standard non-standard bc constructs are errors\n",
" -w --warn warn about non-standard bc constructs\n",
@@ -93,6 +94,9 @@
switch (optch)
{
+ case 0: /* Long option setting a var. */
+ break;
+
case 'c': /* compile only */
compile_only = TRUE;
break;
@@ -167,7 +171,7 @@
interactive = TRUE;
else
interactive = FALSE;
- quiet = TRUE;
+ quiet = FALSE;
file_names = NULL;
#ifdef HAVE_SETVBUF
@@ -347,6 +351,8 @@
use_quit (sig)
int sig;
{
- printf ("\n(interrupt) use quit to exit.\n");
+ int save = errno;
+ write (1, "\n(interrupt) use quit to exit.\n", 31);
signal (SIGINT, use_quit);
+ errno = save;
}
Home |
Main Index |
Thread Index |
Old Index