From f637abf1afe96ea36717ee4365b9405b0c7c1b17 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 16 Oct 2015 08:19:47 +0300 Subject: Fix build ordering issues. --- ChangeLog | 7 +++++++ Makefile.am | 15 +++++++++------ Makefile.in | 10 ++++++++-- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4eea7fd9..03222e4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-10-16 Arnold D. Robbins + + * Makefile.am (SUBDIRS): Fix ordering so that + make check directly after configure works properly. + Thanks to Michal Jaegermann + for the report. + 2015-10-11 Arnold D. Robbins * awkgram.y (yylex): Fix invalid read problems. diff --git a/Makefile.am b/Makefile.am index 342df292..460f9114 100644 --- a/Makefile.am +++ b/Makefile.am @@ -59,21 +59,24 @@ EXTRA_DIST = \ ylwrap # The order to do things in. +# # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. +# +# Build in extension before test so that +# ./configure && make check +# works properly too. +# # Build in awklib after in doc, since we want to extract # sample files if doc/gawk.texi changed. -SUBDIRS = \ - . \ - doc \ - awklib \ - po \ - test +SUBDIRS = . if ENABLE_EXTENSIONS SUBDIRS += extension endif +SUBDIRS += doc awklib po test + # what to make and install bin_PROGRAMS = gawk include_HEADERS = gawkapi.h diff --git a/Makefile.in b/Makefile.in index 08f434c1..1fb71a75 100644 --- a/Makefile.in +++ b/Makefile.in @@ -262,7 +262,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags CSCOPE = cscope -DIST_SUBDIRS = . doc awklib po test extension +DIST_SUBDIRS = . extension doc awklib po test am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in ABOUT-NLS \ AUTHORS COPYING ChangeLog INSTALL NEWS README awkgram.c \ command.c compile config.guess config.rpath config.sub depcomp \ @@ -477,11 +477,17 @@ EXTRA_DIST = \ # The order to do things in. +# # Build explicitly in "." in order to build gawk first, so # that `make check' without a prior `make' works. +# +# Build in extension before test so that +# ./configure && make check +# works properly too. +# # Build in awklib after in doc, since we want to extract # sample files if doc/gawk.texi changed. -SUBDIRS = . doc awklib po test $(am__append_1) +SUBDIRS = . $(am__append_1) doc awklib po test include_HEADERS = gawkapi.h # sources for both gawk and dgawk -- cgit v1.2.3 From 4423a72864dbeecf6251ce5543404f7baa20bf82 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 16 Oct 2015 08:20:54 +0300 Subject: Sync dfa.c with GNU grep. --- ChangeLog | 4 ++++ dfa.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03222e4c..d2153404 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ Thanks to Michal Jaegermann for the report. + Unrelated: + + * dfa.c: Sync with GNU grep. + 2015-10-11 Arnold D. Robbins * awkgram.y (yylex): Fix invalid read problems. diff --git a/dfa.c b/dfa.c index 8c245347..188a2d56 100644 --- a/dfa.c +++ b/dfa.c @@ -3982,6 +3982,9 @@ dfamust (struct dfa const *d) bool begline = false; bool endline = false; size_t rj; + bool need_begline = false; + bool need_endline = false; + bool case_fold_unibyte = case_fold && MB_CUR_MAX == 1; struct dfamust *dm; for (ri = 0; ri < d->tindex; ++ri) @@ -3992,10 +3995,12 @@ dfamust (struct dfa const *d) case BEGLINE: mp = allocmust (mp, 2); mp->begline = true; + need_begline = true; break; case ENDLINE: mp = allocmust (mp, 2); mp->endline = true; + need_endline = true; break; case LPAREN: case RPAREN: @@ -4072,7 +4077,9 @@ dfamust (struct dfa const *d) result = mp->in[i]; if (STREQ (result, mp->is)) { - exact = true; + if ((!need_begline || mp->begline) && (!need_endline + || mp->endline)) + exact = true; begline = mp->begline; endline = mp->endline; } @@ -4145,7 +4152,7 @@ dfamust (struct dfa const *d) t = j; while (++j < NOTCHAR) if (tstbit (j, *ccl) - && ! (case_fold && MB_CUR_MAX == 1 + && ! (case_fold_unibyte && toupper (j) == toupper (t))) break; if (j < NOTCHAR) @@ -4168,17 +4175,17 @@ dfamust (struct dfa const *d) } mp = allocmust (mp, ((rj - ri) >> 1) + 1); mp->is[0] = mp->left[0] = mp->right[0] - = case_fold && MB_CUR_MAX == 1 ? toupper (t) : t; + = case_fold_unibyte ? toupper (t) : t; for (i = 1; ri + 2 < rj; i++) { ri += 2; t = d->tokens[ri]; mp->is[i] = mp->left[i] = mp->right[i] - = case_fold && MB_CUR_MAX == 1 ? toupper (t) : t; + = case_fold_unibyte ? toupper (t) : t; } mp->is[i] = mp->left[i] = mp->right[i] = '\0'; - mp->in = enlist (mp->in, mp->is, i - 1); + mp->in = enlist (mp->in, mp->is, i); break; } } -- cgit v1.2.3 From 903fd5257ddcf8c4b7e4eead08969f3995b40a12 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 16 Oct 2015 08:24:37 +0300 Subject: Fix tbl issue in awkcard.in. --- doc/ChangeLog | 4 ++++ doc/awkcard.in | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index df40252b..fe5cb244 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2015-10-16 Arnold D. Robbins + + * awkcard.in: Fix tbl complaint. + 2015-10-07 Arnold D. Robbins * texinfo.tex: Updated to a working version. diff --git a/doc/awkcard.in b/doc/awkcard.in index 64b3c465..c2ae8a74 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1606,13 +1606,13 @@ may be used in place of .fi .TS expand; -l lw(2i). +l lw(1.9i). \*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR The arctangent of \*(FIy/x\fP in radians. \*(FCcos(\*(FIexpr\*(FC)\*(FR The cosine of \*(FIexpr\fP, which is in radians. \*(FCexp(\*(FIexpr\*(FC)\*(FR The exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). \*(FCint(\*(FIexpr\*(FC)\*(FR Truncate to integer. -\*(CB\*(FCintdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI res\*(FR\*(FC)\*(FR T{ -Return the result of integer division in \*(FIres\*(FR.\*(CD +\*(CB\*(FCintdiv(\*(FIn\*(FR\*(FC,\*(FI d\*(FR\*(FC,\*(FI r\*(FR\*(FC)\*(FR T{ +Return result of integer division in \*(FIr\*(FR.\*(CD T} \*(FClog(\*(FIexpr\*(FC)\*(FR The natural logarithm function (base \*(FIe\^\*(FR). \*(FCrand()\fP A random number \*(FIN\fP such that 0 \(<= \*(FIN\fP < 1. -- cgit v1.2.3