From 12e05615041147de61658bda8f5e7d5a4acd87c3 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 26 Aug 2014 21:18:03 +0300 Subject: Remove support for MirBSD. Yay! --- main.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 49cdf51f..fc87d605 100644 --- a/main.c +++ b/main.c @@ -262,17 +262,6 @@ main(int argc, char **argv) */ gawk_mb_cur_max = MB_CUR_MAX; /* Without MBS_SUPPORT, gawk_mb_cur_max is 1. */ -#ifdef LIBC_IS_BORKED -{ - const char *env_lc; - - env_lc = getenv("LC_ALL"); - if (env_lc == NULL) - env_lc = getenv("LANG"); - if (env_lc != NULL && env_lc[1] == '\0' && tolower(env_lc[0]) == 'c') - gawk_mb_cur_max = 1; -} -#endif /* init the cache for checking bytes if they're characters */ init_btowc_cache(); -- cgit v1.2.3 From 0f5cb955662136ad4a93e35db5721dd986dfd55b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 5 Sep 2014 11:21:38 +0300 Subject: Add builtin functions to FUNCTAB and PROCINFO["identifiers"] and doc. --- main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 4ce39ba0..129382c1 100644 --- a/main.c +++ b/main.c @@ -705,6 +705,8 @@ out: if (do_intl) exit(EXIT_SUCCESS); + install_builtins(); + if (do_lint) shadow_funcs(); -- cgit v1.2.3 From f9fadc3b2bf0bf9d65a981a712aa9aebc21a699b Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 7 Sep 2014 20:41:47 +0300 Subject: Minor code cleanups. --- main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 129382c1..e46b0796 100644 --- a/main.c +++ b/main.c @@ -33,6 +33,16 @@ #include #endif +#ifdef HAVE_LIBSIGSEGV +#include +#else +typedef void *stackoverflow_context_t; +/* the argument to this macro is purposely not used */ +#define sigsegv_install_handler(catchsegv) signal(SIGSEGV, catchsig) +/* define as 0 rather than empty so that (void) cast on it works */ +#define stackoverflow_install_handler(catchstackoverflow, extra_stack, STACK_SIZE) 0 +#endif + #define DEFAULT_PROFILE "awkprof.out" /* where to put profile */ #define DEFAULT_VARFILE "awkvars.out" /* where to put vars */ #define DEFAULT_PREC 53 -- cgit v1.2.3 From 3fcce8a32e825dd10384d5276c420c2514442fe2 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 15 Sep 2014 19:47:03 +0300 Subject: Finish excising isalpha and isalnum. Document. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index e46b0796..645a4561 100644 --- a/main.c +++ b/main.c @@ -1337,11 +1337,11 @@ arg_assign(char *arg, bool initing) /* first check that the variable name has valid syntax */ badvar = false; - if (! isalpha((unsigned char) arg[0]) && arg[0] != '_') + if (! is_alpha((unsigned char) arg[0]) && arg[0] != '_') badvar = true; else for (cp2 = arg+1; *cp2; cp2++) - if (! isalnum((unsigned char) *cp2) && *cp2 != '_') { + if (! is_identchar((unsigned char) *cp2)) { badvar = true; break; } -- cgit v1.2.3 From 2072cca806ac43a5ee0d422749e9e0c5f7611d47 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Tue, 30 Sep 2014 09:55:51 -0400 Subject: Fix minor bug: the "-h" option should not require an argument. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 645a4561..03decbb8 100644 --- a/main.c +++ b/main.c @@ -212,7 +212,7 @@ main(int argc, char **argv) /* * The + on the front tells GNU getopt not to rearrange argv. */ - const char *optlist = "+F:f:v:W;bcCd::D::e:E:gh:i:l:L:nNo::Op::MPrStVY"; + const char *optlist = "+F:f:v:W;bcCd::D::e:E:ghi:l:L:nNo::Op::MPrStVY"; bool stopped_early = false; int old_optind; int i; -- cgit v1.2.3