diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2013-12-19 23:11:03 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2013-12-19 23:11:03 +0200 |
commit | 1f502d9a39c5b3b3df1b943fcae79b162a7ea74d (patch) | |
tree | 0e38d248e036ff3ec569a4ed6c50169a04f2e9a0 | |
parent | 4ea6e0780fbbd34d2f0d8e6b43c15c14d28b5d55 (diff) | |
parent | 477cb50c4c5b9e13e745a8e1413d532e27383d66 (diff) | |
download | egawk-1f502d9a39c5b3b3df1b943fcae79b162a7ea74d.tar.gz egawk-1f502d9a39c5b3b3df1b943fcae79b162a7ea74d.tar.bz2 egawk-1f502d9a39c5b3b3df1b943fcae79b162a7ea74d.zip |
Merge branch 'gawk-4.1-stable' into new-vms
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | awk.h | 4 | ||||
-rw-r--r-- | configh.in | 6 | ||||
-rwxr-xr-x | configure | 19 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | helpers/ChangeLog | 4 | ||||
-rwxr-xr-x | helpers/do.outline | 102 | ||||
-rw-r--r-- | regexec.c | 2 |
9 files changed, 123 insertions, 32 deletions
@@ -1,3 +1,14 @@ +2013-12-19 Arnold D. Robbins <arnold@skeeve.com> + + * regexec.c (re_search_internal): Make sure `dfa' pointer is + not NULL before trying to dereference it. + +2013-12-16 Arnold D. Robbins <arnold@skeeve.com> + + * configure.ac (AC_FUNC_VPRINTF): Remove. Not needed on current + systems. + * awk.h (HAVE_VPRINTF): Remove check. + 2013-12-12 John E. Malmberg <wb8tyw@qsl.net> * io.c (redirect): Add additional VMS error codes. @@ -19,7 +19,11 @@ Changes from 4.1.0 to 4.1.1 5. The debugger now lists source code correctly under Cygwin. -6. The -O option now works again. +6. Configuration and building Mac OS X libreadline should work now. + +7. The -O option now works again. + +8. The --include option, documented since 4.0, now actually works. XXX. A number of bugs have been fixed. See the ChangeLog. @@ -180,10 +180,6 @@ typedef int off_t; #define O_BINARY 0 #endif -#ifndef HAVE_VPRINTF -#error "you lose: you need a system with vfprintf" -#endif /* HAVE_VPRINTF */ - #ifndef HAVE_SETLOCALE #define setlocale(locale, val) /* nothing */ #endif /* HAVE_SETLOCALE */ @@ -42,9 +42,6 @@ */ #undef HAVE_DECL_TZNAME -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -296,9 +293,6 @@ /* Define to 1 if you have the `usleep' function. */ #undef HAVE_USLEEP -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - /* Define to 1 if you have the <wchar.h> header file. */ #undef HAVE_WCHAR_H @@ -8980,25 +8980,6 @@ fi -for ac_func in vprintf -do : - ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" -if test "x$ac_cv_func_vprintf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VPRINTF 1 -_ACEOF - -ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" -if test "x$ac_cv_func__doprnt" = xyes; then : - -$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h - -fi - -fi -done - - diff --git a/configure.ac b/configure.ac index 28d4f7d8..02267978 100644 --- a/configure.ac +++ b/configure.ac @@ -247,7 +247,6 @@ dnl Check for C11 _Noreturn GAWK_AC_NORETURN dnl checks for functions -AC_FUNC_VPRINTF AC_FUNC_MKTIME case "$ac_cv_func_working_mktime" in yes) AC_DEFINE(HAVE_MKTIME, 1, [we have the mktime function]) diff --git a/helpers/ChangeLog b/helpers/ChangeLog index 4b720787..a43fcd0c 100644 --- a/helpers/ChangeLog +++ b/helpers/ChangeLog @@ -1,3 +1,7 @@ +2013-12-12 Arnold D. Robbins <arnold@skeeve.com> + + * do.outline: New file. + 2013-06-27 Arnold D. Robbins <arnold@skeeve.com> * ChangeLog: Created. diff --git a/helpers/do.outline b/helpers/do.outline new file mode 100755 index 00000000..203d27ad --- /dev/null +++ b/helpers/do.outline @@ -0,0 +1,102 @@ +#! /usr/local/bin2/gawk -f + +# do.outline --- produce an outline of a texinfo document + +BEGIN { + # manifest constants + TRUE = 1 + FALSE = 0 + + # Levels at which different nodes can be + Level["@top"] = 0 + Level["@appendix"] = 1 + Level["@chapter"] = 1 + Level["@majorheading"] = 1 + Level["@unnumbered"] = 1 + Level["@preface"] = 1 + Level["@appendixsec"] = 2 + Level["@heading"] = 2 + Level["@section"] = 2 + Level["@unnumberedsec"] = 2 + Level["@unnumberedsubsec"] = 3 + Level["@appendixsubsec"] = 3 + Level["@subheading"] = 3 + Level["@subsection"] = 3 + Level["@appendixsubsubsec"] = 4 + Level["@subsubheading"] = 4 + Level["@subsubsection"] = 4 + Level["@unnumberedsubsubsec"] = 4 + + ah = bh = ch = 0 + + appendix = 0 +} + +/^@ignore/ && Pass == 1, /^@end[ \t]+ignore/ && Pass == 1 { + next +} + + +$1 in Level { + # save type + type = $1 + + lev = Level[$1] + + if (lev == 1 && tolower($0) !~ /preface|foreword/) { + if ($1 == "@appendix") { + appendix = next_appendix(appendix) + ah = appendix + } else + ah++ + bh = ch = dh = 0 + } else if (lev == 2) { + bh++ + ch = dh = 0 + } else if (lev == 3) { + ch++ + dh = 0 + } else if (lev == 4) + dh++ + + Unnumbered = ($1 ~ /^@unnumbered/) + + $1 = "" + $0 = preprocess($0) + + for (i = 1; i < lev; i++) + printf "\t" + + if (! Unnumbered) { + printf("%s.", ah) + if (bh) + printf("%d.", bh) + if (ch) + printf("%d.", ch) + if (dh) + printf("%d.", dh) + } + + printf("%s\n", $0) +} + +function preprocess(record) +{ + record = gensub(/@(code|command|samp|env)\{([^\}]+)\}/, "\\2", "g", record) + record = gensub(/@dots\{\}/, "...", "g", record) + + return record +} + +function next_appendix(cur, ind, letters) +{ + if (cur == 0) + return "A" # first time + + letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + ind = index(letters, cur) + if (ind > 0 && ind <= 26) + return substr(letters, ++ind, 1) + + return "Z" +} @@ -664,7 +664,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, nmatch -= extra_nmatch; /* Check if the DFA haven't been compiled. */ - if (BE (preg->used == 0 || dfa->init_state == NULL + if (BE (preg->used == 0 || dfa == NULL || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; |