[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-ncurses] patch 6.2-20200829 broken somehow
From: |
Thomas Dickey |
Subject: |
Re: [bug-ncurses] patch 6.2-20200829 broken somehow |
Date: |
Mon, 31 Aug 2020 20:49:11 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Aug 31, 2020 at 03:47:07PM +0200, Dr. Werner Fink wrote:
> On 2020/08/31 15:03:24 +0200, Dr. Werner Fink wrote:
> > On 2020/08/31 11:41:33 +0200, Dr. Werner Fink wrote:
> > > Hi,
> > >
> > > I see errors in build below test directory
> >
> > Seems that the new mk-hdr.awk ignores the
> >
> > # Support for termcap (and tic, etc.), which can be a separate library
> > @ termlib
> > term.h
> > termcap.h
> >
> > entry in include/headers which leads to missed declarations due missed
> > term.h:
> >
> > @@ -4833,7 +5269,7 @@ checking for mbtowc... yes
> > checking for wcsrtombs... yes
> > checking for wcstombs... yes
> > checking definition to turn on extended curses functions... none
> > -checking for term.h... (cached) unknown
> > +checking for term.h... (cached) term.h
> > checking for unctrl.h... unctrl.h
> > checking for alloc_pair... yes
> > checking for assume_default_colors... yes
>
> I suggest the attached patch as this seems to script the newline at the and
> as well as all spaces there but leave the number of the members in subsets
> as given at the input
>
> --
> "Having a smoking section in a restaurant is like having
> a peeing section in a swimming pool." -- Edward Burr
> ---
> mk-1st.awk | 2 +-
> mk-2nd.awk | 2 +-
> mk-hdr.awk | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> --- mk-1st.awk
> +++ mk-1st.awk 2020-08-31 13:43:20.574386946 +0000
> @@ -262,7 +262,7 @@ function install_dll(directory,filename)
> function in_subset(value) {
> value = " " value " ";
> check = subset;
> - sub(" .*$", "", check);
> + sub(" *$", "", check);
> gsub("[+]", " ", check);
> check = " " check " ";
> return index(check,value);
thanks - that's the right place, but wrong fix. The point of the function
is that awk doesn't have regular expressions like
\<foo\>
to delimit words, so I made this function to put spaces around the value
and check for that string in a copy of the subset list. That shows up
in the log like this:
checking for library subsets... ticlib termlib+ext_tinfo base+widechar+ext_funcs
or this:
checking for library subsets...
termlib+ext_tinfo+base+port_drivers+port_tinfo+port_win32con+widechar+ext_funcs
The need for checking word-boundaries is that I made Juergen's configuration
"port_win32", which the older script confused with "port_win32con".
The "check" variable would look like this:
" termlib ext_tinfo base port_drivers port_tinfo port_win32con widechar
ext_funcs "
For whatever reason, I used this to strip the subsets starting with the
first space (a blunder, but late in the day in a large change...):
> - sub(" .*$", "", check);
While this would remove the first space from the string:
> + sub(" *$", "", check);
which would prevent " termlib " from matching in the example just shown.
Looking at it tonight, it seems that the entire statement can be discarded,
so I did that.
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature