#! /bin/sh - # # This is patch #2 to gawk 3.1. cd to gawk-3.1.1 and sh this file. # Then remove all the .orig files and rename the directory gawk-3.1.2 # Changes to files that are automatically recreated have been omitted. # They will be recreated the first time you run make. # This includes all the extracted example files in awklib. # first, remove files that don't have new versions rm acconfig.h dfa.c dfa.h stamp-h.in test/poundbang.ok (cd m4 rm -f jm-mktime.m4 largefile.m4 ssize_t.m4) (cd po rm -f Rules-quot boldquot.sed en@boldquot.header en@quot.header rm -f insert-header.sin quot.sed) # rename files (cd test ; mv manpage longwrds.in) # remove files that will be replaced from shar archive rm -f Makefile.in */Makefile.in acinclude.m4 bisonfix.sed configh.in rm -f configure mkinstalldirs po/POTFILES.in regex.c test/Makefile.am #! /bin/sh echo - 'Makefile.in' cat << 'EOF' > 'Makefile.in' # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Makefile.am --- automake input file for gawk # # Copyright (C) 2000-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"$(datadir)/locale\"" DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ U = @U@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ # Set autoconf Makefile.in variables correctly datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@/awk localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # Automatic de-ANSI-fication if needed, make .bz2 files also. AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 # This undocumented variable insures that aclocal runs # correctly after changing configure.in ACLOCAL_AMFLAGS = -I m4 # This insures that make flags get passed down to child makes. AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)' # Stuff to include in the dist that doesn't need it's own # Makefile.am files EXTRA_DIST = \ COPYING \ FUTURES \ INSTALL \ LIMITATIONS \ NEWS \ POSIX.STD \ PROBLEMS \ README_d \ bisonfix.sed \ config.guess \ config.rpath \ config.sub \ depcomp \ extension \ fixvers \ m4 \ missing \ missing_d \ pc \ posix \ regcomp.c \ regex_internal.c \ regex_internal.h \ regexec.c \ unsupported \ vms \ ylwrap # The order to do things in. # Build in intl first in case we need the local gettext version. # Build explicitly "." next in order to build gawk first, so # that `make check' without a prior `make' works. SUBDIRS = \ intl \ . \ awklib \ doc \ po \ test # what to make and install bin_PROGRAMS = gawk pgawk # sources for both gawk and pgawk base_sources = \ array.c \ awk.h \ awkgram.y \ builtin.c \ custom.h \ ext.c \ field.c \ gawkmisc.c \ getopt.c \ getopt.h \ getopt1.c \ gettext.h \ io.c \ main.c \ msg.c \ node.c \ patchlev.h \ protos.h \ random.c \ random.h \ re.c \ regex.c \ regex.h \ replace.c \ version.in \ version.c gawk_SOURCES = $(base_sources) eval.c profile.c pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c # Get extra libs as needed LDADD = @LIBINTL@ @SOCKET_LIBS@ awkdatadir = @datadir@/awk # stuff for compiling gawk/pgawk DEFPATH = "\".$(PATH_SEPARATOR)$(awkdatadir)\"" INCLUDES = -I$(srcdir)/intl # We want hard links for install-exec-hook, below LN = ln subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = intl/Makefile bin_PROGRAMS = gawk$(EXEEXT) pgawk$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__objects_1 = array$U.$(OBJEXT) awkgram$U.$(OBJEXT) \ builtin$U.$(OBJEXT) ext$U.$(OBJEXT) field$U.$(OBJEXT) \ gawkmisc$U.$(OBJEXT) getopt$U.$(OBJEXT) getopt1$U.$(OBJEXT) \ io$U.$(OBJEXT) main$U.$(OBJEXT) msg$U.$(OBJEXT) \ node$U.$(OBJEXT) random$U.$(OBJEXT) re$U.$(OBJEXT) \ regex$U.$(OBJEXT) replace$U.$(OBJEXT) version$U.$(OBJEXT) am_gawk_OBJECTS = $(am__objects_1) eval$U.$(OBJEXT) profile$U.$(OBJEXT) gawk_OBJECTS = $(am_gawk_OBJECTS) gawk_LDADD = $(LDADD) gawk_DEPENDENCIES = gawk_LDFLAGS = am_pgawk_OBJECTS = $(am__objects_1) eval_p$U.$(OBJEXT) \ profile_p$U.$(OBJEXT) pgawk_OBJECTS = $(am_pgawk_OBJECTS) pgawk_LDADD = $(LDADD) pgawk_DEPENDENCIES = pgawk_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array$U.Po ./$(DEPDIR)/awkgram$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/builtin$U.Po ./$(DEPDIR)/eval$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/eval_p$U.Po ./$(DEPDIR)/ext$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/field$U.Po ./$(DEPDIR)/gawkmisc$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/getopt$U.Po ./$(DEPDIR)/getopt1$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/io$U.Po ./$(DEPDIR)/main$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/msg$U.Po ./$(DEPDIR)/node$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/profile$U.Po ./$(DEPDIR)/profile_p$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/random$U.Po ./$(DEPDIR)/re$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/regex$U.Po ./$(DEPDIR)/replace$U.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/version$U.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) YLWRAP = $(top_srcdir)/ylwrap DIST_SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \ Makefile.am Makefile.in NEWS acinclude.m4 aclocal.m4 ansi2knr.1 \ ansi2knr.c awkgram.c config.guess config.rpath config.sub \ configh.in configure configure.in depcomp install-sh missing \ mkinstalldirs ylwrap DIST_SUBDIRS = $(SUBDIRS) SOURCES = $(gawk_SOURCES) $(pgawk_SOURCES) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj .y am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): configure.in acinclude.m4 m4/arch.m4 m4/codeset.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes-pri.m4 m4/inttypes.m4 m4/inttypes_h.m4 m4/isc-posix.m4 m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/progtest.m4 m4/socket.m4 m4/stdint_h.m4 m4/strtod.m4 m4/uintmax_t.m4 m4/ulonglong.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/configh.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/configh.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/configh.in distclean-hdr: -rm -f config.h stamp-h1 intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) @rm -f gawk$(EXEEXT) $(LINK) $(gawk_LDFLAGS) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS) pgawk$(EXEEXT): $(pgawk_OBJECTS) $(pgawk_DEPENDENCIES) @rm -f pgawk$(EXEEXT) $(LINK) $(pgawk_LDFLAGS) $(pgawk_OBJECTS) $(pgawk_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c ANSI2KNR = @ANSI2KNR@ ansi2knr: ansi2knr.$(OBJEXT) $(LINK) ansi2knr.$(OBJEXT) $(LIBS) ansi2knr.$(OBJEXT): $(CONFIG_HEADER) clean-krextra: -rm -f ansi2knr mostlyclean-kr: -test "$U" = "" || rm -f *_.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/awkgram$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eval_p$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ext$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gawkmisc$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/profile_p$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/re$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replace$U.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version$U.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` array_.c: array.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/array.c; then echo $(srcdir)/array.c; else echo array.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ awkgram_.c: awkgram.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/awkgram.c; then echo $(srcdir)/awkgram.c; else echo awkgram.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ builtin_.c: builtin.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/builtin.c; then echo $(srcdir)/builtin.c; else echo builtin.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ eval_.c: eval.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval.c; then echo $(srcdir)/eval.c; else echo eval.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ eval_p_.c: eval_p.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eval_p.c; then echo $(srcdir)/eval_p.c; else echo eval_p.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ ext_.c: ext.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ext.c; then echo $(srcdir)/ext.c; else echo ext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ field_.c: field.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/field.c; then echo $(srcdir)/field.c; else echo field.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ gawkmisc_.c: gawkmisc.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gawkmisc.c; then echo $(srcdir)/gawkmisc.c; else echo gawkmisc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ getopt_.c: getopt.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt.c; then echo $(srcdir)/getopt.c; else echo getopt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ getopt1_.c: getopt1.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/getopt1.c; then echo $(srcdir)/getopt1.c; else echo getopt1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ io_.c: io.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/io.c; then echo $(srcdir)/io.c; else echo io.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ main_.c: main.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ msg_.c: msg.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/msg.c; then echo $(srcdir)/msg.c; else echo msg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ node_.c: node.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/node.c; then echo $(srcdir)/node.c; else echo node.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ profile_.c: profile.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/profile.c; then echo $(srcdir)/profile.c; else echo profile.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ profile_p_.c: profile_p.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/profile_p.c; then echo $(srcdir)/profile_p.c; else echo profile_p.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ random_.c: random.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/random.c; then echo $(srcdir)/random.c; else echo random.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ re_.c: re.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/re.c; then echo $(srcdir)/re.c; else echo re.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ regex_.c: regex.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/regex.c; then echo $(srcdir)/regex.c; else echo regex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ replace_.c: replace.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/replace.c; then echo $(srcdir)/replace.c; else echo replace.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ version_.c: version.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/version.c; then echo $(srcdir)/version.c; else echo version.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ array_.$(OBJEXT) awkgram_.$(OBJEXT) builtin_.$(OBJEXT) eval_.$(OBJEXT) \ eval_p_.$(OBJEXT) ext_.$(OBJEXT) field_.$(OBJEXT) gawkmisc_.$(OBJEXT) \ getopt_.$(OBJEXT) getopt1_.$(OBJEXT) io_.$(OBJEXT) main_.$(OBJEXT) \ msg_.$(OBJEXT) node_.$(OBJEXT) profile_.$(OBJEXT) profile_p_.$(OBJEXT) \ random_.$(OBJEXT) re_.$(OBJEXT) regex_.$(OBJEXT) replace_.$(OBJEXT) \ version_.$(OBJEXT) : $(ANSI2KNR) .y.c: $(SHELL) $(YLWRAP) `test -f '$<' || echo '$(srcdir)/'`$< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) configh.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) configh.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/intl $(distdir)/po @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ --with-included-gettext \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(ANSI2KNR) $(PROGRAMS) config.h installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f awkgram.c clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-krextra mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic mostlyclean-kr pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ check-local clean clean-binPROGRAMS clean-generic clean-krextra \ clean-recursive ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip distcheck distclean distclean-compile \ distclean-depend distclean-generic distclean-hdr \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am dvi-recursive info info-am \ info-recursive install install-am install-binPROGRAMS \ install-data install-data-am install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-kr mostlyclean-recursive pdf \ pdf-am pdf-recursive ps ps-am ps-recursive tags tags-recursive \ uninstall uninstall-am uninstall-binPROGRAMS uninstall-info-am \ uninstall-info-recursive uninstall-recursive # First, add a link from gawk to gawk-X.Y.Z # Same for pgawk # For systems where gawk is awk, add a link to awk install-exec-hook: (fullname=gawk-`./gawk --version | sed 1q | awk '{print $$3}'` ; \ cd $(DESTDIR)$(bindir); \ $(LN) gawk $$fullname 2>/dev/null ; \ $(LN) pgawk p$$fullname 2>/dev/null ; \ if [ ! -f awk$(EXEEXT) ]; \ then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ fi; exit 0) # Undo the above when uninstalling uninstall-links: (cd $(DESTDIR)$(bindir); \ if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \ rm -f $$fullname p$$fullname; exit 0) uninstall-recursive: uninstall-links # force there to be a gawk executable before running tests check-local: gawk$(EXEEXT) pgawk$(EXEEXT) # A little extra clean up when making distributions. # FIXME: most of this rule should go away upon switching to libtool. dist-hook: cd $(distdir)/extension ; rm -f *.o *.so # Special rules for individual files awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && sed -f $(srcdir)/bisonfix.sed < y.tab.c > $*.c && $(RM) y.tab.c if test -f y.tab.h; then \ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi # These force version and patchlevel to be up to date based # on what's in configure.in. No-one else but me should have # to use them. So there. patchlev.h: configure.in $(srcdir)/fixvers -p version.c: configure.in version.in $(srcdir)/fixvers -v # This is for my development & testing. efence: gawk $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: EOF echo - 'README_d/README.aix' cat << 'EOF' > 'README_d/README.aix' Tue Mar 11 13:21:26 IST 2003 ============================ On AIX 4.2 systems, you need: ./configure --disable-nls && make all check install EOF echo - 'README_d/README.hpux' cat << 'EOF' > 'README_d/README.hpux' Mon, 27 May 2002 17:55:46 +0800 ------------------------------- The network support "|&" may not work under HP-UX 11. An error message appears similar to this: gawk: test_script.awk:3: fatal: get_a_record: iop->buf: can't allocate -61246 bytes of memory (not enough space) Solution: This is a bug in the fstat() call of HP-UX 11.00, please apply the cumulative ARPA Transport patch PHNE_26771 to fix it. The following is the related description in PHNE_26771: Customer's application gets the wrong value from fstat(). Resolution: The value returned via st_blksize is now retrieved from the same info as in 10.20. In case you cannot apply the HP patch, the attached patch to gawk source might work. Xiang Zhao Stepan Kasal --- gawk-3.1.2-plain/posix/gawkmisc.c Tue Apr 16 13:58:41 2002 +++ gawk-3.1.2-hpux/posix/gawkmisc.c Fri May 24 11:46:35 2002 @@ -77,7 +77,13 @@ * meant for in the first place. */ #ifdef HAVE_ST_BLKSIZE -#define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) + /* + * 100k must be enough for everybody, + * bigger number means probably a bug in fstat() + */ +#define MAXBLKSIZE 102400 +#define DEFBLKSIZE (stb->st_blksize > 0 && stb->st_blksize <= MAXBLKSIZE \ + ? stb->st_blksize : BUFSIZ) #else #define DEFBLKSIZE BUFSIZ #endif EOF echo - 'acinclude.m4' cat << 'EOF' > 'acinclude.m4' m4_sinclude(arch.m4)dnl m4_sinclude(gettext.m4)dnl m4_sinclude(lcmessage.m4)dnl m4_sinclude(progtest.m4)dnl m4_sinclude(socket.m4)dnl m4_sinclude(strtod.m4)dnl EOF echo - 'awklib/Makefile.in' cat << 'EOF' > 'awklib/Makefile.in' # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # awklib/Makefile.am --- automake input file for gawk # # Copyright (C) 1995-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ U = @U@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@/awk exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@/awk localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = ChangeLog extract.awk eg stamp-eg # This is so we get config.h. It'll be in the build directory, # not the source directory. INCLUDES = -I.. bin_SCRIPTS = igawk libexec_PROGRAMS = pwcat grcat AUXAWK = passwd.awk group.awk nodist_grcat_SOURCES = grcat.c nodist_pwcat_SOURCES = pwcat.c subdir = awklib mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = libexec_PROGRAMS = pwcat$(EXEEXT) grcat$(EXEEXT) PROGRAMS = $(libexec_PROGRAMS) nodist_grcat_OBJECTS = grcat.$(OBJEXT) grcat_OBJECTS = $(nodist_grcat_OBJECTS) grcat_LDADD = $(LDADD) grcat_DEPENDENCIES = grcat_LDFLAGS = nodist_pwcat_OBJECTS = pwcat.$(OBJEXT) pwcat_OBJECTS = $(nodist_pwcat_OBJECTS) pwcat_LDADD = $(LDADD) pwcat_DEPENDENCIES = pwcat_LDFLAGS = SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/grcat.Po ./$(DEPDIR)/pwcat.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = DIST_COMMON = ChangeLog Makefile.am Makefile.in SOURCES = $(nodist_grcat_SOURCES) $(nodist_pwcat_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu awklib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libexecdir) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(libexecPROGRAMS_INSTALL) $$p $(DESTDIR)$(libexecdir)/$$f || exit 1; \ else :; fi; \ done uninstall-libexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(libexec_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(libexecdir)/$$f"; \ rm -f $(DESTDIR)$(libexecdir)/$$f; \ done clean-libexecPROGRAMS: -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grcat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwcat.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: $(mkinstalldirs) $(DESTDIR)$(libexecdir) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libexecPROGRAMS clean-local mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binSCRIPTS install-libexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am \ uninstall-libexecPROGRAMS uninstall-local .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libexecPROGRAMS clean-local ctags distclean \ distclean-compile distclean-depend distclean-generic \ distclean-tags distdir dvi dvi-am info info-am install \ install-am install-binSCRIPTS install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-libexecPROGRAMS install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-info-am \ uninstall-libexecPROGRAMS uninstall-local all: stamp-eg $(AUXPROGS) igawk $(AUXAWK) install-exec-hook: $(AUXAWK) $(mkinstalldirs) $(DESTDIR)$(datadir) for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \ progname=`echo $$i | sed 's;.*/;;'` ; \ $(INSTALL_DATA) $$i $(DESTDIR)$(datadir)/$$progname ; \ done # libexecdir and datadir are removed in the top level Makefile's uninstall uninstall-local: rm -fr $(DESTDIR)$(libexecdir)/* $(DESTDIR)$(datadir)/* rm -f $(DESTDIR)$(bindir)/igawk clean-local: rm -f $(AUXAWK) igawk *.exe stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi rm -fr eg stamp-eg $(AWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi @echo 'some makes are stupid and will not check a directory' > stamp-eg @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ passwd.awk: $(srcdir)/eg/lib/passwdawk.in (cd $(srcdir)/eg/lib ; \ sed 's;/usr/local/libexec/awk;$(libexecdir);' < passwdawk.in) > passwd.awk group.awk: $(srcdir)/eg/lib/groupawk.in (cd $(srcdir)/eg/lib ; \ sed 's;/usr/local/libexec/awk;$(libexecdir);' < groupawk.in) > group.awk # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: EOF echo - 'bisonfix.sed' cat << 'EOF' > 'bisonfix.sed' /\/\* The parser invokes alloca or malloc; define the necessary symbols. *\*\//a\ \ #undef YYSTACK_USE_ALLOCA /* Gawk: nuke alloca once and for all */ EOF echo - 'configh.in' cat << 'EOF' > 'configh.in' /* configh.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* dynamic loading is possible */ #undef DYNAMIC /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'. */ #undef GETGROUPS_T /* Define to 1 if the `getpgrp' function requires zero arguments. */ #undef GETPGRP_VOID /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `feof_unlocked' function. */ #undef HAVE_FEOF_UNLOCKED /* Define to 1 if you have the `fgets_unlocked' function. */ #undef HAVE_FGETS_UNLOCKED /* Define to 1 if you have the `fmod' function. */ #undef HAVE_FMOD /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getc_unlocked' function. */ #undef HAVE_GETC_UNLOCKED /* Define to 1 if you have the `getegid' function. */ #undef HAVE_GETEGID /* Define to 1 if you have the `geteuid' function. */ #undef HAVE_GETEUID /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID /* Define to 1 if you have the `getgrent' function. */ #undef HAVE_GETGRENT /* Define to 1 if you have the `getgroups' function. */ #undef HAVE_GETGROUPS /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define to 1 if you have the `grantpt' function. */ #undef HAVE_GRANTPT /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define if exists and doesn't clash with . */ #undef HAVE_INTTYPES_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_INTTYPES_H_WITH_UINTMAX /* Define if you have and nl_langinfo(CODESET). */ #undef HAVE_LANGINFO_CODESET /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the `dl' library (-ldl). */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `mbrlen' function. */ #undef HAVE_MBRLEN /* Define to 1 if you have the `mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define to 1 if you have the header file. */ #undef HAVE_MCHECK_H /* Define to 1 if you have the `memcmp' function. */ #undef HAVE_MEMCMP /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* we have the mktime function */ #undef HAVE_MKTIME /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NL_TYPES_H /* we have portals on /p on this system */ #undef HAVE_PORTALS /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the header file. */ #undef HAVE_SIGNUM_H /* we have sockets on this system */ #undef HAVE_SOCKETS /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define if exists, doesn't clash with , and declares uintmax_t. */ #undef HAVE_STDINT_H_WITH_UINTMAX /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `stpcpy' function. */ #undef HAVE_STPCPY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if cpp supports the ANSI # stringizing operator. */ #undef HAVE_STRINGIZE /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strtod' function. */ #undef HAVE_STRTOD /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* Define to 1 if `tm_zone' is member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE /* Define to 1 if you have the `system' function. */ #undef HAVE_SYSTEM /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #undef HAVE_TZNAME /* Define to 1 if you have the `tzset' function. */ #undef HAVE_TZSET /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the unsigned long long type. */ #undef HAVE_UNSIGNED_LONG_LONG /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if you have the `__argz_count' function. */ #undef HAVE___ARGZ_COUNT /* Define to 1 if you have the `__argz_next' function. */ #undef HAVE___ARGZ_NEXT /* Define to 1 if you have the `__argz_stringify' function. */ #undef HAVE___ARGZ_STRINGIFY /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if integer division by zero raises signal SIGFPE. */ #undef INTDIV0_RAISES_SIGFPE /* disable lint checks */ #undef NO_LINT /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if exists and defines unusable PRI* macros. */ #undef PRI_MACROS_BROKEN /* Define if compiler has function prototypes */ #undef PROTOTYPES /* use malloc instead of alloca in regex.c */ #undef REGEX_MALLOC /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* return type of sprintf */ #undef SPRINTF_RET /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* strtod doesn't have C89 semantics */ #undef STRTOD_NOT_C89 /* some systems define this type here */ #undef TIME_T_IN_SYS_TYPES_H /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* force use of our version of strftime */ #undef USE_INCLUDED_STRFTIME /* Version number of package */ #undef VERSION /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if doesn't define. */ #undef gid_t /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ #undef inline /* Define to `long' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define to unsigned long or unsigned long long if and don't define. */ #undef uintmax_t EOF echo - 'configure' cat << 'EOF' > 'configure' #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57 for GNU Awk 3.1.2. # # Report bugs to . # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='GNU Awk' PACKAGE_TARNAME='gawk' PACKAGE_VERSION='3.1.2' PACKAGE_STRING='GNU Awk 3.1.2' PACKAGE_BUGREPORT='bug-gawk@gnu.org' # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot EGREP YACC LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP RANLIB ac_ct_RANLIB U ANSI2KNR MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LIBOBJS SOCKET_LIBS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures GNU Awk 3.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GNU Awk 3.1.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-portals Enable /p as path prefix for portals --disable-lint Disable gawk lint checking --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors --disable-largefile omit support for large files --disable-rpath do not hardcode runtime library paths --disable-nls do not use Native Language Support Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-whiny-user-strftime Force use of included version of strftime for deficient systems --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-included-gettext use the GNU gettext library included here --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF GNU Awk configure 3.1.2 generated by GNU Autoconf 2.57 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU Awk $as_me 3.1.2, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # This is a hack. Different versions of install on different systems # are just too different. Chuck it and use install-sh. # # If the user supplies $INSTALL, figure they know what they're doing. # # With Autoconf 2.5x, this needs to come very early on, but *after* # the INIT macro. Sigh. if test "x$INSTALL" = "x" then INSTALL="$srcdir/install-sh -c" export INSTALL fi ac_config_headers="$ac_config_headers config.h:configh.in" am__api_version="1.7" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=gawk VERSION=3.1.2 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Check whether --enable-portals or --disable-portals was given. if test "${enable_portals+set}" = set; then enableval="$enable_portals" cat >>confdefs.h <<\_ACEOF #define HAVE_PORTALS 1 _ACEOF fi; # Check whether --with-whiny-user-strftime or --without-whiny-user-strftime was given. if test "${with_whiny_user_strftime+set}" = set; then withval="$with_whiny_user_strftime" if test "$withval" = yes then cat >>confdefs.h <<\_ACEOF #define USE_INCLUDED_STRFTIME 1 _ACEOF fi fi; # Check whether --enable-lint or --disable-lint was given. if test "${enable_lint+set}" = set; then enableval="$enable_lint" if test "$enableval" = no then cat >>confdefs.h <<\_ACEOF #define NO_LINT 1 _ACEOF fi fi; echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' doit: @echo done END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. echo '#include "conftest.h"' > conftest.c echo 'int i;' > conftest.h echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ >/dev/null 2>conftest.err && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi # This is mainly for my use during testing and development. # Yes, it's a bit of a hack. echo "$as_me:$LINENO: checking for special development options" >&5 echo $ECHO_N "checking for special development options... $ECHO_C" >&6 if test -f $srcdir/.developing then # add other debug flags as appropriate, save GAWKDEBUG for emergencies CFLAGS="$CFLAGS -DARRAYDEBUG" # turn on compiler warnings if we're doing development if test "$GCC" = yes then CFLAGS="$CFLAGS -Wall" fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest* echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 if test "${ac_cv_lib_cposix_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcposix $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_cposix_strerror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_cposix_strerror=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 if test $ac_cv_lib_cposix_strerror = yes; then LIBS="$LIBS -lcposix" fi echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi # Check whether --enable-largefile or --disable-largefile was given. if test "${enable_largefile+set}" = set; then enableval="$enable_largefile" fi; if test "$enable_largefile" != no; then echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext CC="$CC -n32" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do ac_cv_sys_file_offset_bits=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext break done fi echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 if test "$ac_cv_sys_file_offset_bits" != no; then cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF fi rm -f conftest* echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do ac_cv_sys_large_files=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext break done fi echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6 if test "$ac_cv_sys_large_files" != no; then cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF fi rm -f conftest* fi echo "$as_me:$LINENO: checking for AIX compilation hacks" >&5 echo $ECHO_N "checking for AIX compilation hacks... $ECHO_C" >&6 if test "${gawk_cv_aix_hack+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -d /lpp then CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" gawk_cv_aix_hack=yes else gawk_cv_aix_hack=no fi fi echo "$as_me:$LINENO: result: ${gawk_cv_aix_hack}" >&5 echo "${ECHO_T}${gawk_cv_aix_hack}" >&6 echo "$as_me:$LINENO: checking for Linux/Alpha compilation hacks" >&5 echo $ECHO_N "checking for Linux/Alpha compilation hacks... $ECHO_C" >&6 if test "${gawk_cv_linux_alpha_hack+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "Linux" = "`uname`" && test "alpha" = "`uname -m`" then # this isn't necessarily always true, # the vendor's compiler is also often found if test "$GCC" = yes then CFLAGS="$CFLAGS -mieee" gawk_cv_linux_alpha_hack=yes else gawk_cv_linux_alpha_hack=no fi else gawk_cv_linux_alpha_hack=no fi fi echo "$as_me:$LINENO: result: ${gawk_cv_linux_alpha_hack}" >&5 echo "${ECHO_T}${gawk_cv_linux_alpha_hack}" >&6 if test "$ISC" = 1 # will be set by test for ISC then CFLAGS="$CFLAGS -D_SYSV3" fi echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 if test "${am_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_prog_cc_stdc=no ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_prog_cc_stdc="$ac_arg"; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done CC="$ac_save_CC" fi if test -z "$am_cv_prog_cc_stdc"; then echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 else echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 fi case "x$am_cv_prog_cc_stdc" in x|xno) ;; *) CC="$CC $am_cv_prog_cc_stdc" ;; esac echo "$as_me:$LINENO: checking for function prototypes" >&5 echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 if test "$am_cv_prog_cc_stdc" != no; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define PROTOTYPES 1 _ACEOF U= ANSI2KNR= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 U=_ ANSI2KNR=./ansi2knr fi # Ensure some checks needed by ansi2knr itself. echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in string.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done case `(uname) 2> /dev/null` in *CYGWIN*) with_libiconv_prefix=no with_libintl_prefix=no LIBS="$LIBS /usr/lib/automode.o" ;; *) ;; esac MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f messages.po # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGMERGE" in /*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$GMSGFMT" != ":"; then if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 GMSGFMT=":" fi fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then : ; else echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 XGETTEXT=":" fi rm -f messages.po fi ac_config_commands="$ac_config_commands default-1" # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; no) cat >>confdefs.h <<\_ACEOF #define inline _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline _ACEOF ;; esac echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6 if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((off_t *) 0) return 0; if (sizeof (off_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6 if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6 if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined(CRAY) && ! defined(CRAY2) webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { exit (find_stack_direction () < 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # if !HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) exit (1); for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) exit (1); if (write (fd, data, pagesize) != pagesize) exit (1); close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) exit (1); data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit (1); /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) exit (1); if (read (fd, data3, pagesize) != pagesize) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit (1); close (fd); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 if test "${ac_cv_gnu_library_2_1+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky GNU user" >/dev/null 2>&1; then ac_cv_gnu_library_2_1=yes else ac_cv_gnu_library_2_1=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 GLIBC21="$ac_cv_gnu_library_2_1" echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Guess based on the CPU. case "$host_cpu" in alpha* | i3456786 | m68k | s390*) gt_cv_int_divbyzero_sigfpe="guessing yes";; *) gt_cv_int_divbyzero_sigfpe="guessing no";; esac else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include static void #ifdef __cplusplus sigfpe_handler (int sig) #else sigfpe_handler (sig) int sig; #endif { /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ exit (sig != SIGFPE); } int x = 1; int y = 0; int z; int nan; int main () { signal (SIGFPE, sigfpe_handler); /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) signal (SIGTRAP, sigfpe_handler); #endif /* Linux/SPARC yields signal SIGILL. */ #if defined (__sparc__) && defined (__linux__) signal (SIGILL, sigfpe_handler); #endif z = x / y; nan = y / y; exit (1); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_int_divbyzero_sigfpe=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gt_cv_int_divbyzero_sigfpe=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 case "$gt_cv_int_divbyzero_sigfpe" in *yes) value=1;; *) value=0;; esac cat >>confdefs.h <<_ACEOF #define INTDIV0_RAISES_SIGFPE $value _ACEOF echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_inttypes_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 if test $jm_ac_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for stdint.h" >&5 echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 if test "${jm_ac_cv_header_stdint_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { uintmax_t i = (uintmax_t) -1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then jm_ac_cv_header_stdint_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 jm_ac_cv_header_stdint_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 if test $jm_ac_cv_header_stdint_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STDINT_H_WITH_UINTMAX 1 _ACEOF fi echo "$as_me:$LINENO: checking for unsigned long long" >&5 echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 if test "${ac_cv_type_unsigned_long_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ unsigned long long ull = 1; int i = 63; int main () { unsigned long long ullmax = (unsigned long long) -1; return ull << i | ull >> i | ullmax / ull | ullmax % ull; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_unsigned_long_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long_long=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 if test $ac_cv_type_unsigned_long_long = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_UNSIGNED_LONG_LONG 1 _ACEOF fi if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then test $ac_cv_type_unsigned_long_long = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' cat >>confdefs.h <<_ACEOF #define uintmax_t $ac_type _ACEOF fi echo "$as_me:$LINENO: checking for inttypes.h" >&5 echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 if test "${gt_cv_header_inttypes_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_header_inttypes_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_header_inttypes_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 if test $gt_cv_header_inttypes_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_INTTYPES_H 1 _ACEOF fi if test $gt_cv_header_inttypes_h = yes; then echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 if test "${gt_cv_inttypes_pri_broken+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifdef PRId32 char *p = PRId32; #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_inttypes_pri_broken=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_inttypes_pri_broken=yes fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 fi if test "$gt_cv_inttypes_pri_broken" = yes; then cat >>confdefs.h <<_ACEOF #define PRI_MACROS_BROKEN 1 _ACEOF fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then acl_cv_prog_gnu_ld=yes else acl_cv_prog_gnu_ld=no fi fi echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 with_gnu_ld=$acl_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6 wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" # Check whether --enable-rpath or --disable-rpath was given. if test "${enable_rpath+set}" = set; then enableval="$enable_rpath" : else enable_rpath=yes fi; use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval="$with_libiconv_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6 if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6 if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6 else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6 cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 if test "${am_cv_langinfo_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char* cs = nl_langinfo(CODESET); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_langinfo_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_langinfo_codeset=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 if test $am_cv_langinfo_codeset = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LANGINFO_CODESET 1 _ACEOF fi if test $ac_cv_header_locale_h = yes; then echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi for ac_prog in bison do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_INTLBISON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$INTLBISON"; then ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_INTLBISON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi INTLBISON=$ac_cv_prog_INTLBISON if test -n "$INTLBISON"; then echo "$as_me:$LINENO: result: $INTLBISON" >&5 echo "${ECHO_T}$INTLBISON" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$INTLBISON" && break done if test -z "$INTLBISON"; then ac_verc_fail=yes else echo "$as_me:$LINENO: checking version of bison" >&5 echo $ECHO_N "checking version of bison... $ECHO_C" >&6 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac echo "$as_me:$LINENO: result: $ac_prog_version" >&5 echo "${ECHO_T}$ac_prog_version" >&6 fi if test $ac_verc_fail = yes; then INTLBISON=: fi echo "$as_me:$LINENO: checking whether NLS is requested" >&5 echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" USE_NLS=$enableval else USE_NLS=yes fi; echo "$as_me:$LINENO: result: $USE_NLS" >&5 echo "${ECHO_T}$USE_NLS" >&6 BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no LIBINTL= LTLIBINTL= POSUB= if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" nls_cv_force_use_gnu_gettext=$withval else nls_cv_force_use_gnu_gettext=no fi; echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext2_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext2_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext2_libc=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6 if test "$gt_cv_func_gnugettext2_libc" != "yes"; then use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix or --without-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then withval="$with_libintl_prefix" if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/lib" fi fi fi; LIBINTL= LTLIBINTL= INCINTL= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then found_dir="$additional_libdir" found_so="$additional_libdir/lib$name.$shlibext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then found_dir="$dir" found_so="$dir/lib$name.$shlibext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */lib | */lib/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/lib"; then haveit= if test "X$additional_libdir" = "X/usr/local/lib"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gt_cv_func_gnugettext2_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_gnugettext2_libintl=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (); int main () { bindtextdomain ("", ""); return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext2_libintl=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5 echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6 fi if test "$gt_cv_func_gnugettext2_libc" = "yes" \ || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \ && test "$PACKAGE" != gettext; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test "$gt_use_preinstalled_gnugettext" != "yes"; then nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then INTLOBJS="\$(GETTOBJS)" BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then CATOBJEXT=.gmo fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF else USE_NLS=no fi fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then echo "$as_me:$LINENO: checking how to link with libintl" >&5 echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $LIBINTL" >&5 echo "${ECHO_T}$LIBINTL" >&6 for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi POSUB=po fi if test "$PACKAGE" = gettext; then BUILD_INCLUDED_LIBINTL=yes fi nls_cv_header_intl= nls_cv_header_libgt= DATADIRNAME=share INSTOBJEXT=.mo GENCAT=gencat INTL_LIBTOOL_SUFFIX_PREFIX= INTLLIBS="$LIBINTL" echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi for ac_header in fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h signum.h stdarg.h string.h \ sys/param.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "$ac_cv_header_string_h" = yes then for ac_header in memory.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done else for ac_header in strings.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done fi echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((pid_t *) 0) return 0; if (sizeof (pid_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6 if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi echo "$as_me:$LINENO: checking return type of signal handlers" >&5 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 if test "${ac_cv_type_signal+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_signal=void else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_signal=int fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 echo "${ECHO_T}$ac_cv_type_signal" >&6 cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6 if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 if test "${ac_cv_type_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_type_getgroups=cross else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) int main () { gid_t gidset[NGID]; int i, n; union { gid_t gval; long lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_getgroups=gid_t else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_type_getgroups=int fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then ac_cv_type_getgroups=gid_t else ac_cv_type_getgroups=int fi rm -f conftest* fi fi echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 echo "${ECHO_T}$ac_cv_type_getgroups" >&6 cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups _ACEOF echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((ssize_t *) 0) return 0; if (sizeof (ssize_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "int.*sprintf" >/dev/null 2>&1; then cat >>confdefs.h <<\_ACEOF #define SPRINTF_RET int _ACEOF else cat >>confdefs.h <<\_ACEOF #define SPRINTF_RET char * _ACEOF fi rm -f conftest* cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { time_t foo; foo = 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cat >>confdefs.h <<\_ACEOF #define TIME_T_IN_SYS_TYPES_H 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext cat >>confdefs.h <<\_ACEOF #define REGEX_MALLOC 1 _ACEOF for ac_func in vprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF echo "$as_me:$LINENO: checking for _doprnt" >&5 echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6 if test "${ac_cv_func__doprnt+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _doprnt (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char _doprnt (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub__doprnt) || defined (__stub____doprnt) choke me #else char (*f) () = _doprnt; #endif #ifdef __cplusplus } #endif int main () { return f != _doprnt; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func__doprnt=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__doprnt=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 echo "${ECHO_T}$ac_cv_func__doprnt" >&6 if test $ac_cv_func__doprnt = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DOPRNT 1 _ACEOF fi fi done for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in strtod do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for strtod with C89 semantics" >&5 echo $ECHO_N "checking for strtod with C89 semantics... $ECHO_C" >&6 if test "${gawk_ac_cv_func_strtod_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then gawk_ac_cv_func_strtod_c89=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Test program from Arnold Robbins (arnold@skeeve.com) */ #if HAVE_STDLIB_H #include #else extern double strtod(); #endif int main () { #if ! HAVE_STRTOD exit(1); #else double d; char *str = "0x345a"; d = strtod(str, 0); if (d == 0) exit (0); else exit (1); #endif } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gawk_ac_cv_func_strtod_c89=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gawk_ac_cv_func_strtod_c89=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $gawk_ac_cv_func_strtod_c89" >&5 echo "${ECHO_T}$gawk_ac_cv_func_strtod_c89" >&6 if test $gawk_ac_cv_func_strtod_c89 = no; then cat >>confdefs.h <<\_ACEOF #define STRTOD_NOT_C89 1 _ACEOF fi for ac_header in sys/time.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in alarm do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for working mktime" >&5 echo $ECHO_N "checking for working mktime... $ECHO_C" >&6 if test "${ac_cv_func_working_mktime+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_working_mktime=no else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Test program from Paul Eggert and Tony Leneis. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #if HAVE_UNISTD_H # include #endif #if !HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; /* Values we'll use to set the TZ environment variable. */ static const char *const tz_strings[] = { (const char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Fail if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static void spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; if (mktime (&tm) == (time_t)-1) exit (1); } static void mktime_test (now) time_t now; { struct tm *lt; if ((lt = localtime (&now)) && mktime (lt) != now) exit (1); now = time_t_max - now; if ((lt = localtime (&now)) && mktime (lt) != now) exit (1); } static void irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); if (tm.tm_mon != 2 || tm.tm_mday != 31) exit (1); } static void bigtime_test (j) int j; { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) exit (1); } } int main () { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) continue; time_t_max--; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) mktime_test (t); mktime_test ((time_t) 60 * 60); mktime_test ((time_t) 60 * 60 * 24); for (j = 1; 0 < j; j *= 2) bigtime_test (j); bigtime_test (j - 1); } irix_6_4_bug (); spring_forward_gap (); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_working_mktime=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_working_mktime=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 echo "${ECHO_T}$ac_cv_func_working_mktime" >&6 if test $ac_cv_func_working_mktime = no; then LIBOBJS="$LIBOBJS mktime.$ac_objext" fi case "$ac_cv_func_working_mktime" in yes) cat >>confdefs.h <<\_ACEOF #define HAVE_MKTIME 1 _ACEOF ;; esac echo "$as_me:$LINENO: checking for fmod in -lm" >&5 echo $ECHO_N "checking for fmod in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_fmod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char fmod (); int main () { fmod (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_m_fmod=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_fmod=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5 echo "${ECHO_T}$ac_cv_lib_m_fmod" >&6 if test $ac_cv_lib_m_fmod = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi for ac_func in getgrent getgroups memset memcpy memcmp fmod setlocale strchr \ strerror strftime strncasecmp strtod system tzset mbrlen mbrtowc \ grantpt do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_dlfcn_h+set}" = set; then echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc in yes:no ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; no:yes ) { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to bug-autoconf@gnu.org. ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for dlfcn.h" >&5 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6 if test "${ac_cv_header_dlfcn_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_dlfcn_h=$ac_header_preproc fi echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6 fi if test $ac_cv_header_dlfcn_h = yes; then cat >>confdefs.h <<\_ACEOF #define DYNAMIC 1 _ACEOF if test "$GCC" = yes then # Add others here as appropriate, # one day use GNU libtool. if uname | $EGREP -i 'linux|freebsd|cygwin' > /dev/null then LDFLAGS="$LDFLAGS -export-dynamic" fi fi # Check this separately. Some systems have dlopen # in libc. Notably freebsd and cygwin. echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi fi case `(uname) 2> /dev/null` in *VMS*|*BeOS*|*OS/2*|*MS-DOS*) cat >>confdefs.h <<\_ACEOF #define GETPGRP_VOID 1 _ACEOF ;; *) echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6 if test "${ac_cv_func_getpgrp_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Use it with a single arg. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { getpgrp (0); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_getpgrp_void=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_getpgrp_void=yes fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6 if test $ac_cv_func_getpgrp_void = yes; then cat >>confdefs.h <<\_ACEOF #define GETPGRP_VOID 1 _ACEOF fi ;; esac gawk_have_sockets=no # Check for system-dependent location of socket libraries SOCKET_LIBS= if test "$ISC" = yes; then SOCKET_LIBS="-lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). # # ADR: Is this needed just for sockets??? # AC_CHECK_LIB(dnet, dnet_ntoa, [SOCKET_LIBS="$SOCKET_LIBS -ldnet"]) # if test $ac_cv_lib_dnet_ntoa = no; then # AC_CHECK_LIB(dnet_stub, dnet_ntoa, # [SOCKET_LIBS="$SOCKET_LIBS -ldnet_stub"]) # fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramid MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo "$as_me:$LINENO: checking for gethostbyname" >&5 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 if test "${ac_cv_func_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) choke me #else char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != gethostbyname; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 if test $ac_cv_func_gethostbyname = no; then echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 if test $ac_cv_lib_nsl_gethostbyname = yes; then SOCKET_LIBS="$SOCKET_LIBS -lnsl" fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo "$as_me:$LINENO: checking for connect" >&5 echo $ECHO_N "checking for connect... $ECHO_C" >&6 if test "${ac_cv_func_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_connect) || defined (__stub___connect) choke me #else char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != connect; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 echo "${ECHO_T}$ac_cv_func_connect" >&6 if test $ac_cv_func_connect = no; then echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 if test "${ac_cv_lib_socket_connect+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $SOCKET_LIBS $LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char connect (); int main () { connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 if test $ac_cv_lib_socket_connect = yes; then SOCKET_LIBS="-lsocket $SOCKET_LIBS" gawk_have_sockets=yes fi else gawk_have_sockets=yes fi fi if test "${gawk_have_sockets}" = "yes" then echo "$as_me:$LINENO: checking where to find the socket library calls" >&5 echo $ECHO_N "checking where to find the socket library calls... $ECHO_C" >&6 case "${SOCKET_LIBS}" in ?*) gawk_lib_loc="${SOCKET_LIBS}" ;; *) gawk_lib_loc="the standard library" ;; esac echo "$as_me:$LINENO: result: ${gawk_lib_loc}" >&5 echo "${ECHO_T}${gawk_lib_loc}" >&6 cat >>confdefs.h <<\_ACEOF #define HAVE_SOCKETS 1 _ACEOF fi echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6 if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (sizeof ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6 if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_ST_BLKSIZE 1 _ACEOF fi echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6 if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (sizeof ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TM_ZONE 1 _ACEOF else echo "$as_me:$LINENO: checking for tzname" >&5 echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif int main () { atoi(*tzname); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 echo "${ECHO_T}$ac_cv_var_tzname" >&6 if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TZNAME 1 _ACEOF fi fi echo "$as_me:$LINENO: checking whether char is unsigned" >&5 echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 if test "${ac_cv_c_char_unsigned+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !(((char) -1) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_char_unsigned=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_char_unsigned=yes fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5 echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then cat >>confdefs.h <<\_ACEOF #define __CHAR_UNSIGNED__ 1 _ACEOF fi echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6 if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_inline=$ac_kw; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6 case $ac_cv_c_inline in inline | yes) ;; no) cat >>confdefs.h <<\_ACEOF #define inline _ACEOF ;; *) cat >>confdefs.h <<_ACEOF #define inline $ac_cv_c_inline _ACEOF ;; esac echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5 echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6 if test "${ac_cv_c_stringize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define x(y) #y char *s = x(teststring); _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "#teststring" >/dev/null 2>&1; then ac_cv_c_stringize=no else ac_cv_c_stringize=yes fi rm -f conftest* fi echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5 echo "${ECHO_T}$ac_cv_c_stringize" >&6 if test $ac_cv_c_stringize = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STRINGIZE 1 _ACEOF fi ac_config_files="$ac_config_files Makefile awklib/Makefile doc/Makefile intl/Makefile po/Makefile.in test/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by GNU Awk $as_me 3.1.2, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ GNU Awk config.status 3.1.2 configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "awklib/Makefile" ) CONFIG_FILES="$CONFIG_FILES awklib/Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:configh.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@EGREP@,$EGREP,;t t s,@YACC@,$YACC,;t t s,@LN_S@,$LN_S,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@U@,$U,;t t s,@ANSI2KNR@,$ANSI2KNR,;t t s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t s,@MSGFMT@,$MSGFMT,;t t s,@GMSGFMT@,$GMSGFMT,;t t s,@XGETTEXT@,$XGETTEXT,;t t s,@MSGMERGE@,$MSGMERGE,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@ALLOCA@,$ALLOCA,;t t s,@GLIBC21@,$GLIBC21,;t t s,@LIBICONV@,$LIBICONV,;t t s,@LTLIBICONV@,$LTLIBICONV,;t t s,@INTLBISON@,$INTLBISON,;t t s,@USE_NLS@,$USE_NLS,;t t s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t s,@CATOBJEXT@,$CATOBJEXT,;t t s,@INTLOBJS@,$INTLOBJS,;t t s,@DATADIRNAME@,$DATADIRNAME,;t t s,@INSTOBJEXT@,$INSTOBJEXT,;t t s,@GENCAT@,$GENCAT,;t t s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t s,@INTLLIBS@,$INTLLIBS,;t t s,@LIBINTL@,$LIBINTL,;t t s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@SOCKET_LIBS@,$SOCKET_LIBS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count # Run the commands associated with the file. case $ac_file in config.h ) cat $srcdir/custom.h >> config.h ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; default-1 ) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' fi case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= GMOFILES= UPDATEPOFILES= DUMMYPOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi EOF echo - 'doc/Makefile.in' cat << 'EOF' > 'doc/Makefile.in' # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # doc/Makefile.am --- automake input file for gawk # # Copyright (C) 2000, 2001, 2002 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ --no-split MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ U = @U@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ info_TEXINFOS = gawk.texi gawkinet.texi man_MANS = gawk.1 igawk.1 pgawk.1 EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ macros colors no.colors $(man_MANS) \ lflashlight.eps rflashlight.eps \ statist.jpg statist.eps TROFF = groff -t -Tps SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr CARDFILES = $(CARDSRC) ad.block awkcard.in setter.outline # Use this if your troff can correctly handle macros from 'colors' file AWKCARD = awkcard.ps subdir = doc mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = am__TEXINFO_TEX_DIR = $(srcdir) INFO_DEPS = gawk.info gawkinet.info DVIS = gawk.dvi gawkinet.dvi PDFS = gawk.pdf gawkinet.pdf PSS = gawk.ps gawkinet.ps TEXINFOS = gawk.texi gawkinet.texi NROFF = nroff MANS = $(man_MANS) DIST_COMMON = ChangeLog Makefile.am Makefile.in texinfo.tex all: all-am .SUFFIXES: .SUFFIXES: .dvi .info .pdf .ps .texi $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) .texi.info: @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ `test -f '$<' || echo '$(srcdir)/'`$< .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< gawk.info: gawk.texi gawk.dvi: gawk.texi gawk.pdf: gawk.texi gawkinet.info: gawkinet.texi gawkinet.dvi: gawkinet.texi gawkinet.pdf: gawkinet.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch DVIPS = dvips .dvi.ps: $(DVIPS) -o $@ $< uninstall-info-am: $(PRE_UNINSTALL) @if (install-info --version && \ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if cd $(DESTDIR)$(infodir); then \ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ for file in $$d/$$base*; do \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f $(distdir)/$$relfile || \ cp -p $$file $(distdir)/$$relfile; \ done; \ done mostlyclean-aminfo: -rm -f gawk.aux gawk.cp gawk.cps gawk.fn gawk.ky gawk.kys gawk.log gawk.pg \ gawk.pgs gawk.tmp gawk.toc gawk.tp gawk.tps gawk.vr gawk.dvi \ gawk.pdf gawk.ps gawkinet.aux gawkinet.cp gawkinet.cps \ gawkinet.fn gawkinet.ky gawkinet.kys gawkinet.log gawkinet.pg \ gawkinet.pgs gawkinet.tmp gawkinet.toc gawkinet.tp \ gawkinet.tps gawkinet.vr gawkinet.dvi gawkinet.pdf \ gawkinet.ps maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done man1dir = $(mandir)/man1 install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-man install-exec-am: install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) @list='$(INFO_DEPS)'; \ for file in $$list; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if (install-info --version && \ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ done; \ else : ; fi install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic dist-info \ distclean distclean-generic distdir dvi dvi-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic mostlyclean mostlyclean-aminfo \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am uninstall-man uninstall-man1 # Uncomment the following definition of AWKCARD if your troff can produce # Postscript but still has troubles with macros from 'colors'. As this # is not groff you will have to change TROFF macro as well. Do not forget # to ensure that awkcard.tr is processed by tbl. #AWKCARD = awkcard.nc postscript: gawk.ps gawkinet.ps gawk.1.ps igawk.1.ps $(AWKCARD) gawk.ps: gawk.dvi dvips -o gawk.ps gawk.dvi gawkinet.ps: gawkinet.dvi dvips -o gawkinet.ps gawkinet.dvi gawk.1.ps: gawk.1 -groff -man $(srcdir)/gawk.1 > gawk.1.ps igawk.1.ps: igawk.1 -groff -man $(srcdir)/igawk.1 > igawk.1.ps awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr awkcard.ps: $(CARDFILES) $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps awkcard.nc: $(CARDFILES) $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc clean: rm -f *.ps *~ awkcard.nc awkcard.tr distclean: clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: EOF echo - 'doc/pgawk.1' cat << 'EOF' > 'doc/pgawk.1' .so gawk.1 EOF echo - 'intl/Makefile.in' cat << 'EOF' > 'intl/Makefile.in' # Makefile for directory with message catalog handling in GNU NLS Utilities. # Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU Library General Public License as published # by the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ transform = @program_transform_name@ libdir = @libdir@ includedir = @includedir@ datadir = @datadir@ localedir = $(datadir)/locale gettextsrcdir = $(datadir)/gettext/intl aliaspath = $(localedir) subdir = intl INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` l = @INTL_LIBTOOL_SUFFIX_PREFIX@ AR = ar CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ YACC = @INTLBISON@ -y -d YFLAGS = --name-prefix=__gettext DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h SOURCES = $(COMSRCS) intl-compat.c COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \ plural-exp.c localcharset.c localename.c osdep.c os2compat.c OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \ plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo GETTOBJS = intl-compat.$lo DISTFILES.common = Makefile.in \ config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) DISTFILES.generated = plural.c DISTFILES.normal = VERSION DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ COPYING.LIB-2 gettext.h libgettext.h plural-eval.c # Libtool's library version information for libintl. # Before making a gettext release, the gettext maintainer must change this # according to the libtool documentation, section "Library interface versions". # Maintainers of other packages that include the intl directory must *not* # change these values. LTV_CURRENT=4 LTV_REVISION=0 LTV_AGE=2 .SUFFIXES: .SUFFIXES: .c .y .o .lo .sin .sed .c.o: $(COMPILE) $< .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) $< .y.c: $(YACC) $(YFLAGS) --output $@ $< rm -f $*.h .sin.sed: sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@ mv t-$@ $@ INCLUDES = -I.. -I. -I$(top_srcdir)/intl all: all-@USE_INCLUDED_LIBINTL@ all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed all-no: all-no-@BUILD_INCLUDED_LIBINTL@ all-no-yes: libgnuintl.$la all-no-no: libintl.a libgnuintl.a: $(OBJECTS) rm -f $@ $(AR) cru $@ $(OBJECTS) $(RANLIB) $@ libintl.la libgnuintl.la: $(OBJECTS) $(LIBTOOL) --mode=link \ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ $(OBJECTS) @LTLIBICONV@ -lc \ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ -rpath $(libdir) \ -no-undefined libintl.h: libgnuintl.h cp $(srcdir)/libgnuintl.h libintl.h charset.alias: config.charset $(SHELL) $(srcdir)/config.charset '@host@' > t-$@ mv t-$@ $@ check: all # This installation goal is only used in GNU gettext. Packages which # only use the library should use install instead. # We must not install the libintl.h/libintl.a files if we are on a # system which has the GNU gettext() function in its C library or in a # separate library. # If you want to use the one which comes with this version of the # package, you have to use `configure --with-included-gettext'. install: install-exec install-data install-exec: all if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=install \ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ orig=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ if test @GLIBC21@ = no; then \ orig=charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ fi; \ fi; \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ test -f $(DESTDIR)$(localedir)/locale.alias \ && orig=$(DESTDIR)$(localedir)/locale.alias \ || orig=$(srcdir)/locale.alias; \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-add.sed $$orig > $$temp; \ $(INSTALL_DATA) $$temp $$dest; \ rm -f $$temp; \ else \ : ; \ fi install-data: all if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ for file in $$dists; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ dists="$(DISTFILES.generated)"; \ for file in $$dists; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ $(INSTALL_DATA) $$dir/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ dists="$(DISTFILES.obsolete)"; \ for file in $$dists; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-strip: install installdirs: if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext"; then \ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: if test "$(PACKAGE)" = "gettext" \ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ rm -f $(DESTDIR)$(includedir)/libintl.h; \ $(LIBTOOL) --mode=uninstall \ rm -f $(DESTDIR)$(libdir)/libintl.$la; \ else \ : ; \ fi if test '@USE_INCLUDED_LIBINTL@' = yes; then \ if test -f $(DESTDIR)$(libdir)/charset.alias; then \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ if test -f $(DESTDIR)$(localedir)/locale.alias; then \ temp=$(DESTDIR)$(localedir)/t-locale.alias; \ dest=$(DESTDIR)$(localedir)/locale.alias; \ sed -f ref-del.sed $$dest > $$temp; \ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ rm -f $$dest; \ else \ $(INSTALL_DATA) $$temp $$dest; \ fi; \ rm -f $$temp; \ fi; \ else \ : ; \ fi if test "$(PACKAGE)" = "gettext"; then \ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi info dvi: $(OBJECTS): ../config.h libgnuintl.h bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h dcigettext.$lo: hash-string.h explodename.$lo l10nflist.$lo: loadinfo.h dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h dcigettext.$lo: eval-plural.h tags: TAGS TAGS: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) id: ID ID: $(HEADERS) $(SOURCES) here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) mostlyclean: rm -f *.a *.la *.o *.lo core core.* rm -f libintl.h charset.alias ref-add.sed ref-del.sed rm -f -r .libs _libs clean: mostlyclean distclean: clean rm -f Makefile ID TAGS if test "$(PACKAGE)" = gettext; then \ rm -f ChangeLog.inst $(DISTFILES.normal); \ else \ : ; \ fi maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." # GNU gettext needs not contain the file `VERSION' but contains some # other files which should not be distributed in other packages. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: Makefile if test "$(PACKAGE)" = gettext; then \ additional="$(DISTFILES.gettext)"; \ else \ additional="$(DISTFILES.normal)"; \ fi; \ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ cp -p $$dir/$$file $(distdir); \ done Makefile: Makefile.in ../config.status cd .. \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: EOF echo - 'mkinstalldirs' cat << 'EOF' > 'mkinstalldirs' #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here EOF echo - 'po/POTFILES.in' cat << 'EOF' > 'po/POTFILES.in' # List of source files containing translatable strings. # Copyright (C) 1999, 2002 Free Software Foundation, Inc. array.c awkgram.c builtin.c eval.c ext.c field.c gawkmisc.c getopt.c getopt1.c io.c main.c msg.c node.c posix/gawkmisc.c profile.c random.c re.c regcomp.c regex_internal.c regexec.c replace.c version.c EOF echo - 'po/da.po' cat << 'EOF' > 'po/da.po' # Danish translation of gawk # Copyright (C) 2001 Free Software Foundation, Inc. # Keld Simonsen , 2002. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.31\n" "POT-Creation-Date: 2003-03-19 14:25+0200\n" "PO-Revision-Date: 2002-11-09 10:09+0100\n" "Last-Translator: Keld Simonsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "forsøg på at bruge skalaren \"%s\" som vektor" #: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "reference til ikke-initieret element \"%s[\"%s\"]\"" #: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "indeks i vektoren \"%s\" er en tom streng" #: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indeks \"%s\" findes ikke i vektoren \"%s\"" #: array.c:432 array.c:515 #, c-format msgid "delete: illegal use of variable `%s' as array" msgstr "delete: ikke tilladt brug af variablen \"%s\" som vektor" #: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: tom (nil)\n" #: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (nul)\n" #: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabelstørrelse = %d, vektorstørrelse = %d\n" #: array.c:671 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: er en parameter\n" #: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreference til %s\n" #: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: første argument er ikke en vektor" #: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: andet argument er ikke en vektor" #: awkgram.y:208 #, fuzzy, c-format msgid "%s blocks must have an action part" msgstr "END-blok skal have en handlingsdel" #: awkgram.y:211 #, fuzzy msgid "each rule must have a pattern or an action part" msgstr "END-blok skal have en handlingsdel" #: awkgram.y:267 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "\"%s\" er en indbygget funktion, den kan ikke omdefineres" #: awkgram.y:314 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "regexp-konstanten \"/%s/\" ser ud som en C-kommentar, men er det ikke" #: awkgram.y:340 msgid "statement may have no effect" msgstr "kommandoen har måske ikke nogen effekt" #: awkgram.y:431 awkgram.y:451 #, fuzzy, c-format msgid "`%s' used in %s action" msgstr "\"next\" brugt i BEGIN- eller END-handling" #: awkgram.y:444 awkgram.y:447 msgid "`nextfile' is a gawk extension" msgstr "\"nextfile\" er en gawk-udvidelse" #: awkgram.y:461 msgid "`return' used outside function context" msgstr "\"return\" brugt uden for funktion" #: awkgram.y:500 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "alenestående \"print\" i BEGIN eller END-regel bør muligvis være 'print \"\"'" #: awkgram.y:513 awkgram.y:520 msgid "`delete array' is a gawk extension" msgstr "\"delete array\" er en gawk-udvidelse" #: awkgram.y:528 awkgram.y:535 #, fuzzy msgid "`delete(array)' is a non-portable tawk extension" msgstr "\"delete array\" er en gawk-udvidelse" #: awkgram.y:578 msgid "multistage two-way pipelines don't work" msgstr "flertrins dobbeltrettede datakanaler fungerer ikke" #: awkgram.y:669 msgid "regular expression on right of assignment" msgstr "regulært udtryk i højreleddet af en tildeling" #: awkgram.y:679 msgid "regular expression on left of `~' or `!~' operator" msgstr "regulært udtryk på venstre side af en \"~\"- eller \"!~\"-operator" #: awkgram.y:687 msgid "regular expression on right of comparison" msgstr "regulært udtryk i højreleddet af en sammenligning" #: awkgram.y:754 msgid "non-redirected `getline' undefined inside END action" msgstr "ikke-omdirigeret \"getline\" udefineret inde i END-handling" #: awkgram.y:781 msgid "call of `length' without parentheses is not portable" msgstr "kald af \"length\" uden parenteser er ikke portabelt" #: awkgram.y:784 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "kald af \"length\" uden parenteser er forældet ifølge POSIX" #: awkgram.y:835 msgid "invalid subscript expression" msgstr "ugyldig indeksudtryk" #: awkgram.y:1020 #, fuzzy msgid "unexpected newline or end of string" msgstr "uventet nylinjetegn" #: awkgram.y:1115 msgid "empty program text on command line" msgstr "tom programtekst på kommandolinjen" #: awkgram.y:1172 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "kan ikke åbne kildefilen \"%s\" for læsning (%s)" #: awkgram.y:1207 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "kan ikke læse kildefilen \"%s\" (%s)" #: awkgram.y:1215 #, c-format msgid "source file `%s' is empty" msgstr "kildefilen \"%s\" er tom" #: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 msgid "source file does not end in newline" msgstr "kildefilen slutter ikke med en ny linje" #: awkgram.y:1481 msgid "unterminated regexp ends with `\\' at end of file" msgstr "uafsluttet regulært udtryk slutter med \"\\\" i slutningen af filen" #: awkgram.y:1501 msgid "unterminated regexp" msgstr "uafsluttet regulært udtryk" #: awkgram.y:1504 msgid "unterminated regexp at end of file" msgstr "uafsluttet regulært udtryk i slutningen af filen" #: awkgram.y:1571 msgid "use of `\\ #...' line continuation is not portable" msgstr "Brug af \"\\ #...\" for linjefortsættelse er ikke portabelt" #: awkgram.y:1583 msgid "backslash not last character on line" msgstr "sidste tegn på linjen er ikke en omvendt skråstreg" #: awkgram.y:1628 msgid "POSIX does not allow operator `**='" msgstr "POSIX tillader ikke operatoren \"**=\"" #: awkgram.y:1630 msgid "old awk does not support operator `**='" msgstr "gamle awk understøtter ikke operatoren \"**=\"" #: awkgram.y:1639 msgid "POSIX does not allow operator `**'" msgstr "POSIX tillader ikke operatoren \"**\"" #: awkgram.y:1641 msgid "old awk does not support operator `**'" msgstr "gamle awk understøtter ikke operatoren \"**\"" #: awkgram.y:1672 msgid "operator `^=' is not supported in old awk" msgstr "operatoren \"^=\" understøttes ikke i gamle awk" #: awkgram.y:1680 msgid "operator `^' is not supported in old awk" msgstr "operatoren \"^\" understøttes ikke i gamle awk" #: awkgram.y:1764 awkgram.y:1781 msgid "unterminated string" msgstr "uafsluttet streng" #: awkgram.y:1941 #, c-format msgid "invalid char '%c' in expression" msgstr "ugyldigt tegn \"%c\" i udtryk" #: awkgram.y:2001 #, c-format msgid "`%s' is a gawk extension" msgstr "\"%s\" er en gawk-udvidelse" #: awkgram.y:2004 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "\"%s\" er en Bell Labs-udvidelse" #: awkgram.y:2007 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX tillader ikke \"%s\"" #: awkgram.y:2011 #, c-format msgid "`%s' is not supported in old awk" msgstr "\"%s\" understøttes ikke i gamle awk" #: awkgram.y:2038 msgid "`goto' considered harmful!\n" msgstr "\"goto\" anses for skadlig!\n" #: awkgram.y:2102 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d er et ugyldigt antal argumenter for %s" #: awkgram.y:2121 awkgram.y:2124 msgid "match: third argument is a gawk extension" msgstr "match: tredje argument er en gawk-udvidelse" #: awkgram.y:2137 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: bogstavelig streng som sidste argument til erstatning har ingen effekt" #: awkgram.y:2140 #, fuzzy, c-format msgid "%s third parameter is not a changeable object" msgstr "sub: tredje argument er ikke et ændringsbart objekt" #: awkgram.y:2167 awkgram.y:2170 msgid "close: second argument is a gawk extension" msgstr "close: andet argument er en gawk-udvidelse" #: awkgram.y:2180 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " "understregningstegn" #: awkgram.y:2195 #, fuzzy msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "" "brug af dcgettext(_\"...\") er fejlagtigt: fjern det indledende " "understregningstegn" #: awkgram.y:2266 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "funktionen \"%s\": parameter %d, \"%s\", er samme som parameter %d" #: awkgram.y:2299 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "funktionen \"%s\": parameteren \"%s\" overskygger en global variabel" #: awkgram.y:2411 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "kunne ikke åbne \"%s\" for skrivning (%s)" #: awkgram.y:2412 profile.c:93 msgid "sending profile to standard error" msgstr "sender profilen til standard fejl" #: awkgram.y:2442 #, c-format msgid "%s: close failed (%s)" msgstr "%s: mislykkedes at lukke (%s)" #: awkgram.y:2566 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() kaldt to gange!" #: awkgram.y:2593 msgid "there were shadowed variables." msgstr "" #: awkgram.y:2666 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "funktionen \"%s\": kan ikke bruge funktionsnavn som parameternavn" #: awkgram.y:2676 #, c-format msgid "function name `%s' previously defined" msgstr "funktionsnavnet \"%s\" er allerede defineret" #: awkgram.y:2827 awkgram.y:2833 #, c-format msgid "function `%s' called but never defined" msgstr "funktionen \"%s\" kaldt, men aldrig defineret" #: awkgram.y:2836 #, c-format msgid "function `%s' defined but never called" msgstr "funktionen \"%s\" defineret, men aldrig kaldt" #: awkgram.y:2863 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "konstant regulært udtryk for parameter %d giver en boolesk værdi" #: awkgram.y:2876 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "%s" msgstr "" "funktionen \"%s\" kaldt med blanktegn mellem navnet og \"(\",\n" "%s" #: awkgram.y:2878 #, fuzzy msgid "or used as a variable or an array" msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" #: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s til \"%s\" mislykkedes (%s)" #: builtin.c:112 msgid "standard output" msgstr "standard ud" #: builtin.c:113 msgid "reason unknown" msgstr "ukendt årsag" #: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: fik et ikke-numerisk argument" #: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g er uden for tilladt område" #: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan ikke spole: datakanalen \"%s\" åbnet for læsning, ikke skrivning" #: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "fflush: kan ikke spole: filen \"%s\" åbnet for læsning, ikke skrivning" #: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: \"%s\" er ikke en åben fil, datakanal eller ko proces" #: builtin.c:299 msgid "index: received non-string first argument" msgstr "indeks: første argument er ikke en streng" #: builtin.c:301 msgid "index: received non-string second argument" msgstr "indeks: andet argument er ikke en streng" #: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: fik et ikke-numerisk argument" #: builtin.c:428 msgid "length: received non-string argument" msgstr "length: fik et argument som ikke er en streng" #: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: fik et ikke-numerisk argument" #: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: fik et negativt argument %g" #: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "" #: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "\"$\" tillades ikke i awkformat" #: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "argumentantallet med \"$\" skal være > 0" #: builtin.c:722 #, fuzzy, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "argumentantallet %d er større end antal givne argumenter" #: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "\"$\" tillades ikke efter et punktum i formatet" #: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "intet \"$\" angivet for positionsangivet feltbredde eller præcision" #: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" er meningsløst i awk-formater, ignoreret" #: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "\"l\" tillades ikke i POSIX awk-formater" #: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" er meningsløst i awk-formater, ignoreret" #: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "\"L\" tillades ikke i POSIX awk-formater" #: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" er meningsløst i awk-formater, ignoreret" #: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "\"h\" tillades ikke i POSIX awk-formater" #: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "for få argumenter til formatstrengen" #: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ sluttede her" #: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: formatspecifiereren har intet kommandobogstav" #: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "for mange argumenter til formatstrengen" #: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: ingen argumenter" #: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fik ikke-numerisk argument" #: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: kaldt med negativt argument %g" #: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: startindeks %g er ugyldigt, bruger 1" #: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: startindeks %g som ikke er et heltal bliver trunkeret" #: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: længden %g er <= 0" #: builtin.c:1233 #, fuzzy, c-format msgid "substr: length %g is < 0" msgstr "substr: længden %g er <= 0" #: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: længden %g som ikke er et heltal bliver trunkeret" #: builtin.c:1245 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" #: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: kildestrengen er tom" #: builtin.c:1263 #, fuzzy, c-format msgid "substr: start index %g is past end of string" msgstr "substr: startindeks %d er forbi slutningen på strengen" #: builtin.c:1271 #, fuzzy, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: længden %d ved startindeks %d overskrider længden af første argument " "(%d)" #: builtin.c:1306 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: fik et første argument som ikke er en streng" #: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: fik en tom formatstreng" #: builtin.c:1321 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime: fik et ikke-numerisk andet argument" #: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: fik et argument som ikke er en streng" #: builtin.c:1429 #, fuzzy msgid "system: received non-string argument" msgstr "system: fik et argument som ikke er en streng" #: builtin.c:1573 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: fik et argument som ikke er en streng" #: builtin.c:1622 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: fik et argument som ikke er en streng" #: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: fik et ikke-numerisk første argument" #: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: fik et ikke-numerisk andet argument" #: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: fik et ikke-numerisk argument" #: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: fik et ikke-numerisk argument" #: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: fik et ikke-numerisk argument" #: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: tredje argument er ikke en vektor" #: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: Nullet i tredje argument behandlet som et ét-tal" #: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: fik et ikke-numerisk første argument" #: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" #: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: fik et ikke-numerisk første argument" #: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): for store skifteværdier vil give mærkelige resultater" #: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: fik et ikke-numerisk første argument" #: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: fik et ikke-numerisk første argument" #: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: fik et ikke-numerisk første argument" #: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negative værdier vil give mærkelige resultater" #: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: fik et ikke-numerisk argument" #: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negative værdier vil give mærkelige resultater" #: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flydendetalsværdier vil blive trunkeret" #: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" er ikke en gyldig lokalekategori" #: eval.c:262 #, c-format msgid "unknown nodetype %d" msgstr "ukendt nodetype %d" #: eval.c:310 msgid "buffer overflow in genflags2str" msgstr "bufferoverløb i genflags2str" #: eval.c:555 #, fuzzy, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" "for-løkke: vektoren \"%s\" ændrede størrelse fra %d til %d under løkke-" "udførelsen" #: eval.c:576 msgid "`break' outside a loop is not portable" msgstr "\"break\" uden for en løkke er ikke portabelt" #: eval.c:580 msgid "`break' outside a loop is not allowed" msgstr "\"break\" uden for en løkke er ikke tilladt" #: eval.c:597 msgid "`continue' outside a loop is not portable" msgstr "\"continue\" uden for en løkke er ikke portabelt" #: eval.c:601 msgid "`continue' outside a loop is not allowed" msgstr "\"continue\" uden for en løkke er ikke tilladt" #: eval.c:635 msgid "`next' cannot be called from a BEGIN rule" msgstr "\"next\" kan ikke kaldes fra en BEGIN-regel" #: eval.c:637 msgid "`next' cannot be called from an END rule" msgstr "\"next\" kan ikke kaldes fra en END-regel" #: eval.c:646 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "\"nextfile\" kan ikke kaldes fra en BEGIN-regel" #: eval.c:648 msgid "`nextfile' cannot be called from an END rule" msgstr "\"nextfile\" kan ikke kaldes fra en END-regel" #: eval.c:696 msgid "statement has no effect" msgstr "kommandoen har ingen effekt" #: eval.c:731 eval.c:761 eval.c:1733 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "reference til ikke-initieret variabel \"%s\"" #: eval.c:739 eval.c:1721 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "kan ikke bruge funktionsnavnet \"%s\" som variabel eller vektor" #: eval.c:746 eval.c:752 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "reference til ikke-initieret argument \"%s\"" #: eval.c:810 eval.c:1728 profile.c:773 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "forsøg på at bruge vektoren \"%s\" i skalarsammenhæng" #: eval.c:910 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenation: sideeffekter i et udtryk har ændret længden af et andet!" #: eval.c:935 msgid "assignment used in conditional context" msgstr "tildeling brugt i sammenligningsammenhæng" #: eval.c:1026 msgid "division by zero attempted" msgstr "forsøgte at dividere med nul" #: eval.c:1041 #, c-format msgid "division by zero attempted in `%%'" msgstr "forsøgte at dividere med nul i \"%%\"" #: eval.c:1056 profile.c:649 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "ikke tilladt type (%s) i tree_eval" #: eval.c:1232 msgid "division by zero attempted in `/='" msgstr "forsøgte at dividere med nul i \"/=\"" #: eval.c:1250 #, c-format msgid "division by zero attempted in `%%='" msgstr "forsøgte at dividere med nul i \"%%=\"" #: eval.c:1510 #, c-format msgid "%s (from %s)" msgstr "%s (fra %s)" #: eval.c:1569 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "funktionen \"%s\" kaldt med flere argumenter end deklareret" #: eval.c:1628 #, c-format msgid "function `%s' not defined" msgstr "funktionen \"%s\" er ikke defineret" #: eval.c:1634 #, c-format msgid "function %s called\n" msgstr "funktionen %s kaldt\n" #: eval.c:1693 msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Funktionskaldsstak:\n" "\n" #: eval.c:1696 msgid "\t# -- main --\n" msgstr "\t# -- main --\n" #: eval.c:1850 msgid "attempt to field reference from non-numeric value" msgstr "forsøg på at feltreferere fra ikke-numerisk værdi" #: eval.c:1852 msgid "attempt to reference from null string" msgstr "forsøg på at referere fra tom streng" #: eval.c:1858 #, c-format msgid "attempt to access field %d" msgstr "forsøg på at få adgang til felt nummer %d" #: eval.c:1874 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "forsøg på at bruge skalarparameteren \"%s\" som en vektor" #: eval.c:1886 eval.c:1893 profile.c:865 msgid "assignment is not allowed to result of builtin function" msgstr "tildeling er ikke tilladt til resultatet fra en indbygget funktion" #: eval.c:1941 msgid "`IGNORECASE' is a gawk extension" msgstr "\"IGNORECASE\" er en gawk-udvidelse" #: eval.c:1970 msgid "`BINMODE' is a gawk extension" msgstr "\"BINMODE\" er en gawk-udvidelse" #: eval.c:2082 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "fejlagtig \"%sFMT\"-specifikation \"%s\"" #: eval.c:2160 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "deaktiverer \"--lint\" på grund af en tildeling til \"LINT\"" #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "\"extension\" er en gawk-udvidelse" #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" msgstr "extension: kan ikke åbne \"%s\" (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: bibliotek \"%s\": kan ikke kalde funktionen \"%s\" (%s)\n" #: ext.c:181 msgid "Operation Not Supported" msgstr "Operationen understøttes ikke" #: field.c:321 msgid "NF set to negative value" msgstr "NF sat til en negativ værdi" #: field.c:819 msgid "split: second argument is not an array" msgstr "split: andet argument er ikke en vektor" #: field.c:854 msgid "split: null string for third arg is a gawk extension" msgstr "split: tom streng som tredje argument er en gawk-udvidelse" #: field.c:906 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "\"FIELDWIDTHS\" er en gawk-udvidelse" #: field.c:933 #, c-format msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "felt %d i FIELDWIDTHS skal være > 0" #: field.c:1006 msgid "null string for `FS' is a gawk extension" msgstr "tom streng som \"FS\" er en gawk-udvidelse" #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: flaget \"%s\" er flertydigt\n" #: getopt.c:737 getopt.c:741 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: flaget \"--%s\" tillader ikke noget argument\n" #: getopt.c:750 getopt.c:755 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: flaget \"%c%s\" tillader ikke noget argument\n" #: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: flaget \"%s\" kræver et argument\n" #: getopt.c:842 getopt.c:845 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: ukendt flag \"--%s\"\n" #: getopt.c:853 getopt.c:856 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: ukendt flag \"%c%s\"\n" #: getopt.c:903 getopt.c:906 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: ikke tilladt flag -- %c\n" #: getopt.c:912 getopt.c:915 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: ugyldig flag -- %c\n" #: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaget kræver et argument -- %c\n" #: getopt.c:1025 getopt.c:1036 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: flaget \"-W %s\" er flertydigt\n" #: getopt.c:1060 getopt.c:1072 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaget \"-W %s\" tillader ikke noget argument\n" #: io.c:257 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "kan ikke åbne filen \"%s\" for læsning (%s)" #: io.c:344 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "lukning af fd %d (\"%s\") mislykkedes (%s)" #: io.c:482 #, c-format msgid "invalid tree type %s in redirect()" msgstr "ugyldig trætype %s i redirect()" #: io.c:488 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "udtrykket i \"%s\"-omdirigering har kun numerisk værdi" #: io.c:494 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "udtrykket for \"%s\"-omdirigering har en tom streng som værdi" #: io.c:499 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "filnavnet \"%s\" for \"%s\"-omdirigering kan være resultatet af et logisk " "udtryk" #: io.c:521 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "unødig blanding af \">\" og \">>\" for filen \"%.*s\"" #: io.c:573 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "kan ikke åbne røret \"%s\" for udskrivning (%s)" #: io.c:582 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "kan ikke åbne røret \"%s\" for indtastning (%s)" #: io.c:595 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "kan ikke åbne tovejssoklen \"%s\" for ind-/uddata (%s)" #: io.c:599 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "kan ikke åbne tovejsrøret \"%s\" for ind-/uddata (%s)" #: io.c:675 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "kan ikke omdirigere fra \"%s\" (%s)" #: io.c:678 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "kan ikke omdirigere til \"%s\" (%s)" #: io.c:717 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "nåede systembegrænsningen for åbne filer: begynder at multiplekse " "fildeskriptorer" #: io.c:729 #, c-format msgid "close of `%s' failed (%s)." msgstr "lukning af \"%s\" mislykkedes (%s)" #: io.c:736 msgid "too many pipes or input files open" msgstr "for mange rør eller inddatafiler åbne" #: io.c:759 msgid "close: second argument must be `to' or `from'" msgstr "close: andet argument skal være \"to\" eller \"from\"" #: io.c:773 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: \"%.*s\" er ikke en åben fil, datakanal eller ko-proces" #: io.c:777 msgid "close of redirection that was never opened" msgstr "lukning af omdirigering som aldrig åbnedes" #: io.c:804 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: omdirigeringen \"%s\" åbnedes ikke med \"|&\", andet argument " "ignoreret" #: io.c:866 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "fejlstatus (%d) fra rørlukning af \"%s\" (%s)" #: io.c:869 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "fejlstatus (%d) fra fillukning af \"%s\" (%s)" #: io.c:888 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "ingen eksplicit lukning af soklen \"%s\" angivet" #: io.c:891 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "ingen eksplicit lukning af ko-processen \"%s\" angivet" #: io.c:894 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "ingen eksplicit lukning af røret \"%s\" angivet" #: io.c:897 #, c-format msgid "no explicit close of file `%s' provided" msgstr "ingen eksplicit lukning af filen \"%s\" angivet" #: io.c:926 io.c:980 #, c-format msgid "error writing standard output (%s)" msgstr "fejl ved skrivning til standard ud (%s)" #: io.c:930 io.c:984 #, c-format msgid "error writing standard error (%s)" msgstr "fejl ved skrivning til standard fejl (%s)" #: io.c:938 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "rørspuling af \"%s\" mislykkedes (%s)" #: io.c:941 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "ko-processpuling af røret til \"%s\" mislykkedes (%s)" #: io.c:944 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "filspuling af \"%s\" mislykkedes (%s)" #: io.c:1103 msgid "/inet/raw client not ready yet, sorry" msgstr "/inet/raw-klient er desværre ikke klar endnu" #: io.c:1105 io.c:1142 msgid "only root may use `/inet/raw'." msgstr "kun root kan bruge \"/inet/raw\"." #: io.c:1140 msgid "/inet/raw server not ready yet, sorry" msgstr "/inet/raw-server er desværre ikke klar endnu" #: io.c:1230 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "ingen (kendt) protokol opgivet i special-filnavn \"%s\"" #: io.c:1248 #, c-format msgid "special file name `%s' is incomplete" msgstr "special-filnavn \"%s\" er ufuldstændigt" #: io.c:1260 #, c-format msgid "local port invalid in `%s'" msgstr "lokal port ugyldig i \"%s\"" #: io.c:1272 msgid "must supply a remote hostname to `/inet'" msgstr "skal angive et fjernmaskinenavn til \"/inet\"" #: io.c:1287 msgid "must supply a remote port to `/inet'" msgstr "skal angive en fjernport til \"/inet\"" #: io.c:1293 #, c-format msgid "remote port invalid in `%s'" msgstr "fjernporten ugyldig i \"%s\"" #: io.c:1303 msgid "TCP/IP communications are not supported" msgstr "TCP/IP-kommunikation understøttes ikke" #: io.c:1312 io.c:1492 #, c-format msgid "file `%s' is a directory" msgstr "filen \"%s\" er et katalog" #: io.c:1381 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "brug \"PROCINFO[\"%s\"]\" i stedet for \"%s\"" #: io.c:1413 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "brug \"PROCINFO[...]\" i stedet for \"dev/user\"" #: io.c:1478 io.c:1652 #, c-format msgid "could not open `%s', mode `%s'" msgstr "kunne ikke åbne \"%s\", tilstand \"%s\"" #: io.c:1703 #, fuzzy, c-format msgid "close of master pty failed (%s)" msgstr "lukning af røret mislykkedes (%s)" #: io.c:1705 io.c:1857 io.c:2009 #, c-format msgid "close of stdout in child failed (%s)" msgstr "lukning af standard ud i barnet mislykkedes (%s)" #: io.c:1708 #, fuzzy, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)" #: io.c:1710 io.c:1862 #, c-format msgid "close of stdin in child failed (%s)" msgstr "lukning af standard ind i barnet mislykkedes (%s)" #: io.c:1713 #, fuzzy, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)" #: io.c:1715 io.c:1734 #, fuzzy, c-format msgid "close of slave pty failed (%s)" msgstr "lukning af røret mislykkedes (%s)" #: io.c:1808 io.c:1860 io.c:1990 io.c:2012 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "flytning af rør til standard ud i barnet mislykkedes (dup: %s)" #: io.c:1812 io.c:1865 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "flytning af rør til standard ind i barnet mislykkedes (dup: %s)" #: io.c:1829 io.c:2003 msgid "restoring stdout in parent process failed\n" msgstr "genskabelse af standard ud i forælderprocessen mislykkedes\n" #: io.c:1834 msgid "restoring stdin in parent process failed\n" msgstr "genskabelse af standard ind i forælderprocessen mislykkedes\n" #: io.c:1868 io.c:2014 io.c:2025 #, c-format msgid "close of pipe failed (%s)" msgstr "lukning af røret mislykkedes (%s)" #: io.c:1913 msgid "`|&' not supported" msgstr "\"|&\" understøttes ikke" #: io.c:1980 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "kan ikke åbne røret \"%s\" (%s)" #: io.c:2021 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "kan ikke oprette barneproces for \"%s\" (fork: %s)" #: io.c:2364 #, c-format msgid "data file `%s' is empty" msgstr "datafilen \"%s\" er tom" #: io.c:2407 io.c:2415 msgid "could not allocate more input memory" msgstr "" #: io.c:2540 io.c:2782 io.c:3046 #, c-format msgid "error reading input file `%s': %s" msgstr "fejl ved læsning af inddatafilen \"%s\": %s" #: io.c:3281 msgid "multicharacter value of `RS' is a gawk extension" msgstr "flertegnsværdien af \"RS\" er en gawk-udvidelse" #: main.c:322 msgid "`-m[fr]' option irrelevant in gawk" msgstr "\"-m[fr]\"-flaget er irrelevant i gawk" #: main.c:324 msgid "-m option usage: `-m[fr] nnn'" msgstr "-m-flagets brug: \"-m[fr] nnn\"" #: main.c:341 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: flaget \"-W %s\" ukendt, ignoreret\n" #: main.c:378 msgid "empty argument to `--source' ignored" msgstr "tomt argument til \"--source\" ignoreret" #: main.c:448 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "miljøvariablen \"POSIXLY_CORRECT\" sat: aktiverer \"--posix\"" #: main.c:453 msgid "`--posix' overrides `--traditional'" msgstr "\"--posix\" tilsidesætter \"--traditional\"" #: main.c:464 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "\"--posix\"/\"--traditional\" tilsidesætter \"--non-decimal-data\"" #: main.c:468 #, fuzzy, c-format msgid "running %s setuid root may be a security problem" msgstr "at køre %s setuid root kan være et sikkerhedsproblem" #: main.c:509 #, fuzzy, c-format msgid "can't set binary mode on stdin (%s)" msgstr "kan ikke sætte tilstand på standard ind (%s)" #: main.c:512 #, fuzzy, c-format msgid "can't set binary mode on stdout (%s)" msgstr "kan ikke sætte tilstand på standard ud (%s)" #: main.c:514 #, fuzzy, c-format msgid "can't set binary mode on stderr (%s)" msgstr "kan ikke sætte tilstand på standard fejl (%s)" #: main.c:544 msgid "no program text at all!" msgstr "ingen programtekst overhovedet!" #: main.c:612 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Brug: %s [POSIX- eller GNU-stilflag] -f progfil [--] fil ...\n" #: main.c:614 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Brug: %s [POSIX- eller GNU-stilflag] %cprogram%c fil ...\n" #: main.c:619 msgid "POSIX options:\t\tGNU long options:\n" msgstr "POSIX-flag:\t\tGNU lange flag:\n" #: main.c:620 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f progfil\t\t--file=progfil\n" #: main.c:621 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" #: main.c:622 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=værdi\t\t--assign=var=værdi\n" #: main.c:623 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] værdi\n" #: main.c:624 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" #: main.c:625 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" #: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" #: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" #: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" #: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" #: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" #: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" #: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" #: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" #: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fil]\t--profile[=fil]\n" #: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" #: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" #: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=programtekst\t--source=programtekst\n" #: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" #: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" #: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" #: main.c:649 #, fuzzy msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "" "sektionen \"Reporting Problems and Bugs\" i den trykte version.\n" "Rapportér synpunkter på oversættelsen til .\n" #: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" #: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" #: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2 of the License, or\n" "(at your option) any later version.\n" "\n" msgstr "" "Copyright © 1989, 1991-%d Free Software Foundation.\n" "\n" "Dette program er frit programmel. Du kan distribuere det og/eller\n" "ændre det under betingelserne i GNU General Public License, offentliggjort\n" "af Free Software Foundation, enten version 2 eller (hvis du vil)\n" "enhver senere version.\n" "\n" #: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" msgstr "" "Dette program distribueres i håb om at det vil være nyttigt,\n" "men UDEN NOGEN SOM HELST GARANTI, også uden underforstået garanti\n" "om SALGBARHED eller EGNETHED FOR NOGET SPECIELT FORMÅL. Se GNU\n" "General Public License for yderligere information.\n" "\n" #: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" "Du bør have fået en kopi af GNU General Public License sammen\n" "med dette program. Hvis ikke, så skriv til Free Software Foundation,\n" "Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" #: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sætter ikke FS til tab i POSIX-awk" #: main.c:944 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" #: main.c:964 #, c-format msgid "`%s' is not a legal variable name" msgstr "" #: main.c:967 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" #: main.c:995 msgid "floating point exception" msgstr "flydendetalsundtagelse" #: main.c:1002 msgid "fatal error: internal error" msgstr "fatal fejl: intern fejl" #: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "ingen for-åbnet fd %d" #: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunne ikke for-åbne /dev/null for fd %d" #: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "kunne ikke finde grupper: %s" #: msg.c:54 msgid "cmd. line:" msgstr "kommandolinje:" #: msg.c:120 msgid "warning: " msgstr "advarsel: " #: msg.c:142 msgid "error: " msgstr "fejl: " #: msg.c:178 msgid "fatal: " msgstr "fatal: " #: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 msgid "can't convert string to float" msgstr "kan ikke konvertere en streng til flydende tal" #: node.c:357 msgid "backslash at end of string" msgstr "omvendt skråstreg i slutningen af strengen" #: node.c:544 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX tillader ikke \"\\x\"-kontrolsekvenser" #: node.c:550 msgid "no hex digits in `\\x' escape sequence" msgstr "ingen heksadecimale cifre i \"\\x\"-kontrolsekvenser" #: node.c:584 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "kontrolsekvensen \"\\%c\" behandlet som kun \"%c\"" #: posix/gawkmisc.c:172 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "%s %s \"%s\": kunne ikke sætte luk-ved-exec (fcntl: %s)" #: profile.c:91 #, c-format msgid "could not open `%s' for writing: %s" msgstr "kunne ikke åbne \"%s\" for skrivning: %s" #: profile.c:409 msgid "internal error: Node_var with null vname" msgstr "intern fejl: Node_var med null vname" #: profile.c:471 msgid "# treated internally as `delete'" msgstr "" #: profile.c:545 msgid "internal error: Node_var_array with null vname" msgstr "intern fejl: Node_var_vektor med null vname" #: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawkprofil, oprettet %s\n" #: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" "\t# BEGIN-blok\n" "\n" #: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" msgstr "" "\t# Regel/regler\n" "\n" #: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" msgstr "" "\t# END-blok\n" "\n" #: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" "\n" "\t# Funktioner, listede alfabetisk\n" #: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "uventet type %s i prec_level" #: re.c:193 #, c-format msgid "regex match failed, not enough memory to match string \"%.*s%s\"" msgstr "" #: regcomp.c:136 msgid "Success" msgstr "Lykkedes" #: regcomp.c:139 msgid "No match" msgstr "Mislykkedes" #: regcomp.c:142 msgid "Invalid regular expression" msgstr "Ugyldigt regulært udtryk" #: regcomp.c:145 msgid "Invalid collation character" msgstr "Ugyldigt kollationeringstegn" #: regcomp.c:148 msgid "Invalid character class name" msgstr "Ugyldigt tegnklassenavn" #: regcomp.c:151 msgid "Trailing backslash" msgstr "Efterfølgende omvendt skråstreg" #: regcomp.c:154 msgid "Invalid back reference" msgstr "Ugyldig bagudreference" #: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "Ubalanceret [ eller [^" #: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "Ubalanceret ( eller \\(" #: regcomp.c:163 msgid "Unmatched \\{" msgstr "Ubalanceret \\{" #: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Ugyldigt indhold i \\{\\}" #: regcomp.c:169 msgid "Invalid range end" msgstr "Ugyldig intervalslutning" #: regcomp.c:172 msgid "Memory exhausted" msgstr "Hukommelsen opbrugt" #: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Ugyldigt foregående regulært udtryk" #: regcomp.c:178 msgid "Premature end of regular expression" msgstr "For tidligt slut på regulært udtryk" #: regcomp.c:181 msgid "Regular expression too big" msgstr "Regulært udtryk for stort" #: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr "Ubalanceret ) eller \\)" #: regcomp.c:621 msgid "No previous regular expression" msgstr "Intet foregående regulært udtryk" #~ msgid "BEGIN blocks must have an action part" #~ msgstr "BEGIN-blok skal have en handlingsdel" #~ msgid "`nextfile' used in BEGIN or END action" #~ msgstr "\"nextfile\" brugt i BEGIN- eller END-handling" #~ msgid "gsub third parameter is not a changeable object" #~ msgstr "gsub: tredje argument er ikke et ændringsbart objekt" #~ msgid "or used in other expression context" #~ msgstr "eller brugt i andre udtrykssammenhænge" #~ msgid "attempt to use function `%s' as array" #~ msgstr "forsøg på at bruge funktionen \"%s\" som vektor" #~ msgid "`%s' is a function, assignment is not allowed" #~ msgstr "\"%s\" er en funktion, tildeling er ikke tilladt" #~ msgid "internal error: file `%s', line %d\n" #~ msgstr "intern fejl: filen \"%s\", linje %d\n" #~ msgid "" #~ "\n" #~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" #~ msgstr "" #~ "\n" #~ "For at rapportere fejl, se knuden \"Bugs\" i \"gawk.info\" som findes i\n" #~ msgid "invalid syntax in name `%s' for variable assignment" #~ msgstr "ugyldig syntaks i navnet \"%s\" for variabeltildeling" #~ msgid "non-redirected `getline' undefined inside BEGIN or END action" #~ msgstr "" #~ "ikke-omdirigeret \"getline\" udefineret inde i BEGIN- eller END-handling" #~ msgid "fptr %x not in tokentab\n" #~ msgstr "fptr %x er ikke i tokentab\n" #~ msgid "Unfinished \\ escape" #~ msgstr "Uafsluttet \\-kontrolsekvens" #~ msgid "unfinished repeat count" #~ msgstr "uafsluttet gentagelsesantal" #~ msgid "malformed repeat count" #~ msgstr "fejlagtigt udformet gentagelsesantal" #~ msgid "Unbalanced [" #~ msgstr "Ubalanceret [" #~ msgid "Unbalanced (" #~ msgstr "Ubalanceret (" #~ msgid "No regexp syntax bits specified" #~ msgstr "Ingen syntaksbit for regulære udtryk angivet" #~ msgid "Unbalanced )" #~ msgstr "Ubalanceret )" #~ msgid "out of memory" #~ msgstr "slut på hukommelsen" EOF echo - 'po/pt_BR.po' cat << 'EOF' > 'po/pt_BR.po' # gawk pt_BR translation. # Copyright (C) 2003 Free Software Foundation, Inc. # This file is distributed under the same license as the PACKAGE package. # Juan Carlos Castro y Castro , 2003. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.1l\n" "POT-Creation-Date: 2003-03-19 14:25+0200\n" "PO-Revision-Date: 2003-02-22 13:25-0300\n" "Last-Translator: Juan Carlos Castro y Castro \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentativa de usar escalar `%s' como vetor" #: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referência a elemento não inicializado `%s[\"%s\"]'" #: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "índice do vetor `%s' é uma string nula" #: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: índice `%s' não está no vetor `%s'" #: array.c:432 array.c:515 #, c-format msgid "delete: illegal use of variable `%s' as array" msgstr "delete: uso ilegal da variável `%s' como vetor" #: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vazio (nulo)\n" #: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vazio (zero)\n" #: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" #: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "%s: é parâmetro\n" #: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref para %s\n" #: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: primeiro argumento não é um vetor" #: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: segundo argumento não é um vetor" #: awkgram.y:208 #, c-format msgid "%s blocks must have an action part" msgstr "blocos %s devem ter uma parte de ação" #: awkgram.y:211 msgid "each rule must have a pattern or an action part" msgstr "cada regra deve ter um padrão ou uma parte de ação" #: awkgram.y:267 #, c-format msgid "`%s' is a built-in function, it cannot be redefined" msgstr "`%s' é uma função intrínseca, não pode ser redefinida" #: awkgram.y:314 #, c-format msgid "regexp constant `/%s/' looks like a C comment, but is not" msgstr "constante de expr. reg. `/%s/' parece um comentário C, mas não é" #: awkgram.y:340 msgid "statement may have no effect" msgstr "declaração pode não ter efeito" #: awkgram.y:431 awkgram.y:451 #, c-format msgid "`%s' used in %s action" msgstr "`%s' usado em ação %s" #: awkgram.y:444 awkgram.y:447 msgid "`nextfile' is a gawk extension" msgstr "`nextfile' é uma extensão do gawk" #: awkgram.y:461 msgid "`return' used outside function context" msgstr "`return' usado fora do contexto de função" #: awkgram.y:500 msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" msgstr "" "`print' sozinho em regra BEGIN ou END provavelmente deveria ser `print \"\"'" #: awkgram.y:513 awkgram.y:520 msgid "`delete array' is a gawk extension" msgstr "`delete array' é uma extensão do gawk" #: awkgram.y:528 awkgram.y:535 msgid "`delete(array)' is a non-portable tawk extension" msgstr "`delete(array)' é uma extensão não-portável do tawk" #: awkgram.y:578 msgid "multistage two-way pipelines don't work" msgstr "pipelines bidirecionais de múltiplos estágios não funcionam" #: awkgram.y:669 msgid "regular expression on right of assignment" msgstr "expressão regular à direita de atribuição" #: awkgram.y:679 msgid "regular expression on left of `~' or `!~' operator" msgstr "expressão regular à esquerda de operador `~' ou `!~'" #: awkgram.y:687 msgid "regular expression on right of comparison" msgstr "expressão regular à direita de comparação" #: awkgram.y:754 msgid "non-redirected `getline' undefined inside END action" msgstr "`getline' não-redirecionado não é definido dentro da ação END" #: awkgram.y:781 msgid "call of `length' without parentheses is not portable" msgstr "chamada a `length' sem parênteses não é portável" #: awkgram.y:784 msgid "call of `length' without parentheses is deprecated by POSIX" msgstr "chamada a `length' sem parênteses é obsoleta de acordo com POSIX" #: awkgram.y:835 msgid "invalid subscript expression" msgstr "expressão de índice inválida" #: awkgram.y:1020 msgid "unexpected newline or end of string" msgstr "fim de linha ou de string inesperado" #: awkgram.y:1115 msgid "empty program text on command line" msgstr "texto de programa vazio na linha de comando" #: awkgram.y:1172 #, c-format msgid "can't open source file `%s' for reading (%s)" msgstr "impossível abrir arquivo-fonte `%s' para leitura (%s)" #: awkgram.y:1207 #, c-format msgid "can't read sourcefile `%s' (%s)" msgstr "impossível ler arquivo-fonte `%s' (%s)" #: awkgram.y:1215 #, c-format msgid "source file `%s' is empty" msgstr "arquivo-fonte `%s' está vazio" #: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 msgid "source file does not end in newline" msgstr "arquivo-fonte não termina em fim-de-linha" #: awkgram.y:1481 msgid "unterminated regexp ends with `\\' at end of file" msgstr "expressão regular inacabada termina com `\\' ao fim do arquivo" #: awkgram.y:1501 msgid "unterminated regexp" msgstr "expressão regular inacabada" #: awkgram.y:1504 msgid "unterminated regexp at end of file" msgstr "expressão regular inacabada no fim do arquivo" #: awkgram.y:1571 msgid "use of `\\ #...' line continuation is not portable" msgstr "uso da continuação de linha `\\ #...' não é portável" #: awkgram.y:1583 msgid "backslash not last character on line" msgstr "`\\' não é o último caracter da linha" #: awkgram.y:1628 msgid "POSIX does not allow operator `**='" msgstr "POSIX não permite o operador `**='" #: awkgram.y:1630 msgid "old awk does not support operator `**='" msgstr "o velho awk não suporta o operador `**='" #: awkgram.y:1639 msgid "POSIX does not allow operator `**'" msgstr "POSIX não permite o operador `**'" #: awkgram.y:1641 msgid "old awk does not support operator `**'" msgstr "o velho awk não suporta o operador `**'" #: awkgram.y:1672 msgid "operator `^=' is not supported in old awk" msgstr "o velho awk não suporta o operador `^='" #: awkgram.y:1680 msgid "operator `^' is not supported in old awk" msgstr "o velho awk não suporta o operador `^'" #: awkgram.y:1764 awkgram.y:1781 msgid "unterminated string" msgstr "string inacabada" #: awkgram.y:1941 #, c-format msgid "invalid char '%c' in expression" msgstr "caracter inválido '%c' em expressão" #: awkgram.y:2001 #, c-format msgid "`%s' is a gawk extension" msgstr "`%s' é uma extensão do gawk" #: awkgram.y:2004 #, c-format msgid "`%s' is a Bell Labs extension" msgstr "`%s' é uma extensão da Bell Labs" #: awkgram.y:2007 #, c-format msgid "POSIX does not allow `%s'" msgstr "POSIX não permite `%s'" #: awkgram.y:2011 #, c-format msgid "`%s' is not supported in old awk" msgstr "`%s' não é suportado no velho awk" #: awkgram.y:2038 msgid "`goto' considered harmful!\n" msgstr "`goto' é considerado danoso!\n" #: awkgram.y:2102 #, c-format msgid "%d is invalid as number of arguments for %s" msgstr "%d é inválido como número de argumentos para %s" #: awkgram.y:2121 awkgram.y:2124 msgid "match: third argument is a gawk extension" msgstr "match: terceiro argumento é uma extensão do gawk" #: awkgram.y:2137 #, c-format msgid "%s: string literal as last arg of substitute has no effect" msgstr "" "%s: string literal como último argumento de substituição não tem efeito" #: awkgram.y:2140 #, c-format msgid "%s third parameter is not a changeable object" msgstr "terceiro parâmetro %s não é um objeto modificável" #: awkgram.y:2167 awkgram.y:2170 msgid "close: second argument is a gawk extension" msgstr "close: segundo argumento é uma extensão do gawk" #: awkgram.y:2180 msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" msgstr "uso de dcgettext(_\"...\") é incorreto: remova o `_' precedente" #: awkgram.y:2195 msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" msgstr "uso de dcngettext(_\"...\") é incorreto: remova o `_' precedente" #: awkgram.y:2266 #, c-format msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" msgstr "função `%s': parâmetro #%d, `%s', duplica parâmetro #%d" #: awkgram.y:2299 #, c-format msgid "function `%s': parameter `%s' shadows global variable" msgstr "função `%s': parâmetro `%s' encobre variável global" #: awkgram.y:2411 #, c-format msgid "could not open `%s' for writing (%s)" msgstr "impossível abrir `%s' para escrita (%s)" #: awkgram.y:2412 profile.c:93 msgid "sending profile to standard error" msgstr "enviando perfil para saída de erros" #: awkgram.y:2442 #, c-format msgid "%s: close failed (%s)" msgstr "%s: `close' falhou (%s)" #: awkgram.y:2566 msgid "shadow_funcs() called twice!" msgstr "shadow_funcs() chamada duas vezes!" #: awkgram.y:2593 msgid "there were shadowed variables." msgstr "houve variáveis encobertas." #: awkgram.y:2666 #, c-format msgid "function `%s': can't use function name as parameter name" msgstr "função `%s': não se pode usar o nome da função como nome de parâmetro" #: awkgram.y:2676 #, c-format msgid "function name `%s' previously defined" msgstr "nome de função `%s' definido anteriormente" #: awkgram.y:2827 awkgram.y:2833 #, c-format msgid "function `%s' called but never defined" msgstr "função `%s' chamada mas nunca definida" #: awkgram.y:2836 #, c-format msgid "function `%s' defined but never called" msgstr "função `%s' definida mas nunca chamada" #: awkgram.y:2863 #, c-format msgid "regexp constant for parameter #%d yields boolean value" msgstr "" "constante com expr. regular para parâmetro nº %d retorna valor booleano" #: awkgram.y:2876 #, c-format msgid "" "function `%s' called with space between name and `(',\n" "%s" msgstr "" "função `%s' chamada com espaço entre o nome e o `(',\n" "%s" #: awkgram.y:2878 msgid "or used as a variable or an array" msgstr "ou usado como uma variável ou vetor" #: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s para \"%s\" falhou (%s)" #: builtin.c:112 msgid "standard output" msgstr "saída padrão" #: builtin.c:113 msgid "reason unknown" msgstr "motivo desconhecido" #: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: recebeu argumento não-numérico" #: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumento %g está fora da faixa" #: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: erro ao descarregar: pipe `%s' aberto para leitura, não gravação" #: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: erro ao descarregar: arquivo `%s' aberto para leitura, não gravação" #: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' não é um arquivo aberto, pipe ou co-processo" #: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: recebeu primeiro argumento não-string" #: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: recebeu segundo argumento não-string" #: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: recebeu argumento não-numérico" #: builtin.c:428 msgid "length: received non-string argument" msgstr "length: recebeu argumento não-string" #: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: recebeu argumento não-numérico" #: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: recebeu argumento negativo %g" #: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "deve usar `count$' em todos os formatos ou nenhum" #: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "`$' não é permitido em formatos awk" #: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "nº de argumentos com `$' deve ser > 0" #: builtin.c:722 #, c-format msgid "arg count %ld greater than total number of supplied arguments" msgstr "nº de argumentos %ld maior que nº total de argumentos fornecidos" #: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "`$' não é permitido depois de ponto no formato" #: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "nenhum `$' fornecido para tamanho ou precisão de campo posicional" #: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' não faz sentido em formatos awk; ignorado" #: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' não é permitido em formatos POSIX awk" #: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' não faz sentido em formatos awk; ignorado" #: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' não é permitido em formatos POSIX awk" #: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' não faz sentido em formatos awk; ignorado" #: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' não é permitido em formatos POSIX awk" #: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "argumentos insuficientes para a string de formato" #: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ acabou para este aqui" #: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: declaração de formato não tem letra de controle" #: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "excesso de argumentos para a string de formato" #: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: nenhum argumento" #: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: recebeu argumento não-numérico" #: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chamada com argumento negativo %g" #: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: posição inicial %g é inválida, usando 1" #: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: posição inicial %g não-inteira será truncada" #: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: comprimento %g é <= 0" #: builtin.c:1233 #, c-format msgid "substr: length %g is < 0" msgstr "substr: comprimento %g é < 0" #: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: comprimento %g não-inteiro será truncado" #: builtin.c:1245 #, c-format msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "substr: comprimento %g excessivo para indexação, truncando para %g" #: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: string origem tem comprimento zero" #: builtin.c:1263 #, c-format msgid "substr: start index %g is past end of string" msgstr "substr: posição inicial %g além do fim da string" #: builtin.c:1271 #, c-format msgid "" "substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "substr: comprimento %g a partir da posição %g excede tamanho do 1º argumento " "(%lu)" #: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: recebeu primeiro argumento não-string" #: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: recebeu string de formato vazia" #: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "strftime: recebeu segundo argumento não-numérico" #: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: recebeu argumento não-string" #: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: recebeu argumento não-string" #: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: recebeu argumento não-string" #: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: recebeu argumento não-string" #: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: recebeu primeiro argumento não-numérico" #: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: recebeu segundo argumento não-numérico" #: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: recebeu argumento não-numérico" #: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: recebeu argumento não-numérico" #: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: recebeu argumento não-numérico" #: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: terceiro argumento não é um vetor" #: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: 3º argumento 0 tratado como 1" #: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: recebeu primeiro argumento não-numérico" #: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valores negativos darão resultados estranhos" #: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valores fracionários serão truncados" #: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): deslocamento excessivo dará resultados estranhos" #: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: recebeu primeiro argumento não-numérico" #: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valores negativos darão resultados estranhos" #: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valores fracionários serão truncados" #: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): deslocamento excessivo dará resultados estranhos" #: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: recebeu primeiro argumento não-numérico" #: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valores negativos darão resultados estranhos" #: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valores fracionários serão truncados" #: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: recebeu primeiro argumento não-numérico" #: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valores negativos darão resultados estranhos" #: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valores fracionários serão truncados" #: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: recebeu primeiro argumento não-numérico" #: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valores negativos darão resultados estranhos" #: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valores fracionários serão truncados" #: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: recebeu primeiro argumento não-numérico" #: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valores negativos darão resultados estranhos" #: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valores fracionários serão truncados" #: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' não é uma categoria de \"locale\" válida" #: eval.c:262 #, c-format msgid "unknown nodetype %d" msgstr "tipo de nodo desconhecido %d" #: eval.c:310 msgid "buffer overflow in genflags2str" msgstr "estouro de buffer em genflags2str" #: eval.c:555 #, c-format msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" #: eval.c:576 msgid "`break' outside a loop is not portable" msgstr "`break' fora de um loop não é portável" #: eval.c:580 msgid "`break' outside a loop is not allowed" msgstr "`break' fora de um loop não é permitido" #: eval.c:597 msgid "`continue' outside a loop is not portable" msgstr "`continue' fora de um loop não é portável" #: eval.c:601 msgid "`continue' outside a loop is not allowed" msgstr "`continue' fora de um loop não é permitido" #: eval.c:635 msgid "`next' cannot be called from a BEGIN rule" msgstr "`next' não pode ser chamado de uma regra BEGIN" #: eval.c:637 msgid "`next' cannot be called from an END rule" msgstr "`next' não pode ser chamado de uma regra END" #: eval.c:646 msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "`nextfile' não pode ser chamado de uma regra BEGIN" #: eval.c:648 msgid "`nextfile' cannot be called from an END rule" msgstr "`nextfile' não pode ser chamado de uma regra END" #: eval.c:696 msgid "statement has no effect" msgstr "declaração não tem efeito" #: eval.c:731 eval.c:761 eval.c:1733 #, c-format msgid "reference to uninitialized variable `%s'" msgstr "referência a variável não inicializada `%s'" #: eval.c:739 eval.c:1721 #, c-format msgid "can't use function name `%s' as variable or array" msgstr "não se pode usar o nome de função `%s' como variável ou vetor" #: eval.c:746 eval.c:752 #, c-format msgid "reference to uninitialized argument `%s'" msgstr "referência a argumento não inicializado `%s'" #: eval.c:810 eval.c:1728 profile.c:773 #, c-format msgid "attempt to use array `%s' in a scalar context" msgstr "tentativa de usar vetor `%s' em um contexto escalar" #: eval.c:910 msgid "" "concatenation: side effects in one expression have changed the length of " "another!" msgstr "" "concatenação: efeitos colaterais em um contexto mudaram o comprimento de " "outro!" #: eval.c:935 msgid "assignment used in conditional context" msgstr "atribuição usada em contexto condicional" #: eval.c:1026 msgid "division by zero attempted" msgstr "tentativa de divisão por zero" #: eval.c:1041 #, c-format msgid "division by zero attempted in `%%'" msgstr "tentativa de divisão por zero em `%%'" #: eval.c:1056 profile.c:649 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "tipo ilegal (%s) em tree_eval" #: eval.c:1232 msgid "division by zero attempted in `/='" msgstr "tentativa de divisão por zero em `/='" #: eval.c:1250 #, c-format msgid "division by zero attempted in `%%='" msgstr "tentativa de divisão por zero em `%%='" #: eval.c:1510 #, c-format msgid "%s (from %s)" msgstr "%s (de %s)" #: eval.c:1569 #, c-format msgid "function `%s' called with more arguments than declared" msgstr "função `%s' chamada com mais argumentos que os declarados" #: eval.c:1628 #, c-format msgid "function `%s' not defined" msgstr "função `%s' não definida" #: eval.c:1634 #, c-format msgid "function %s called\n" msgstr "função %s chamada\n" #: eval.c:1693 msgid "" "\n" "\t# Function Call Stack:\n" "\n" msgstr "" "\n" "\t# Pilha de Chamadas de Função:\n" "\n" #: eval.c:1696 msgid "\t# -- main --\n" msgstr "\t# -- main --\n" #: eval.c:1850 msgid "attempt to field reference from non-numeric value" msgstr "tentativa de referência a campo a partir de valor não-numérico" #: eval.c:1852 msgid "attempt to reference from null string" msgstr "tentativa de referência a partir de string nula" #: eval.c:1858 #, c-format msgid "attempt to access field %d" msgstr "tentativa de acessar campo %d" #: eval.c:1874 #, c-format msgid "attempt to use scalar parameter `%s' as an array" msgstr "tentativa de usar parâmetro escalar `%s' como vetor" #: eval.c:1886 eval.c:1893 profile.c:865 msgid "assignment is not allowed to result of builtin function" msgstr "atribuição não pode resultar de funções intrínsecas" #: eval.c:1941 msgid "`IGNORECASE' is a gawk extension" msgstr "`IGNORECASE' é uma extensão do gawk" #: eval.c:1970 msgid "`BINMODE' is a gawk extension" msgstr "`BINMODE' é uma extensão do gawk" #: eval.c:2082 #, c-format msgid "bad `%sFMT' specification `%s'" msgstr "especificação `%sFMT' inválida `%s'" #: eval.c:2160 msgid "turning off `--lint' due to assignment to `LINT'" msgstr "desativando `--lint' devido a atribuição a `LINT'" #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "`extension' é uma extensão do gawk" #: ext.c:74 #, c-format msgid "extension: cannot open `%s' (%s)\n" msgstr "extension: impossível abrir `%s' (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: biblioteca `%s': impossível chamar função `%s' (%s)\n" #: ext.c:181 msgid "Operation Not Supported" msgstr "Operação Não Suportada" #: field.c:321 msgid "NF set to negative value" msgstr "valor negativo atribuído a NF" #: field.c:819 msgid "split: second argument is not an array" msgstr "split: segundo argumento não é um vetor" #: field.c:854 msgid "split: null string for third arg is a gawk extension" msgstr "split: string nula para segundo argumento é uma extensão do gawk" #: field.c:906 msgid "`FIELDWIDTHS' is a gawk extension" msgstr "`FIELDWIDTHS' é uma extensão do gawk" #: field.c:933 #, c-format msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "campo %d em FIELDWIDTHS deve ser > 0" #: field.c:1006 msgid "null string for `FS' is a gawk extension" msgstr "string nula para `FS' é uma extensão do gawk" #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" msgstr "%s: opção `%s' é ambígua\n" #: getopt.c:737 getopt.c:741 #, c-format msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "%s: opção `--%s' não aceita argumento\n" #: getopt.c:750 getopt.c:755 #, c-format msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "%s: opção `%c%s' não aceita argumento\n" #: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 #, c-format msgid "%s: option `%s' requires an argument\n" msgstr "%s: opção `%s' requer argumento\n" #: getopt.c:842 getopt.c:845 #, c-format msgid "%s: unrecognized option `--%s'\n" msgstr "%s: opção não reconhecida `--%s'\n" #: getopt.c:853 getopt.c:856 #, c-format msgid "%s: unrecognized option `%c%s'\n" msgstr "%s: opção não reconhecida `%c%s'\n" #: getopt.c:903 getopt.c:906 #, c-format msgid "%s: illegal option -- %c\n" msgstr "%s: opção ilegal -- %c\n" #: getopt.c:912 getopt.c:915 #, c-format msgid "%s: invalid option -- %c\n" msgstr "%s: opção inválida -- %c\n" #: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: opção requer argumento -- %c\n" #: getopt.c:1025 getopt.c:1036 #, c-format msgid "%s: option `-W %s' is ambiguous\n" msgstr "%s: opção `-W %s' é ambígua\n" #: getopt.c:1060 getopt.c:1072 #, c-format msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opção `-W %s' não aceita argumento\n" #: io.c:257 #, c-format msgid "cannot open file `%s' for reading (%s)" msgstr "impossível abrir arquivo `%s' para leitura (%s)" #: io.c:344 #, c-format msgid "close of fd %d (`%s') failed (%s)" msgstr "fechamento do descritor %d (`%s') falhou (%s)" #: io.c:482 #, c-format msgid "invalid tree type %s in redirect()" msgstr "tipo de árvore %s inválido em redirect()" #: io.c:488 #, c-format msgid "expression in `%s' redirection only has numeric value" msgstr "expressão no redirecionamento `%s' só tem valor numérico" #: io.c:494 #, c-format msgid "expression for `%s' redirection has null string value" msgstr "expressão para o redirecionamento `%s' tem valor string nulo" #: io.c:499 #, c-format msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" "nome de arquivo `%s' para redirecionamento `%s' pode ser resultado de " "expressão lógica" #: io.c:521 #, c-format msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "mistura desnecessária de `>' e `>>' para arquivo `%.*s'" #: io.c:573 #, c-format msgid "can't open pipe `%s' for output (%s)" msgstr "impossível abrir pipe `%s' para saída (%s)" #: io.c:582 #, c-format msgid "can't open pipe `%s' for input (%s)" msgstr "impossível abrir pipe `%s' para entrada (%s)" #: io.c:595 #, c-format msgid "can't open two way socket `%s' for input/output (%s)" msgstr "impossível abrir socket bidirecional `%s' para entrada/saída (%s)" #: io.c:599 #, c-format msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "impossível abrir pipe bidirecional `%s' para entrada/saída (%s)" #: io.c:675 #, c-format msgid "can't redirect from `%s' (%s)" msgstr "impossível redirecionar de `%s' (%s)" #: io.c:678 #, c-format msgid "can't redirect to `%s' (%s)" msgstr "impossível redirecionar para `%s' (%s)" #: io.c:717 msgid "" "reached system limit for open files: starting to multiplex file descriptors" msgstr "" "alcançado limite do sistema para arquivos abertos; começando a multiplexar " "descritores de arquivos" #: io.c:729 #, c-format msgid "close of `%s' failed (%s)." msgstr "fechamento de `%s' falhou (%s)" #: io.c:736 msgid "too many pipes or input files open" msgstr "excesso de pipes ou arquivos de entrada abertos" #: io.c:759 msgid "close: second argument must be `to' or `from'" msgstr "close: segundo argumento deve ser `to' ou `from'" #: io.c:773 #, c-format msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "close: `%.*s' não é um arquivo aberto, pipe ou co-processo" #: io.c:777 msgid "close of redirection that was never opened" msgstr "fechamento de redirecionamento que nunca foi aberto" #: io.c:804 #, c-format msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" "close: redirecionamento `%s' não foi aberto com `|&', segundo argumento " "ignorado" #: io.c:866 #, c-format msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "status de falha (%d) ao fechar pipe de `%s' (%s)" #: io.c:869 #, c-format msgid "failure status (%d) on file close of `%s' (%s)" msgstr "status de falha (%d) ao fechar arquivo de `%s' (%s)" #: io.c:888 #, c-format msgid "no explicit close of socket `%s' provided" msgstr "fechamento explícito do socket `%s' não fornecido" #: io.c:891 #, c-format msgid "no explicit close of co-process `%s' provided" msgstr "fechamento explícito do co-processo `%s' não fornecido" #: io.c:894 #, c-format msgid "no explicit close of pipe `%s' provided" msgstr "fechamento explícito do pipe `%s' não fornecido" #: io.c:897 #, c-format msgid "no explicit close of file `%s' provided" msgstr "fechamento explícito do arquivo `%s' não fornecido" #: io.c:926 io.c:980 #, c-format msgid "error writing standard output (%s)" msgstr "erro ao escrever na saída padrão (%s)" #: io.c:930 io.c:984 #, c-format msgid "error writing standard error (%s)" msgstr "erro ao escrever na saída padrão de erros (%s)" #: io.c:938 #, c-format msgid "pipe flush of `%s' failed (%s)." msgstr "" #: io.c:941 #, c-format msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" #: io.c:944 #, c-format msgid "file flush of `%s' failed (%s)." msgstr "" #: io.c:1103 msgid "/inet/raw client not ready yet, sorry" msgstr "infelizmente, o cliente de /inet/raw não está concluído" #: io.c:1105 io.c:1142 msgid "only root may use `/inet/raw'." msgstr "apenas root pode usar `/inet/raw'." #: io.c:1140 msgid "/inet/raw server not ready yet, sorry" msgstr "infelizmente, o servidor de /inet/raw não está concluído" #: io.c:1230 #, c-format msgid "no (known) protocol supplied in special filename `%s'" msgstr "" "nenhum protocolo (conhecido) fornecido em nome de arquivo especial `%s'" #: io.c:1248 #, c-format msgid "special file name `%s' is incomplete" msgstr "nome de arquivo especial `%s' está incompleto" #: io.c:1260 #, c-format msgid "local port invalid in `%s'" msgstr "porta local inválida em `%s'" #: io.c:1272 msgid "must supply a remote hostname to `/inet'" msgstr "deve ser fornecido um nome de host remoto para `/inet'" #: io.c:1287 msgid "must supply a remote port to `/inet'" msgstr "deve ser fornecida uma porta remota para `/inet'" #: io.c:1293 #, c-format msgid "remote port invalid in `%s'" msgstr "porta remota inválida em `%s'" #: io.c:1303 msgid "TCP/IP communications are not supported" msgstr "comunicação TCP/IP não é suportada" #: io.c:1312 io.c:1492 #, c-format msgid "file `%s' is a directory" msgstr "arquivo `%s' é um diretório" #: io.c:1381 #, c-format msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "use `PROCINFO[\"%s\"]' em vez de `%s'" #: io.c:1413 msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "use `PROCINFO[...]' em vez de `/dev/user'" #: io.c:1478 io.c:1652 #, c-format msgid "could not open `%s', mode `%s'" msgstr "impossível abrir `%s', modo `%s'" #: io.c:1703 #, c-format msgid "close of master pty failed (%s)" msgstr "falha ao fechar pty mestre (%s)" #: io.c:1705 io.c:1857 io.c:2009 #, c-format msgid "close of stdout in child failed (%s)" msgstr "falha ao fechar stdout em filho (%s)" #: io.c:1708 #, c-format msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "falha ao mover pty escrava para stdout em filho (dup: %s)" #: io.c:1710 io.c:1862 #, c-format msgid "close of stdin in child failed (%s)" msgstr "falha ao fechar stdin em filho (%s)" #: io.c:1713 #, c-format msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "falha ao mover pty escrava para stdin em filho (dup: %s)" #: io.c:1715 io.c:1734 #, c-format msgid "close of slave pty failed (%s)" msgstr "falha ao fechar pty escrava (%s)" #: io.c:1808 io.c:1860 io.c:1990 io.c:2012 #, c-format msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "falha ao mover pipe para stdout em processo pai (dup: %s)" #: io.c:1812 io.c:1865 #, c-format msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "falha ao mover pipe para stdin em processo pai (dup: %s)" #: io.c:1829 io.c:2003 msgid "restoring stdout in parent process failed\n" msgstr "falha ao restaurar stdout em processo pai\n" #: io.c:1834 msgid "restoring stdin in parent process failed\n" msgstr "falha ao restaurar stdin em processo pai\n" #: io.c:1868 io.c:2014 io.c:2025 #, c-format msgid "close of pipe failed (%s)" msgstr "falha ao fechar pipe (%s)" #: io.c:1913 msgid "`|&' not supported" msgstr "`|&' não suportado" #: io.c:1980 #, c-format msgid "cannot open pipe `%s' (%s)" msgstr "impossível abrir pipe `%s' (%s)" #: io.c:2021 #, c-format msgid "cannot create child process for `%s' (fork: %s)" msgstr "impossível criar processo filho para `%s' (fork: %s)" #: io.c:2364 #, c-format msgid "data file `%s' is empty" msgstr "arquivo de dados `%s' vazio" #: io.c:2407 io.c:2415 msgid "could not allocate more input memory" msgstr "" #: io.c:2540 io.c:2782 io.c:3046 #, c-format msgid "error reading input file `%s': %s" msgstr "erro ao ler arquivo de entrada `%s': %s" #: io.c:3281 msgid "multicharacter value of `RS' is a gawk extension" msgstr "valor de múltiplos caracteres para `RS' é uma extensão do gawk" #: main.c:322 msgid "`-m[fr]' option irrelevant in gawk" msgstr "opção `-m[fr] é irrelevante no gawk" #: main.c:324 msgid "-m option usage: `-m[fr] nnn'" msgstr "uso da opção -m: `-m[fr] nnn'" #: main.c:341 #, c-format msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "%s: opção `-W %s' não reconhecida, ignorada\n" #: main.c:378 msgid "empty argument to `--source' ignored" msgstr "argumento vazio para --source ignorado" #: main.c:448 msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" msgstr "variável de ambiente `POSIXLY_CORRECT' ativada: ligando `--posix'" #: main.c:453 msgid "`--posix' overrides `--traditional'" msgstr "`--posix' sobrepõe `--traditional'" #: main.c:464 msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "`--posix'/`--traditional' sobrepõe `--non-decimal-data'" #: main.c:468 #, c-format msgid "running %s setuid root may be a security problem" msgstr "rodar %s com setuid root pode ser um problema de segurança" #: main.c:509 #, c-format msgid "can't set binary mode on stdin (%s)" msgstr "impossível ativar modo binário em stdin (%s)" #: main.c:512 #, c-format msgid "can't set binary mode on stdout (%s)" msgstr "impossível ativar modo binário em stdout (%s)" #: main.c:514 #, c-format msgid "can't set binary mode on stderr (%s)" msgstr "impossível ativar modo binário em stderr (%s)" #: main.c:544 msgid "no program text at all!" msgstr "nenhum texto de programa" #: main.c:612 #, c-format msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "Uso: %s [opções estilo POSIX ou GNU] -f arqprog [--] arquivo ...\n" #: main.c:614 #, c-format msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "Uso: %s [opções estilo POSIX ou GNU] [--] %cprograma%c arquivo ...\n" #: main.c:619 msgid "POSIX options:\t\tGNU long options:\n" msgstr "Opções POSIX: \t\tOpções longas GNU:\n" #: main.c:620 msgid "\t-f progfile\t\t--file=progfile\n" msgstr "\t-f arqprog \t\t--file=arqprog\n" #: main.c:621 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F fs\t\t\t--field-separator=fs\n" #: main.c:622 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=val\t\t--assign=var=val\n" #: main.c:623 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] val\n" #: main.c:624 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" #: main.c:625 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" #: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" #: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=arq] \t--dump-variables[=arq]\n" #: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" #: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" #: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" #: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" #: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" #: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" #: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" #: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=arq] \t--profile[=arq]\n" #: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" #: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" #: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=program-text\t--source=program-text\n" #: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" #: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" #: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" #: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "" "\n" "Em caso de defeito, veja o nodo `Bugs' em `gawk.info', que é a\n" "seção `Reportando Problemas e Bugs' na versão impressa.\n" "\n" #: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" "gawk é uma linguagem de processamento e busca de padrões.\n" "Por padrão, o gawk lê a entrada padrão e escreve na saída padrão.\n" "\n" #: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" "Exemplos:\n" "\tgawk '{ soma += $1 }; END { print soma }' arquivo\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" #: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "This program is free software; you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation; either version 2 of the License, or\n" "(at your option) any later version.\n" "\n" msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" "Este programa é Software Livre; você pode redistribuí-lo e/ou modificá-lo\n" "de acordo com os termos da Licença Pública Geral GNU (GNU GPL) na " "formapublicada pela Free Software Foundation; ou a versão 2 da licença ou " "(aoseu critério) qualquer versão posterior.\n" "\n" #: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" msgstr "" "Este programa é distribuído na esperança de ser útil, mas SEM\n" "QUALQUER GARANTIA. Veja a Licença Pública Geral GNU (GNU GPL)\n" "para mais detalhes.\n" #: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" "Você deve ter recebido uma cópia da Licença Pública Geral GNU (GNU GPL)\n" "junto com este programa; caso contrário, escreva à Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" #: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft não faz FS ser tab no awk POSIX" #: main.c:944 #, c-format msgid "" "%s: `%s' argument to `-v' not in `var=value' form\n" "\n" msgstr "" "%s: argumento `%s' para `-v' não está na forma `var=valor'\n" "\n" #: main.c:964 #, c-format msgid "`%s' is not a legal variable name" msgstr "`%s' não é um nome legal de variável" #: main.c:967 #, c-format msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "`%s' não é um nome de variável, procurando arquivo `%s=%s'" #: main.c:995 msgid "floating point exception" msgstr "exceção de ponto flutuante" #: main.c:1002 msgid "fatal error: internal error" msgstr "erro fatal: erro interno" #: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "nenhum descritor pré-aberto %d" #: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "impossível pré-abrir /dev/null para descritor %d" #: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "impossível achar grupos: %s" #: msg.c:54 msgid "cmd. line:" msgstr "lin. de com.:" #: msg.c:120 msgid "warning: " msgstr "aviso: " #: msg.c:142 msgid "error: " msgstr "erro: " #: msg.c:178 msgid "fatal: " msgstr "fatal: " #: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 msgid "can't convert string to float" msgstr "impossível converter string para float" #: node.c:357 msgid "backslash at end of string" msgstr "barra invertida (\\) no fim da string" #: node.c:544 msgid "POSIX does not allow `\\x' escapes" msgstr "POSIX não permite escapes do tipo `\\x'" #: node.c:550 msgid "no hex digits in `\\x' escape sequence" msgstr "nenhum dígito hexa em seqüência de escape `\\x'" #: node.c:584 #, c-format msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "seqüência de escape `\\%c' tratada como `%c' normal" #: posix/gawkmisc.c:172 #, c-format msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "" #: profile.c:91 #, c-format msgid "could not open `%s' for writing: %s" msgstr "" #: profile.c:409 msgid "internal error: Node_var with null vname" msgstr "" #: profile.c:471 msgid "# treated internally as `delete'" msgstr "" #: profile.c:545 msgid "internal error: Node_var_array with null vname" msgstr "" #: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "" #: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" msgstr "" #: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" msgstr "" #: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" msgstr "" #: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" msgstr "" #: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "" #: re.c:193 #, c-format msgid "regex match failed, not enough memory to match string \"%.*s%s\"" msgstr "" #: regcomp.c:136 msgid "Success" msgstr "" #: regcomp.c:139 msgid "No match" msgstr "" #: regcomp.c:142 msgid "Invalid regular expression" msgstr "" #: regcomp.c:145 msgid "Invalid collation character" msgstr "" #: regcomp.c:148 msgid "Invalid character class name" msgstr "" #: regcomp.c:151 msgid "Trailing backslash" msgstr "" #: regcomp.c:154 msgid "Invalid back reference" msgstr "" #: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "" #: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "" #: regcomp.c:163 msgid "Unmatched \\{" msgstr "" #: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "" #: regcomp.c:169 msgid "Invalid range end" msgstr "" #: regcomp.c:172 msgid "Memory exhausted" msgstr "Memória esgotada" #: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Expressão regular anterior inválida" #: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Fim prematuro da expressão regular" #: regcomp.c:181 msgid "Regular expression too big" msgstr "Expressão regular grande demais" #: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr ") ou \\) desemparelhado" #: regcomp.c:621 msgid "No previous regular expression" msgstr "Nenhuma expressão regular anterior" EOF echo - 'regcomp.c' cat << 'EOF' > 'regcomp.c' /* Extended regular expression matching and search library. Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ static reg_errcode_t re_compile_internal _RE_ARGS((regex_t *preg, const char * pattern, int length, reg_syntax_t syntax)); static void re_compile_fastmap_iter _RE_ARGS((regex_t *bufp, const re_dfastate_t *init_state, char *fastmap)); static reg_errcode_t init_dfa _RE_ARGS((re_dfa_t *dfa, int pat_len)); static reg_errcode_t init_word_char _RE_ARGS((re_dfa_t *dfa)); #ifdef RE_ENABLE_I18N static void free_charset _RE_ARGS((re_charset_t *cset)); #endif /* RE_ENABLE_I18N */ static void free_workarea_compile _RE_ARGS((regex_t *preg)); static reg_errcode_t create_initial_state _RE_ARGS((re_dfa_t *dfa)); static reg_errcode_t analyze _RE_ARGS((re_dfa_t *dfa)); static reg_errcode_t analyze_tree _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); static void calc_first _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); static void calc_next _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); static void calc_epsdest _RE_ARGS((re_dfa_t *dfa, bin_tree_t *node)); static reg_errcode_t duplicate_node_closure _RE_ARGS((re_dfa_t *dfa, int top_org_node, int top_clone_node, int root_node, unsigned int constraint)); static reg_errcode_t duplicate_node _RE_ARGS((int *new_idx, re_dfa_t *dfa, int org_idx, unsigned int constraint)); static int search_duplicated_node _RE_ARGS((re_dfa_t *dfa, int org_node, unsigned int constraint)); static reg_errcode_t calc_eclosure _RE_ARGS((re_dfa_t *dfa)); static reg_errcode_t calc_eclosure_iter _RE_ARGS((re_node_set *new_set, re_dfa_t *dfa, int node, int root)); static void calc_inveclosure _RE_ARGS((re_dfa_t *dfa)); static int fetch_number _RE_ARGS((re_string_t *input, re_token_t *token, reg_syntax_t syntax)); static re_token_t fetch_token _RE_ARGS((re_string_t *input, reg_syntax_t syntax)); static int peek_token _RE_ARGS((re_token_t *token, re_string_t *input, reg_syntax_t syntax)); static int peek_token_bracket _RE_ARGS((re_token_t *token, re_string_t *input, reg_syntax_t syntax)); static bin_tree_t *parse _RE_ARGS((re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, reg_errcode_t *err)); static bin_tree_t *parse_reg_exp _RE_ARGS((re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err)); static bin_tree_t *parse_branch _RE_ARGS((re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err)); static bin_tree_t *parse_expression _RE_ARGS((re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err)); static bin_tree_t *parse_sub_exp _RE_ARGS((re_string_t *regexp, regex_t *preg, re_token_t *token, reg_syntax_t syntax, int nest, reg_errcode_t *err)); static bin_tree_t *parse_dup_op _RE_ARGS((bin_tree_t *dup_elem, re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)); static bin_tree_t *parse_bracket_exp _RE_ARGS((re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)); static reg_errcode_t parse_bracket_element _RE_ARGS((bracket_elem_t *elem, re_string_t *regexp, re_token_t *token, int token_len, re_dfa_t *dfa, reg_syntax_t syntax)); static reg_errcode_t parse_bracket_symbol _RE_ARGS((bracket_elem_t *elem, re_string_t *regexp, re_token_t *token)); #ifndef _LIBC # ifdef RE_ENABLE_I18N static reg_errcode_t build_range_exp _RE_ARGS((re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *range_alloc, bracket_elem_t *start_elem, bracket_elem_t *end_elem)); static reg_errcode_t build_collating_symbol _RE_ARGS((re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *coll_sym_alloc, const unsigned char *name)); # else /* not RE_ENABLE_I18N */ static reg_errcode_t build_range_exp _RE_ARGS((re_bitset_ptr_t sbcset, bracket_elem_t *start_elem, bracket_elem_t *end_elem)); static reg_errcode_t build_collating_symbol _RE_ARGS((re_bitset_ptr_t sbcset, const unsigned char *name)); # endif /* not RE_ENABLE_I18N */ #endif /* not _LIBC */ #ifdef RE_ENABLE_I18N static reg_errcode_t build_equiv_class _RE_ARGS((re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *equiv_class_alloc, const unsigned char *name)); static reg_errcode_t build_charclass _RE_ARGS((RE_TRANSLATE_TYPE trans, re_bitset_ptr_t sbcset, re_charset_t *mbcset, int *char_class_alloc, const unsigned char *class_name, reg_syntax_t syntax)); #else /* not RE_ENABLE_I18N */ static reg_errcode_t build_equiv_class _RE_ARGS((re_bitset_ptr_t sbcset, const unsigned char *name)); static reg_errcode_t build_charclass _RE_ARGS((RE_TRANSLATE_TYPE trans, re_bitset_ptr_t sbcset, const unsigned char *class_name, reg_syntax_t syntax)); #endif /* not RE_ENABLE_I18N */ static bin_tree_t *build_word_op _RE_ARGS((re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, int not, reg_errcode_t *err)); static void free_bin_tree _RE_ARGS((bin_tree_t *tree)); static bin_tree_t *create_tree _RE_ARGS((bin_tree_t *left, bin_tree_t *right, re_token_type_t type, int index)); static bin_tree_t *duplicate_tree _RE_ARGS((const bin_tree_t *src, re_dfa_t *dfa)); /* This table gives an error message for each of the error codes listed in regex.h. Obviously the order here has to be same as there. POSIX doesn't require that we do anything for REG_NOERROR, but why not be nice? */ const char __re_error_msgid[] attribute_hidden = { #define REG_NOERROR_IDX 0 gettext_noop ("Success") /* REG_NOERROR */ "\0" #define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") gettext_noop ("No match") /* REG_NOMATCH */ "\0" #define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") gettext_noop ("Invalid regular expression") /* REG_BADPAT */ "\0" #define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ "\0" #define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") gettext_noop ("Invalid character class name") /* REG_ECTYPE */ "\0" #define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") gettext_noop ("Trailing backslash") /* REG_EESCAPE */ "\0" #define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") gettext_noop ("Invalid back reference") /* REG_ESUBREG */ "\0" #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ "\0" #define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ "\0" #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") gettext_noop ("Unmatched \\{") /* REG_EBRACE */ "\0" #define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ "\0" #define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") gettext_noop ("Invalid range end") /* REG_ERANGE */ "\0" #define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") gettext_noop ("Memory exhausted") /* REG_ESPACE */ "\0" #define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ "\0" #define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") gettext_noop ("Premature end of regular expression") /* REG_EEND */ "\0" #define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") gettext_noop ("Regular expression too big") /* REG_ESIZE */ "\0" #define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ }; const size_t __re_error_msgid_idx[] attribute_hidden = { REG_NOERROR_IDX, REG_NOMATCH_IDX, REG_BADPAT_IDX, REG_ECOLLATE_IDX, REG_ECTYPE_IDX, REG_EESCAPE_IDX, REG_ESUBREG_IDX, REG_EBRACK_IDX, REG_EPAREN_IDX, REG_EBRACE_IDX, REG_BADBR_IDX, REG_ERANGE_IDX, REG_ESPACE_IDX, REG_BADRPT_IDX, REG_EEND_IDX, REG_ESIZE_IDX, REG_ERPAREN_IDX }; /* Entry points for GNU code. */ /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length LENGTH) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. */ const char * re_compile_pattern (pattern, length, bufp) const char *pattern; size_t length; struct re_pattern_buffer *bufp; { reg_errcode_t ret; /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub. */ bufp->no_sub = 0; /* Match anchors at newline. */ bufp->newline_anchor = 1; ret = re_compile_internal (bufp, pattern, length, re_syntax_options); if (!ret) return NULL; return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC weak_alias (__re_compile_pattern, re_compile_pattern) #endif /* Set by `re_set_syntax' to the current regexp syntax to recognize. Can also be assigned to arbitrarily: each pattern buffer stores its own syntax, so it can be changed between regex compilations. */ /* This has no initializer because initialized variables in Emacs become read-only after dumping. */ reg_syntax_t re_syntax_options; /* Specify the precise syntax of regexps for compilation. This provides for compatibility for various utilities which historically have different, incompatible syntaxes. The argument SYNTAX is a bit mask comprised of the various bits defined in regex.h. We return the old syntax. */ reg_syntax_t re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; #ifdef RE_ENABLE_I18N re_mb_cur_max = MB_CUR_MAX; #endif return ret; } #ifdef _LIBC weak_alias (__re_set_syntax, re_set_syntax) #endif int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); if (dfa->init_state != dfa->init_state_word) re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); if (dfa->init_state != dfa->init_state_nl) re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); if (dfa->init_state != dfa->init_state_begbuf) re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); bufp->fastmap_accurate = 1; return 0; } #ifdef _LIBC weak_alias (__re_compile_fastmap, re_compile_fastmap) #endif static inline void re_set_fastmap (char *fastmap, int icase, int ch) { fastmap[ch] = 1; if (icase) fastmap[tolower (ch)] = 1; } /* Helper function for re_compile_fastmap. Compile fastmap for the initial_state INIT_STATE. */ static void re_compile_fastmap_iter (bufp, init_state, fastmap) regex_t *bufp; const re_dfastate_t *init_state; char *fastmap; { re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; int node_cnt; #ifdef RE_ENABLE_I18N int icase = (re_mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); #else int icase = (bufp->syntax & RE_ICASE); #endif for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) { int node = init_state->nodes.elems[node_cnt]; re_token_type_t type = dfa->nodes[node].type; if (type == CHARACTER) re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); else if (type == SIMPLE_BRACKET) { int i, j, ch; for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) if (dfa->nodes[node].opr.sbcset[i] & (1UL << j)) re_set_fastmap (fastmap, icase, ch); } #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET) { int i; re_charset_t *cset = dfa->nodes[node].opr.mbcset; if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes || cset->nranges || cset->nchar_classes) { # ifdef _LIBC if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0) { /* In this case we want to catch the bytes which are the first byte of any collation elements. e.g. In da_DK, we want to catch 'a' since "aa" is a valid collation element, and don't catch 'b' since 'b' is the only collation element which starts from 'b'. */ int j, ch; const int32_t *table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) if (table[ch] < 0) re_set_fastmap (fastmap, icase, ch); } # else if (re_mb_cur_max > 1) for (i = 0; i < SBC_MAX; ++i) if (__btowc (i) == WEOF) re_set_fastmap (fastmap, icase, i); # endif /* not _LIBC */ } for (i = 0; i < cset->nmbchars; ++i) { char buf[256]; mbstate_t state; memset (&state, '\0', sizeof (state)); __wcrtomb (buf, cset->mbchars[i], &state); re_set_fastmap (fastmap, icase, *(unsigned char *) buf); } } #endif /* RE_ENABLE_I18N */ else if (type == END_OF_RE || type == OP_PERIOD) { memset (fastmap, '\1', sizeof (char) * SBC_MAX); if (type == END_OF_RE) bufp->can_be_null = 1; return; } } } /* Entry point for POSIX code. */ /* regcomp takes a regular expression as a string and compiles it. PREG is a regex_t *. We do not expect any fields to be initialized, since POSIX says we shouldn't. Thus, we set `buffer' to the compiled pattern; `used' to the length of the compiled pattern; `syntax' to RE_SYNTAX_POSIX_EXTENDED if the REG_EXTENDED bit in CFLAGS is set; otherwise, to RE_SYNTAX_POSIX_BASIC; `newline_anchor' to REG_NEWLINE being set in CFLAGS; `fastmap' to an allocated space for the fastmap; `fastmap_accurate' to zero; `re_nsub' to the number of subexpressions in PATTERN. PATTERN is the address of the pattern string. CFLAGS is a series of bits which affect compilation. If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we use POSIX basic syntax. If REG_NEWLINE is set, then . and [^...] don't match newline. Also, regexec will try a match beginning after every newline. If REG_ICASE is set, then we considers upper- and lowercase versions of letters to be equivalent when matching. If REG_NOSUB is set, then when PREG is passed to regexec, that routine will report only success or failure, and nothing about the registers. It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for the return codes and their meanings.) */ int regcomp (preg, pattern, cflags) regex_t *__restrict preg; const char *__restrict pattern; int cflags; { reg_errcode_t ret; reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC); preg->buffer = NULL; preg->allocated = 0; preg->used = 0; /* Try to allocate space for the fastmap. */ preg->fastmap = re_malloc (char, SBC_MAX); if (BE (preg->fastmap == NULL, 0)) return REG_ESPACE; syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; /* If REG_NEWLINE is set, newlines are treated differently. */ if (cflags & REG_NEWLINE) { /* REG_NEWLINE implies neither . nor [^...] match newline. */ syntax &= ~RE_DOT_NEWLINE; syntax |= RE_HAT_LISTS_NOT_NEWLINE; /* It also changes the matching behavior. */ preg->newline_anchor = 1; } else preg->newline_anchor = 0; preg->no_sub = !!(cflags & REG_NOSUB); preg->translate = NULL; ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; /* We have already checked preg->fastmap != NULL. */ if (BE (ret == REG_NOERROR, 1)) /* Compute the fastmap now, since regexec cannot modify the pattern buffer. This function nevers fails in this implementation. */ (void) re_compile_fastmap (preg); else { /* Some error occurred while compiling the expression. */ re_free (preg->fastmap); preg->fastmap = NULL; } return (int) ret; } #ifdef _LIBC weak_alias (__regcomp, regcomp) #endif /* Returns a message corresponding to an error code, ERRCODE, returned from either regcomp or regexec. We don't use PREG here. */ size_t regerror (errcode, preg, errbuf, errbuf_size) int errcode; const regex_t *preg; char *errbuf; size_t errbuf_size; { const char *msg; size_t msg_size; if (BE (errcode < 0 || errcode >= (int) (sizeof (__re_error_msgid_idx) / sizeof (__re_error_msgid_idx[0])), 0)) /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ abort (); msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); msg_size = strlen (msg) + 1; /* Includes the null. */ if (BE (errbuf_size != 0, 1)) { if (BE (msg_size > errbuf_size, 0)) { memcpy (errbuf, msg, errbuf_size - 1); errbuf[errbuf_size - 1] = 0; } else memcpy (errbuf, msg, msg_size); } return msg_size; } #ifdef _LIBC weak_alias (__regerror, regerror) #endif static void free_dfa_content (re_dfa_t *dfa) { int i, j; re_free (dfa->subexps); for (i = 0; i < dfa->nodes_len; ++i) { re_token_t *node = dfa->nodes + i; #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); } re_free (dfa->nexts); for (i = 0; i < dfa->nodes_len; ++i) { if (dfa->eclosures != NULL) re_node_set_free (dfa->eclosures + i); if (dfa->inveclosures != NULL) re_node_set_free (dfa->inveclosures + i); if (dfa->edests != NULL) re_node_set_free (dfa->edests + i); } re_free (dfa->edests); re_free (dfa->eclosures); re_free (dfa->inveclosures); re_free (dfa->nodes); for (i = 0; i <= dfa->state_hash_mask; ++i) { struct re_state_table_entry *entry = dfa->state_table + i; for (j = 0; j < entry->num; ++j) { re_dfastate_t *state = entry->array[j]; free_state (state); } re_free (entry->array); } re_free (dfa->state_table); if (dfa->word_char != NULL) re_free (dfa->word_char); #ifdef DEBUG re_free (dfa->re_str); #endif re_free (dfa); } /* Free dynamically allocated space used by PREG. */ void regfree (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); re_free (preg->fastmap); } #ifdef _LIBC weak_alias (__regfree, regfree) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC /* BSD has one and only one pattern buffer. */ static struct re_pattern_buffer re_comp_buf; char * # ifdef _LIBC /* Make these definitions weak in libc, so POSIX programs can redefine these names if they don't use our functions, and still use regcomp/regexec above without link errors. */ weak_function # endif re_comp (s) const char *s; { reg_errcode_t ret; char *fastmap; if (!s) { if (!re_comp_buf.buffer) return gettext ("No previous regular expression"); return 0; } if (re_comp_buf.buffer) { fastmap = re_comp_buf.fastmap; re_comp_buf.fastmap = NULL; __regfree (&re_comp_buf); memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); re_comp_buf.fastmap = fastmap; } if (re_comp_buf.fastmap == NULL) { re_comp_buf.fastmap = (char *) malloc (SBC_MAX); if (re_comp_buf.fastmap == NULL) return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) REG_ESPACE]); } /* Since `re_exec' always passes NULL for the `regs' argument, we don't need to initialize the pattern buffer fields which affect it. */ /* Match anchors at newlines. */ re_comp_buf.newline_anchor = 1; ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); if (!ret) return NULL; /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } #ifdef _LIBC libc_freeres_fn (free_mem) { __regfree (&re_comp_buf); } #endif #endif /* _REGEX_RE_COMP */ /* Internal entry point. Compile the regular expression PATTERN, whose length is LENGTH. SYNTAX indicate regular expression's syntax. */ static reg_errcode_t re_compile_internal (preg, pattern, length, syntax) regex_t *preg; const char * pattern; int length; reg_syntax_t syntax; { reg_errcode_t err = REG_NOERROR; re_dfa_t *dfa; re_string_t regexp; /* Initialize the pattern buffer. */ preg->fastmap_accurate = 0; preg->syntax = syntax; preg->not_bol = preg->not_eol = 0; preg->used = 0; preg->re_nsub = 0; preg->can_be_null = 0; preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ dfa = (re_dfa_t *) preg->buffer; if (preg->allocated < sizeof (re_dfa_t)) { /* If zero allocated, but buffer is non-null, try to realloc enough space. This loses if buffer's address is bogus, but that is the user's responsibility. If ->buffer is NULL this is a simple allocation. */ dfa = re_realloc (preg->buffer, re_dfa_t, 1); if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); } preg->buffer = (unsigned char *) dfa; preg->used = sizeof (re_dfa_t); err = init_dfa (dfa, length); if (BE (err != REG_NOERROR, 0)) { re_free (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } #ifdef DEBUG dfa->re_str = re_malloc (char, length + 1); strncpy (dfa->re_str, pattern, length + 1); #endif err = re_string_construct (®exp, pattern, length, preg->translate, syntax & RE_ICASE); if (BE (err != REG_NOERROR, 0)) { re_free (dfa); preg->buffer = NULL; preg->allocated = 0; return err; } /* Parse the regular expression, and build a structure tree. */ preg->re_nsub = 0; dfa->str_tree = parse (®exp, preg, syntax, &err); if (BE (dfa->str_tree == NULL, 0)) goto re_compile_internal_free_return; /* Analyze the tree and collect information which is necessary to create the dfa. */ err = analyze (dfa); if (BE (err != REG_NOERROR, 0)) goto re_compile_internal_free_return; /* Then create the initial state of the dfa. */ err = create_initial_state (dfa); /* Release work areas. */ free_workarea_compile (preg); re_string_destruct (®exp); if (BE (err != REG_NOERROR, 0)) { re_compile_internal_free_return: free_dfa_content (dfa); preg->buffer = NULL; preg->allocated = 0; } return err; } /* Initialize DFA. We use the length of the regular expression PAT_LEN as the initial length of some arrays. */ static reg_errcode_t init_dfa (dfa, pat_len) re_dfa_t *dfa; int pat_len; { int table_size; memset (dfa, '\0', sizeof (re_dfa_t)); dfa->nodes_alloc = pat_len + 1; dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); dfa->states_alloc = pat_len + 1; /* table_size = 2 ^ ceil(log pat_len) */ for (table_size = 1; table_size > 0; table_size <<= 1) if (table_size > pat_len) break; dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); dfa->state_hash_mask = table_size - 1; dfa->subexps_alloc = 1; dfa->subexps = re_malloc (re_subexp_t, dfa->subexps_alloc); dfa->word_char = NULL; if (BE (dfa->nodes == NULL || dfa->state_table == NULL || dfa->subexps == NULL, 0)) { /* We don't bother to free anything which was allocated. Very soon the process will go down anyway. */ dfa->subexps = NULL; dfa->state_table = NULL; dfa->nodes = NULL; return REG_ESPACE; } return REG_NOERROR; } /* Initialize WORD_CHAR table, which indicate which character is "word". In this case "word" means that it is the word construction character used by some operators like "\<", "\>", etc. */ static reg_errcode_t init_word_char (dfa) re_dfa_t *dfa; { int i, j, ch; dfa->word_char = (re_bitset_ptr_t) calloc (sizeof (bitset), 1); if (BE (dfa->word_char == NULL, 0)) return REG_ESPACE; for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) if (isalnum (ch) || ch == '_') dfa->word_char[i] |= 1UL << j; return REG_NOERROR; } /* Free the work area which are only used while compiling. */ static void free_workarea_compile (preg) regex_t *preg; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; free_bin_tree (dfa->str_tree); dfa->str_tree = NULL; re_free (dfa->org_indices); dfa->org_indices = NULL; } /* Create initial states for all contexts. */ static reg_errcode_t create_initial_state (dfa) re_dfa_t *dfa; { int first, i; reg_errcode_t err; re_node_set init_nodes; /* Initial states have the epsilon closure of the node which is the first node of the regular expression. */ first = dfa->str_tree->first; dfa->init_node = first; err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); if (BE (err != REG_NOERROR, 0)) return err; /* The back-references which are in initial states can epsilon transit, since in this case all of the subexpressions can be null. Then we add epsilon closures of the nodes which are the next nodes of the back-references. */ if (dfa->nbackref > 0) for (i = 0; i < init_nodes.nelem; ++i) { int node_idx = init_nodes.elems[i]; re_token_type_t type = dfa->nodes[node_idx].type; int clexp_idx; if (type != OP_BACK_REF) continue; for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) { re_token_t *clexp_node; clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; if (clexp_node->type == OP_CLOSE_SUBEXP && clexp_node->opr.idx + 1 == dfa->nodes[node_idx].opr.idx) break; } if (clexp_idx == init_nodes.nelem) continue; if (type == OP_BACK_REF) { int dest_idx = dfa->edests[node_idx].elems[0]; if (!re_node_set_contains (&init_nodes, dest_idx)) { re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); i = 0; } } } /* It must be the first time to invoke acquire_state. */ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); /* We don't check ERR here, since the initial state must not be NULL. */ if (BE (dfa->init_state == NULL, 0)) return err; if (dfa->init_state->has_constraint) { dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_WORD); dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE); dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, &init_nodes, CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return err; } else dfa->init_state_word = dfa->init_state_nl = dfa->init_state_begbuf = dfa->init_state; re_node_set_free (&init_nodes); return REG_NOERROR; } /* Analyze the structure tree, and calculate "first", "next", "edest", "eclosure", and "inveclosure". */ static reg_errcode_t analyze (dfa) re_dfa_t *dfa; { int i; reg_errcode_t ret; /* Allocate arrays. */ dfa->nexts = re_malloc (int, dfa->nodes_alloc); dfa->org_indices = re_malloc (int, dfa->nodes_alloc); dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_alloc); if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL || dfa->eclosures == NULL || dfa->inveclosures == NULL, 0)) return REG_ESPACE; /* Initialize them. */ for (i = 0; i < dfa->nodes_len; ++i) { dfa->nexts[i] = -1; re_node_set_init_empty (dfa->edests + i); re_node_set_init_empty (dfa->eclosures + i); re_node_set_init_empty (dfa->inveclosures + i); } ret = analyze_tree (dfa, dfa->str_tree); if (BE (ret == REG_NOERROR, 1)) { ret = calc_eclosure (dfa); if (ret == REG_NOERROR) calc_inveclosure (dfa); } return ret; } /* Helper functions for analyze. This function calculate "first", "next", and "edest" for the subtree whose root is NODE. */ static reg_errcode_t analyze_tree (dfa, node) re_dfa_t *dfa; bin_tree_t *node; { reg_errcode_t ret; if (node->first == -1) calc_first (dfa, node); if (node->next == -1) calc_next (dfa, node); if (node->eclosure.nelem == 0) calc_epsdest (dfa, node); /* Calculate "first" etc. for the left child. */ if (node->left != NULL) { ret = analyze_tree (dfa, node->left); if (BE (ret != REG_NOERROR, 0)) return ret; } /* Calculate "first" etc. for the right child. */ if (node->right != NULL) { ret = analyze_tree (dfa, node->right); if (BE (ret != REG_NOERROR, 0)) return ret; } return REG_NOERROR; } /* Calculate "first" for the node NODE. */ static void calc_first (dfa, node) re_dfa_t *dfa; bin_tree_t *node; { int idx, type; idx = node->node_idx; type = (node->type == 0) ? dfa->nodes[idx].type : node->type; switch (type) { #ifdef DEBUG case OP_OPEN_BRACKET: case OP_CLOSE_BRACKET: case OP_OPEN_DUP_NUM: case OP_CLOSE_DUP_NUM: case OP_NON_MATCH_LIST: case OP_OPEN_COLL_ELEM: case OP_CLOSE_COLL_ELEM: case OP_OPEN_EQUIV_CLASS: case OP_CLOSE_EQUIV_CLASS: case OP_OPEN_CHAR_CLASS: case OP_CLOSE_CHAR_CLASS: /* These must not be appeared here. */ assert (0); #endif case END_OF_RE: case CHARACTER: case OP_PERIOD: case OP_DUP_ASTERISK: case OP_DUP_QUESTION: #ifdef RE_ENABLE_I18N case COMPLEX_BRACKET: #endif /* RE_ENABLE_I18N */ case SIMPLE_BRACKET: case OP_BACK_REF: case ANCHOR: case OP_OPEN_SUBEXP: case OP_CLOSE_SUBEXP: node->first = idx; break; case OP_DUP_PLUS: #ifdef DEBUG assert (node->left != NULL); #endif if (node->left->first == -1) calc_first (dfa, node->left); node->first = node->left->first; break; case OP_ALT: node->first = idx; break; /* else fall through */ default: #ifdef DEBUG assert (node->left != NULL); #endif if (node->left->first == -1) calc_first (dfa, node->left); node->first = node->left->first; break; } } /* Calculate "next" for the node NODE. */ static void calc_next (dfa, node) re_dfa_t *dfa; bin_tree_t *node; { int idx, type; bin_tree_t *parent = node->parent; if (parent == NULL) { node->next = -1; idx = node->node_idx; if (node->type == 0) dfa->nexts[idx] = node->next; return; } idx = parent->node_idx; type = (parent->type == 0) ? dfa->nodes[idx].type : parent->type; switch (type) { case OP_DUP_ASTERISK: case OP_DUP_PLUS: node->next = idx; break; case CONCAT: if (parent->left == node) { if (parent->right->first == -1) calc_first (dfa, parent->right); node->next = parent->right->first; break; } /* else fall through */ default: if (parent->next == -1) calc_next (dfa, parent); node->next = parent->next; break; } idx = node->node_idx; if (node->type == 0) dfa->nexts[idx] = node->next; } /* Calculate "edest" for the node NODE. */ static void calc_epsdest (dfa, node) re_dfa_t *dfa; bin_tree_t *node; { int idx; idx = node->node_idx; if (node->type == 0) { if (dfa->nodes[idx].type == OP_DUP_ASTERISK || dfa->nodes[idx].type == OP_DUP_PLUS || dfa->nodes[idx].type == OP_DUP_QUESTION) { if (node->left->first == -1) calc_first (dfa, node->left); if (node->next == -1) calc_next (dfa, node); re_node_set_init_2 (dfa->edests + idx, node->left->first, node->next); } else if (dfa->nodes[idx].type == OP_ALT) { int left, right; if (node->left != NULL) { if (node->left->first == -1) calc_first (dfa, node->left); left = node->left->first; } else { if (node->next == -1) calc_next (dfa, node); left = node->next; } if (node->right != NULL) { if (node->right->first == -1) calc_first (dfa, node->right); right = node->right->first; } else { if (node->next == -1) calc_next (dfa, node); right = node->next; } re_node_set_init_2 (dfa->edests + idx, left, right); } else if (dfa->nodes[idx].type == ANCHOR || dfa->nodes[idx].type == OP_OPEN_SUBEXP || dfa->nodes[idx].type == OP_CLOSE_SUBEXP || dfa->nodes[idx].type == OP_BACK_REF) re_node_set_init_1 (dfa->edests + idx, node->next); } } /* Duplicate the epsilon closure of the node ROOT_NODE. Note that duplicated nodes have constraint INIT_CONSTRAINT in addition to their own constraint. */ static reg_errcode_t duplicate_node_closure (dfa, top_org_node, top_clone_node, root_node, init_constraint) re_dfa_t *dfa; int top_org_node, top_clone_node, root_node; unsigned int init_constraint; { reg_errcode_t err; int org_node, clone_node, ret; unsigned int constraint = init_constraint; for (org_node = top_org_node, clone_node = top_clone_node;;) { int org_dest, clone_dest; if (dfa->nodes[org_node].type == OP_BACK_REF) { /* If the back reference epsilon-transit, its destination must also have the constraint. Then duplicate the epsilon closure of the destination of the back reference, and store it in edests of the back reference. */ org_dest = dfa->nexts[org_node]; re_node_set_empty (dfa->edests + clone_node); err = duplicate_node (&clone_dest, dfa, org_dest, constraint); if (BE (err != REG_NOERROR, 0)) return err; dfa->nexts[clone_node] = dfa->nexts[org_node]; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else if (dfa->edests[org_node].nelem == 0) { /* In case of the node can't epsilon-transit, don't duplicate the destination and store the original destination as the destination of the node. */ dfa->nexts[clone_node] = dfa->nexts[org_node]; break; } else if (dfa->edests[org_node].nelem == 1) { /* In case of the node can epsilon-transit, and it has only one destination. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); if (dfa->nodes[org_node].type == ANCHOR) { /* In case of the node has another constraint, append it. */ if (org_node == root_node && clone_node != org_node) { /* ...but if the node is root_node itself, it means the epsilon closure have a loop, then tie it to the destination of the root_node. */ ret = re_node_set_insert (dfa->edests + clone_node, org_dest); if (BE (ret < 0, 0)) return REG_ESPACE; break; } constraint |= dfa->nodes[org_node].opr.ctx_type; } err = duplicate_node (&clone_dest, dfa, org_dest, constraint); if (BE (err != REG_NOERROR, 0)) return err; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } else /* dfa->edests[org_node].nelem == 2 */ { /* In case of the node can epsilon-transit, and it has two destinations. E.g. '|', '*', '+', '?'. */ org_dest = dfa->edests[org_node].elems[0]; re_node_set_empty (dfa->edests + clone_node); /* Search for a duplicated node which satisfies the constraint. */ clone_dest = search_duplicated_node (dfa, org_dest, constraint); if (clone_dest == -1) { /* There are no such a duplicated node, create a new one. */ err = duplicate_node (&clone_dest, dfa, org_dest, constraint); if (BE (err != REG_NOERROR, 0)) return err; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; err = duplicate_node_closure (dfa, org_dest, clone_dest, root_node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } else { /* There are a duplicated node which satisfy the constraint, use it to avoid infinite loop. */ ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_dest = dfa->edests[org_node].elems[1]; err = duplicate_node (&clone_dest, dfa, org_dest, constraint); if (BE (err != REG_NOERROR, 0)) return err; ret = re_node_set_insert (dfa->edests + clone_node, clone_dest); if (BE (ret < 0, 0)) return REG_ESPACE; } org_node = org_dest; clone_node = clone_dest; } return REG_NOERROR; } /* Search for a node which is duplicated from the node ORG_NODE, and satisfies the constraint CONSTRAINT. */ static int search_duplicated_node (dfa, org_node, constraint) re_dfa_t *dfa; int org_node; unsigned int constraint; { int idx; for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) { if (org_node == dfa->org_indices[idx] && constraint == dfa->nodes[idx].constraint) return idx; /* Found. */ } return -1; /* Not found. */ } /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. The new index will be stored in NEW_IDX and return REG_NOERROR if succeeded, otherwise return the error code. */ static reg_errcode_t duplicate_node (new_idx, dfa, org_idx, constraint) re_dfa_t *dfa; int *new_idx, org_idx; unsigned int constraint; { re_token_t dup; int dup_idx; dup = dfa->nodes[org_idx]; dup_idx = re_dfa_add_node (dfa, dup, 1); if (BE (dup_idx == -1, 0)) return REG_ESPACE; dfa->nodes[dup_idx].constraint = constraint; if (dfa->nodes[org_idx].type == ANCHOR) dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type; dfa->nodes[dup_idx].duplicated = 1; re_node_set_init_empty (dfa->edests + dup_idx); re_node_set_init_empty (dfa->eclosures + dup_idx); re_node_set_init_empty (dfa->inveclosures + dup_idx); /* Store the index of the original node. */ dfa->org_indices[dup_idx] = org_idx; *new_idx = dup_idx; return REG_NOERROR; } static void calc_inveclosure (dfa) re_dfa_t *dfa; { int src, idx, dest; for (src = 0; src < dfa->nodes_len; ++src) { for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) { dest = dfa->eclosures[src].elems[idx]; re_node_set_insert (dfa->inveclosures + dest, src); } } } /* Calculate "eclosure" for all the node in DFA. */ static reg_errcode_t calc_eclosure (dfa) re_dfa_t *dfa; { int node_idx, incomplete; #ifdef DEBUG assert (dfa->nodes_len > 0); #endif incomplete = 0; /* For each nodes, calculate epsilon closure. */ for (node_idx = 0; ; ++node_idx) { reg_errcode_t err; re_node_set eclosure_elem; if (node_idx == dfa->nodes_len) { if (!incomplete) break; incomplete = 0; node_idx = 0; } #ifdef DEBUG assert (dfa->eclosures[node_idx].nelem != -1); #endif /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; /* Calculate epsilon closure of `node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1); if (BE (err != REG_NOERROR, 0)) return err; if (dfa->eclosures[node_idx].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } return REG_NOERROR; } /* Calculate epsilon closure of NODE. */ static reg_errcode_t calc_eclosure_iter (new_set, dfa, node, root) re_node_set *new_set; re_dfa_t *dfa; int node, root; { reg_errcode_t err; unsigned int constraint; int i, incomplete; re_node_set eclosure; incomplete = 0; err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (BE (err != REG_NOERROR, 0)) return err; /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem = -1; constraint = ((dfa->nodes[node].type == ANCHOR) ? dfa->nodes[node].opr.ctx_type : 0); /* If the current node has constraints, duplicate all nodes. Since they must inherit the constraints. */ if (constraint && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) { int org_node, cur_node; org_node = cur_node = node; err = duplicate_node_closure (dfa, node, node, node, constraint); if (BE (err != REG_NOERROR, 0)) return err; } /* Expand each epsilon destination nodes. */ if (IS_EPSILON_NODE(dfa->nodes[node].type)) for (i = 0; i < dfa->edests[node].nelem; ++i) { re_node_set eclosure_elem; int edest = dfa->edests[node].elems[i]; /* If calculating the epsilon closure of `edest' is in progress, return intermediate result. */ if (dfa->eclosures[edest].nelem == -1) { incomplete = 1; continue; } /* If we haven't calculated the epsilon closure of `edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0); if (BE (err != REG_NOERROR, 0)) return err; } else eclosure_elem = dfa->eclosures[edest]; /* Merge the epsilon closure of `edest'. */ re_node_set_merge (&eclosure, &eclosure_elem); /* If the epsilon closure of `edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { incomplete = 1; re_node_set_free (&eclosure_elem); } } /* Epsilon closures include itself. */ re_node_set_insert (&eclosure, node); if (incomplete && !root) dfa->eclosures[node].nelem = 0; else dfa->eclosures[node] = eclosure; *new_set = eclosure; return REG_NOERROR; } /* Functions for token which are used in the parser. */ /* Fetch a token from INPUT. We must not use this function inside bracket expressions. */ static re_token_t fetch_token (input, syntax) re_string_t *input; reg_syntax_t syntax; { re_token_t token; int consumed_byte; consumed_byte = peek_token (&token, input, syntax); re_string_skip_bytes (input, consumed_byte); return token; } /* Peek a token from INPUT, and return the length of the token. We must not use this function inside bracket expressions. */ static int peek_token (token, input, syntax) re_token_t *token; re_string_t *input; reg_syntax_t syntax; { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N token->mb_partial = 0; if (re_mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; token->mb_partial = 1; return 1; } #endif if (c == '\\') { unsigned char c2; if (re_string_cur_idx (input) + 1 >= re_string_length (input)) { token->type = BACK_SLASH; return 1; } c2 = re_string_peek_byte_case (input, 1); token->opr.c = c2; token->type = CHARACTER; switch (c2) { case '|': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (!(syntax & RE_NO_BK_REFS)) { token->type = OP_BACK_REF; token->opr.idx = c2 - '0'; } break; case '<': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = WORD_FIRST; } break; case '>': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = WORD_LAST; } break; case 'b': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = WORD_DELIM; } break; case 'B': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = INSIDE_WORD; } break; case 'w': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_WORD; break; case 'W': if (!(syntax & RE_NO_GNU_OPS)) token->type = OP_NOTWORD; break; case '`': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = BUF_FIRST; } break; case '\'': if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; token->opr.idx = BUF_LAST; } break; case '(': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_OPEN_SUBEXP; break; case ')': if (!(syntax & RE_NO_BK_PARENS)) token->type = OP_CLOSE_SUBEXP; break; case '+': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) token->type = OP_CLOSE_DUP_NUM; break; default: break; } return 2; } token->type = CHARACTER; switch (c) { case '\n': if (syntax & RE_NEWLINE_ALT) token->type = OP_ALT; break; case '|': if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) token->type = OP_ALT; break; case '*': token->type = OP_DUP_ASTERISK; break; case '+': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_PLUS; break; case '?': if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) token->type = OP_DUP_QUESTION; break; case '{': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_OPEN_DUP_NUM; break; case '}': if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) token->type = OP_CLOSE_DUP_NUM; break; case '(': if (syntax & RE_NO_BK_PARENS) token->type = OP_OPEN_SUBEXP; break; case ')': if (syntax & RE_NO_BK_PARENS) token->type = OP_CLOSE_SUBEXP; break; case '[': token->type = OP_OPEN_BRACKET; break; case '.': token->type = OP_PERIOD; break; case '^': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) != 0) { char prev = re_string_peek_byte (input, -1); if (prev != '|' && prev != '(' && (!(syntax & RE_NEWLINE_ALT) || prev != '\n')) break; } token->type = ANCHOR; token->opr.idx = LINE_FIRST; break; case '$': if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && re_string_cur_idx (input) + 1 != re_string_length (input)) { re_token_t next; re_string_skip_bytes (input, 1); peek_token (&next, input, syntax); re_string_skip_bytes (input, -1); if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) break; } token->type = ANCHOR; token->opr.idx = LINE_LAST; break; default: break; } return 1; } /* Peek a token from INPUT, and return the length of the token. We must not use this function out of bracket expressions. */ static int peek_token_bracket (token, input, syntax) re_token_t *token; re_string_t *input; reg_syntax_t syntax; { unsigned char c; if (re_string_eoi (input)) { token->type = END_OF_RE; return 0; } c = re_string_peek_byte (input, 0); token->opr.c = c; #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1 && !re_string_first_byte (input, re_string_cur_idx (input))) { token->type = CHARACTER; return 1; } #endif /* RE_ENABLE_I18N */ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)) { /* In this case, '\' escape a character. */ unsigned char c2; re_string_skip_bytes (input, 1); c2 = re_string_peek_byte (input, 0); token->opr.c = c2; token->type = CHARACTER; return 1; } if (c == '[') /* '[' is a special char in a bracket exps. */ { unsigned char c2; int token_len; c2 = re_string_peek_byte (input, 1); token->opr.c = c2; token_len = 2; switch (c2) { case '.': token->type = OP_OPEN_COLL_ELEM; break; case '=': token->type = OP_OPEN_EQUIV_CLASS; break; case ':': if (syntax & RE_CHAR_CLASSES) { token->type = OP_OPEN_CHAR_CLASS; break; } /* else fall through. */ default: token->type = CHARACTER; token->opr.c = c; token_len = 1; break; } return token_len; } switch (c) { case '-': token->type = OP_CHARSET_RANGE; break; case ']': token->type = OP_CLOSE_BRACKET; break; case '^': token->type = OP_NON_MATCH_LIST; break; default: token->type = CHARACTER; } return 1; } /* Functions for parser. */ /* Entry point of the parser. Parse the regular expression REGEXP and return the structure tree. If an error is occured, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ / \ EOR CAT means concatenation. EOR means end of regular expression. */ static bin_tree_t * parse (regexp, preg, syntax, err) re_string_t *regexp; regex_t *preg; reg_syntax_t syntax; reg_errcode_t *err; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; int new_idx; current_token = fetch_token (regexp, syntax); tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; new_idx = re_dfa_add_node (dfa, current_token, 0); eor = create_tree (NULL, NULL, 0, new_idx); if (tree != NULL) root = create_tree (tree, eor, CONCAT, 0); else root = eor; if (BE (new_idx == -1 || eor == NULL || root == NULL, 0)) { *err = REG_ESPACE; return NULL; } return root; } /* This function build the following tree, from regular expression |: ALT / \ / \ ALT means alternative, which represents the operator `|'. */ static bin_tree_t * parse_reg_exp (regexp, preg, token, syntax, nest, err) re_string_t *regexp; regex_t *preg; re_token_t *token; reg_syntax_t syntax; int nest; reg_errcode_t *err; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *branch = NULL; int new_idx; tree = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type == OP_ALT) { re_token_t alt_token; alt_token = *token; new_idx = re_dfa_add_node (dfa, alt_token, 0); *token = fetch_token (regexp, syntax); if (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { branch = parse_branch (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && branch == NULL, 0)) { free_bin_tree (tree); return NULL; } } else branch = NULL; tree = create_tree (tree, branch, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } dfa->has_plural_match = 1; } return tree; } /* This function build the following tree, from regular expression : CAT / \ / \ CAT means concatenation. */ static bin_tree_t * parse_branch (regexp, preg, token, syntax, nest, err) re_string_t *regexp; regex_t *preg; re_token_t *token; reg_syntax_t syntax; int nest; reg_errcode_t *err; { bin_tree_t *tree, *exp; tree = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; while (token->type != OP_ALT && token->type != END_OF_RE && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) { exp = parse_expression (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && exp == NULL, 0)) { free_bin_tree (tree); return NULL; } if (tree != NULL && exp != NULL) { tree = create_tree (tree, exp, CONCAT, 0); if (tree == NULL) { *err = REG_ESPACE; return NULL; } } else if (tree == NULL) tree = exp; /* Otherwise exp == NULL, we don't need to create new tree. */ } return tree; } /* This function build the following tree, from regular expression a*: * | a */ static bin_tree_t * parse_expression (regexp, preg, token, syntax, nest, err) re_string_t *regexp; regex_t *preg; re_token_t *token; reg_syntax_t syntax; int nest; reg_errcode_t *err; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree; int new_idx; switch (token->type) { case CHARACTER: new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { while (!re_string_eoi (regexp) && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) { bin_tree_t *mbc_remain; *token = fetch_token (regexp, syntax); new_idx = re_dfa_add_node (dfa, *token, 0); mbc_remain = create_tree (NULL, NULL, 0, new_idx); tree = create_tree (tree, mbc_remain, CONCAT, 0); if (BE (new_idx == -1 || mbc_remain == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } #endif break; case OP_OPEN_SUBEXP: tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_OPEN_BRACKET: tree = parse_bracket_exp (regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_BACK_REF: if (BE (preg->re_nsub < token->opr.idx || dfa->subexps[token->opr.idx - 1].end == -1, 0)) { *err = REG_ESUBREG; return NULL; } dfa->used_bkref_map |= 1UL << (token->opr.idx - 1); new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } ++dfa->nbackref; dfa->has_mb_node = 1; break; case OP_DUP_ASTERISK: case OP_DUP_PLUS: case OP_DUP_QUESTION: case OP_OPEN_DUP_NUM: if (syntax & RE_CONTEXT_INVALID_OPS) { *err = REG_BADRPT; return NULL; } else if (syntax & RE_CONTEXT_INDEP_OPS) { *token = fetch_token (regexp, syntax); return parse_expression (regexp, preg, token, syntax, nest, err); } /* else fall through */ case OP_CLOSE_SUBEXP: if ((token->type == OP_CLOSE_SUBEXP) && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) { *err = REG_ERPAREN; return NULL; } /* else fall through */ case OP_CLOSE_DUP_NUM: /* We treat it as a normal character. */ /* Then we can these characters as normal characters. */ token->type = CHARACTER; new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } break; case ANCHOR: if (dfa->word_char == NULL) { *err = init_word_char (dfa); if (BE (*err != REG_NOERROR, 0)) return NULL; } if (token->opr.ctx_type == WORD_DELIM) { bin_tree_t *tree_first, *tree_last; int idx_first, idx_last; token->opr.ctx_type = WORD_FIRST; idx_first = re_dfa_add_node (dfa, *token, 0); tree_first = create_tree (NULL, NULL, 0, idx_first); token->opr.ctx_type = WORD_LAST; idx_last = re_dfa_add_node (dfa, *token, 0); tree_last = create_tree (NULL, NULL, 0, idx_last); token->type = OP_ALT; new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (tree_first, tree_last, 0, new_idx); if (BE (idx_first == -1 || idx_last == -1 || new_idx == -1 || tree_first == NULL || tree_last == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } else { new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } /* We must return here, since ANCHORs can't be followed by repetition operators. eg. RE"^*" is invalid or "", it must not be "". */ *token = fetch_token (regexp, syntax); return tree; case OP_PERIOD: new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) dfa->has_mb_node = 1; #endif break; case OP_WORD: tree = build_word_op (dfa, regexp->trans, 0, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_NOTWORD: tree = build_word_op (dfa, regexp->trans, 1, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_ALT: case END_OF_RE: return NULL; case BACK_SLASH: *err = REG_EESCAPE; return NULL; default: /* Must not happen? */ #ifdef DEBUG assert (0); #endif return NULL; } *token = fetch_token (regexp, syntax); while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) { tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; dfa->has_plural_match = 1; } return tree; } /* This function build the following tree, from regular expression (): SUBEXP | */ static bin_tree_t * parse_sub_exp (regexp, preg, token, syntax, nest, err) re_string_t *regexp; regex_t *preg; re_token_t *token; reg_syntax_t syntax; int nest; reg_errcode_t *err; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; bin_tree_t *tree, *left_par, *right_par; size_t cur_nsub; int new_idx; cur_nsub = preg->re_nsub++; if (dfa->subexps_alloc < preg->re_nsub) { re_subexp_t *new_array; dfa->subexps_alloc *= 2; new_array = re_realloc (dfa->subexps, re_subexp_t, dfa->subexps_alloc); if (BE (new_array == NULL, 0)) { dfa->subexps_alloc /= 2; *err = REG_ESPACE; return NULL; } dfa->subexps = new_array; } dfa->subexps[cur_nsub].start = dfa->nodes_len; dfa->subexps[cur_nsub].end = -1; new_idx = re_dfa_add_node (dfa, *token, 0); left_par = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || left_par == NULL, 0)) { *err = REG_ESPACE; return NULL; } dfa->nodes[new_idx].opr.idx = cur_nsub; *token = fetch_token (regexp, syntax); /* The subexpression may be a null string. */ if (token->type == OP_CLOSE_SUBEXP) tree = NULL; else { tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; } if (BE (token->type != OP_CLOSE_SUBEXP, 0)) { free_bin_tree (tree); *err = REG_BADPAT; return NULL; } new_idx = re_dfa_add_node (dfa, *token, 0); dfa->subexps[cur_nsub].end = dfa->nodes_len; right_par = create_tree (NULL, NULL, 0, new_idx); tree = ((tree == NULL) ? right_par : create_tree (tree, right_par, CONCAT, 0)); tree = create_tree (left_par, tree, CONCAT, 0); if (BE (new_idx == -1 || right_par == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } dfa->nodes[new_idx].opr.idx = cur_nsub; return tree; } /* This function parse repetition operators like "*", "+", "{1,3}" etc. */ static bin_tree_t * parse_dup_op (dup_elem, regexp, dfa, token, syntax, err) bin_tree_t *dup_elem; re_string_t *regexp; re_dfa_t *dfa; re_token_t *token; reg_syntax_t syntax; reg_errcode_t *err; { re_token_t dup_token; bin_tree_t *tree = dup_elem, *work_tree; int new_idx, start_idx = re_string_cur_idx (regexp); re_token_t start_token; start_token = *token; if (token->type == OP_OPEN_DUP_NUM) { int i; int end = 0; int start = fetch_number (regexp, token, syntax); bin_tree_t *elem; if (start == -1) { if (token->type == CHARACTER && token->opr.c == ',') start = 0; /* We treat "{,m}" as "{0,m}". */ else { *err = REG_BADBR; /* {} is invalid. */ return NULL; } } if (BE (start != -2, 1)) { /* We treat "{n}" as "{n,n}". */ end = ((token->type == OP_CLOSE_DUP_NUM) ? start : ((token->type == CHARACTER && token->opr.c == ',') ? fetch_number (regexp, token, syntax) : -2)); } if (BE (start == -2 || end == -2, 0)) { /* Invalid sequence. */ if (token->type == OP_CLOSE_DUP_NUM) goto parse_dup_op_invalid_interval; else goto parse_dup_op_ebrace; } if (BE (start == 0 && end == 0, 0)) { /* We treat "{0}" and "{0,0}" as null string. */ *token = fetch_token (regexp, syntax); free_bin_tree (dup_elem); return NULL; } /* Extract "{n,m}" to "...{0,}". */ elem = tree; for (i = 0; i < start; ++i) if (i != 0) { work_tree = duplicate_tree (elem, dfa); tree = create_tree (tree, work_tree, CONCAT, 0); if (BE (work_tree == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } if (end == -1) { /* We treat "{0,}" as "*". */ dup_token.type = OP_DUP_ASTERISK; if (start > 0) { elem = duplicate_tree (elem, dfa); new_idx = re_dfa_add_node (dfa, dup_token, 0); work_tree = create_tree (elem, NULL, 0, new_idx); tree = create_tree (tree, work_tree, CONCAT, 0); if (BE (elem == NULL || new_idx == -1 || work_tree == NULL || tree == NULL, 0)) goto parse_dup_op_espace; } else { new_idx = re_dfa_add_node (dfa, dup_token, 0); tree = create_tree (elem, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) goto parse_dup_op_espace; } } else if (end - start > 0) { /* Then extract "{0,m}" to "??...?". */ dup_token.type = OP_DUP_QUESTION; if (start > 0) { elem = duplicate_tree (elem, dfa); new_idx = re_dfa_add_node (dfa, dup_token, 0); elem = create_tree (elem, NULL, 0, new_idx); tree = create_tree (tree, elem, CONCAT, 0); if (BE (elem == NULL || new_idx == -1 || tree == NULL, 0)) goto parse_dup_op_espace; } else { new_idx = re_dfa_add_node (dfa, dup_token, 0); tree = elem = create_tree (elem, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) goto parse_dup_op_espace; } for (i = 1; i < end - start; ++i) { work_tree = duplicate_tree (elem, dfa); tree = create_tree (tree, work_tree, CONCAT, 0); if (BE (work_tree == NULL || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } } } else { new_idx = re_dfa_add_node (dfa, *token, 0); tree = create_tree (tree, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) { *err = REG_ESPACE; return NULL; } } *token = fetch_token (regexp, syntax); return tree; parse_dup_op_espace: free_bin_tree (tree); *err = REG_ESPACE; return NULL; parse_dup_op_ebrace: if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { *err = REG_EBRACE; return NULL; } goto parse_dup_op_rollback; parse_dup_op_invalid_interval: if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) { *err = REG_BADBR; return NULL; } parse_dup_op_rollback: re_string_set_index (regexp, start_idx); *token = start_token; token->type = CHARACTER; return dup_elem; } /* Size of the names for collating symbol/equivalence_class/character_class. I'm not sure, but maybe enough. */ #define BRACKET_NAME_BUF_SIZE 32 #ifndef _LIBC /* Local function for parse_bracket_exp only used in case of NOT _LIBC. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static reg_errcode_t # ifdef RE_ENABLE_I18N build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; # else /* not RE_ENABLE_I18N */ build_range_exp (sbcset, start_elem, end_elem) # endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int start_ch, end_ch; /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; /* We can handle no multi character collating elements without libc support. */ if (BE ((start_elem->type == COLL_SYM && strlen ((char *) start_elem->opr.name) > 1) || (end_elem->type == COLL_SYM && strlen ((char *) end_elem->opr.name) > 1), 0)) return REG_ECOLLATE; # ifdef RE_ENABLE_I18N { wchar_t wc, start_wc, end_wc; wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) ? __btowc (start_ch) : start_elem->opr.wch); end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) ? __btowc (end_ch) : end_elem->opr.wch); cmp_buf[0] = start_wc; cmp_buf[4] = end_wc; if (wcscoll (cmp_buf, cmp_buf + 4) > 0) return REG_ERANGE; /* Check the space of the arrays. */ if (*range_alloc == mbcset->nranges) { /* There are not enough space, need realloc. */ wchar_t *new_array_start, *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, wchar_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, wchar_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } mbcset->range_starts[mbcset->nranges] = start_wc; mbcset->range_ends[mbcset->nranges++] = end_wc; /* Build the table for single byte characters. */ for (wc = 0; wc <= SBC_MAX; ++wc) { cmp_buf[2] = wc; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) bitset_set (sbcset, wc); } } # else /* not RE_ENABLE_I18N */ { unsigned int ch; start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] : 0)); end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] : 0)); if (start_ch > end_ch) return REG_ERANGE; /* Build the table for single byte characters. */ for (ch = 0; ch <= SBC_MAX; ++ch) if (start_ch <= ch && ch <= end_ch) bitset_set (sbcset, ch); } # endif /* not RE_ENABLE_I18N */ return REG_NOERROR; } #endif /* not _LIBC */ #ifndef _LIBC /* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument since we may update it. */ static reg_errcode_t # ifdef RE_ENABLE_I18N build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; # else /* not RE_ENABLE_I18N */ build_collating_symbol (sbcset, name) # endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; const unsigned char *name; { size_t name_len = strlen ((const char *) name); if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } #endif /* not _LIBC */ /* This function parse bracket expression like "[abc]", "[a-c]", "[[.a-a.]]" etc. */ static bin_tree_t * parse_bracket_exp (regexp, dfa, token, syntax, err) re_string_t *regexp; re_dfa_t *dfa; re_token_t *token; reg_syntax_t syntax; reg_errcode_t *err; { #ifdef _LIBC const unsigned char *collseqmb; const char *collseqwc; uint32_t nrules; int32_t table_size; const int32_t *symb_table; const unsigned char *extra; /* Local function for parse_bracket_exp used in _LIBC environement. Seek the collating symbol entry correspondings to NAME. Return the index of the symbol in the SYMB_TABLE. */ static inline int32_t seek_collating_symbol_entry (name, name_len) const unsigned char *name; size_t name_len; { int32_t hash = elem_hash ((const char *) name, name_len); int32_t elem = hash % table_size; int32_t second = hash % (table_size - 2); while (symb_table[2 * elem] != 0) { /* First compare the hashing value. */ if (symb_table[2 * elem] == hash /* Compare the length of the name. */ && name_len == extra[symb_table[2 * elem + 1]] /* Compare the name. */ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], name_len) == 0) { /* Yep, this is the entry. */ break; } /* Next entry. */ elem += second; } return elem; } /* Local function for parse_bracket_exp used in _LIBC environement. Look up the collation sequence value of BR_ELEM. Return the value if succeeded, UINT_MAX otherwise. */ static inline unsigned int lookup_collation_sequence_value (br_elem) bracket_elem_t *br_elem; { if (br_elem->type == SB_CHAR) { /* if (re_mb_cur_max == 1) */ if (nrules == 0) return collseqmb[br_elem->opr.ch]; else { wint_t wc = __btowc (br_elem->opr.ch); return collseq_table_lookup (collseqwc, wc); } } else if (br_elem->type == MB_CHAR) { return collseq_table_lookup (collseqwc, br_elem->opr.wch); } else if (br_elem->type == COLL_SYM) { size_t sym_name_len = strlen ((char *) br_elem->opr.name); if (nrules != 0) { int32_t elem, idx; elem = seek_collating_symbol_entry (br_elem->opr.name, sym_name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; /* Skip the byte sequence of the collating element. */ idx += 1 + extra[idx]; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the multibyte collation sequence value. */ idx += sizeof (unsigned int); /* Skip the wide char sequence of the collating element. */ idx += sizeof (unsigned int) * (1 + *(unsigned int *) (extra + idx)); /* Return the collation sequence value. */ return *(unsigned int *) (extra + idx); } else if (symb_table[2 * elem] == 0 && sym_name_len == 1) { /* No valid character. Match it as a single byte character. */ return collseqmb[br_elem->opr.name[0]]; } } else if (sym_name_len == 1) return collseqmb[br_elem->opr.name[0]]; } return UINT_MAX; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the range expression which starts from START_ELEM, and ends at END_ELEM. The result are written to MBCSET and SBCSET. RANGE_ALLOC is the allocated size of mbcset->range_starts, and mbcset->range_ends, is a pointer argument sinse we may update it. */ static inline reg_errcode_t # ifdef RE_ENABLE_I18N build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) re_charset_t *mbcset; int *range_alloc; # else /* not RE_ENABLE_I18N */ build_range_exp (sbcset, start_elem, end_elem) # endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; bracket_elem_t *start_elem, *end_elem; { unsigned int ch; uint32_t start_collseq; uint32_t end_collseq; # ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (*range_alloc == mbcset->nranges) { /* There are not enough space, need realloc. */ uint32_t *new_array_start; uint32_t *new_array_end; int new_nranges; /* +1 in case of mbcset->nranges is 0. */ new_nranges = 2 * mbcset->nranges + 1; /* Use realloc since mbcset->range_starts and mbcset->range_ends are NULL if *range_alloc == 0. */ new_array_start = re_realloc (mbcset->range_starts, uint32_t, new_nranges); new_array_end = re_realloc (mbcset->range_ends, uint32_t, new_nranges); if (BE (new_array_start == NULL || new_array_end == NULL, 0)) return REG_ESPACE; mbcset->range_starts = new_array_start; mbcset->range_ends = new_array_end; *range_alloc = new_nranges; } # endif /* RE_ENABLE_I18N */ /* Equivalence Classes and Character Classes can't be a range start/end. */ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, 0)) return REG_ERANGE; start_collseq = lookup_collation_sequence_value (start_elem); end_collseq = lookup_collation_sequence_value (end_elem); /* Check start/end collation sequence values. */ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) return REG_ECOLLATE; if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) return REG_ERANGE; # ifdef RE_ENABLE_I18N /* Got valid collation sequence values, add them as a new entry. */ mbcset->range_starts[mbcset->nranges] = start_collseq; mbcset->range_ends[mbcset->nranges++] = end_collseq; # endif /* RE_ENABLE_I18N */ /* Build the table for single byte characters. */ for (ch = 0; ch <= SBC_MAX; ch++) { uint32_t ch_collseq; /* if (re_mb_cur_max == 1) */ if (nrules == 0) ch_collseq = collseqmb[ch]; else ch_collseq = collseq_table_lookup (collseqwc, __btowc (ch)); if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) bitset_set (sbcset, ch); } return REG_NOERROR; } /* Local function for parse_bracket_exp used in _LIBC environement. Build the collating element which is represented by NAME. The result are written to MBCSET and SBCSET. COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a pointer argument sinse we may update it. */ static inline reg_errcode_t # ifdef RE_ENABLE_I18N build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) re_charset_t *mbcset; int *coll_sym_alloc; # else /* not RE_ENABLE_I18N */ build_collating_symbol (sbcset, name) # endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; const unsigned char *name; { int32_t elem, idx; size_t name_len = strlen ((const char *) name); if (nrules != 0) { elem = seek_collating_symbol_entry (name, name_len); if (symb_table[2 * elem] != 0) { /* We found the entry. */ idx = symb_table[2 * elem + 1]; /* Skip the name of collating element name. */ idx += 1 + extra[idx]; } else if (symb_table[2 * elem] == 0 && name_len == 1) { /* No valid character, treat it as a normal character. */ bitset_set (sbcset, name[0]); return REG_NOERROR; } else return REG_ECOLLATE; # ifdef RE_ENABLE_I18N /* Got valid collation sequence, add it as a new entry. */ /* Check the space of the arrays. */ if (*coll_sym_alloc == mbcset->ncoll_syms) { /* Not enough, realloc it. */ /* +1 in case of mbcset->ncoll_syms is 0. */ *coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; /* Use realloc since mbcset->coll_syms is NULL if *alloc == 0. */ mbcset->coll_syms = re_realloc (mbcset->coll_syms, int32_t, *coll_sym_alloc); if (BE (mbcset->coll_syms == NULL, 0)) return REG_ESPACE; } mbcset->coll_syms[mbcset->ncoll_syms++] = idx; # endif /* RE_ENABLE_I18N */ return REG_NOERROR; } else { if (BE (name_len != 1, 0)) return REG_ECOLLATE; else { bitset_set (sbcset, name[0]); return REG_NOERROR; } } } #endif re_token_t br_token; re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; int equiv_class_alloc = 0, char_class_alloc = 0; #else /* not RE_ENABLE_I18N */ int non_match = 0; #endif /* not RE_ENABLE_I18N */ bin_tree_t *work_tree; int token_len, new_idx; #ifdef _LIBC collseqmb = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules) { /* if (re_mb_cur_max > 1) */ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); } #endif sbcset = (re_bitset_ptr_t) calloc (sizeof (unsigned int), BITSET_UINTS); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else if (BE (sbcset == NULL, 0)) #endif /* RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_NON_MATCH_LIST) { #ifdef RE_ENABLE_I18N int i; mbcset->non_match = 1; #else /* not RE_ENABLE_I18N */ non_match = 1; #endif /* not RE_ENABLE_I18N */ if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set (sbcset, '\0'); re_string_skip_bytes (regexp, token_len); /* Skip a token. */ token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) for (i = 0; i < SBC_MAX; ++i) if (__btowc (i) == WEOF) bitset_set (sbcset, i); #endif /* RE_ENABLE_I18N */ } /* We treat the first ']' as a normal character. */ if (token->type == OP_CLOSE_BRACKET) token->type = CHARACTER; while (1) { bracket_elem_t start_elem, end_elem; unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; reg_errcode_t ret; int token_len2 = 0, is_range_exp = 0; re_token_t token2; start_elem.opr.name = start_name_buf; ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, syntax); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token->type == OP_CHARSET_RANGE) { re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ token_len2 = peek_token_bracket (&token2, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } if (token2.type == OP_CLOSE_BRACKET) { /* We treat the last '-' as a normal character. */ re_string_skip_bytes (regexp, -token_len); token->type = CHARACTER; } else is_range_exp = 1; } if (is_range_exp == 1) { end_elem.opr.name = end_name_buf; ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, dfa, syntax); if (BE (ret != REG_NOERROR, 0)) { *err = ret; goto parse_bracket_exp_free_return; } token_len = peek_token_bracket (token, regexp, syntax); if (BE (token->type == END_OF_RE, 0)) { *err = REG_BADPAT; goto parse_bracket_exp_free_return; } *err = build_range_exp (sbcset, #ifdef RE_ENABLE_I18N mbcset, &range_alloc, #endif /* RE_ENABLE_I18N */ &start_elem, &end_elem); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; } else { switch (start_elem.type) { case SB_CHAR: bitset_set (sbcset, start_elem.opr.ch); break; #ifdef RE_ENABLE_I18N case MB_CHAR: /* Check whether the array has enough space. */ if (mbchar_alloc == mbcset->nmbchars) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nmbchars is 0. */ mbchar_alloc = 2 * mbcset->nmbchars + 1; /* Use realloc since array is NULL if *alloc == 0. */ mbcset->mbchars = re_realloc (mbcset->mbchars, wchar_t, mbchar_alloc); if (BE (mbcset->mbchars == NULL, 0)) goto parse_bracket_exp_espace; } mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; break; #endif /* RE_ENABLE_I18N */ case EQUIV_CLASS: *err = build_equiv_class (sbcset, #ifdef RE_ENABLE_I18N mbcset, &equiv_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case COLL_SYM: *err = build_collating_symbol (sbcset, #ifdef RE_ENABLE_I18N mbcset, &coll_sym_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name); if (BE (*err != REG_NOERROR, 0)) goto parse_bracket_exp_free_return; break; case CHAR_CLASS: ret = build_charclass (regexp->trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &char_class_alloc, #endif /* RE_ENABLE_I18N */ start_elem.opr.name, syntax); if (BE (ret != REG_NOERROR, 0)) goto parse_bracket_exp_espace; break; default: assert (0); break; } } if (token->type == OP_CLOSE_BRACKET) break; } re_string_skip_bytes (regexp, token_len); /* Skip a token. */ /* If it is non-matching list. */ #ifdef RE_ENABLE_I18N if (mbcset->non_match) #else /* not RE_ENABLE_I18N */ if (non_match) #endif /* not RE_ENABLE_I18N */ bitset_not (sbcset); /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; new_idx = re_dfa_add_node (dfa, br_token, 0); work_tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || work_tree == NULL, 0)) goto parse_bracket_exp_espace; #ifdef RE_ENABLE_I18N if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes || mbcset->nranges || (re_mb_cur_max > 1 && (mbcset->nchar_classes || mbcset->non_match))) { re_token_t alt_token; bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; new_idx = re_dfa_add_node (dfa, br_token, 0); mbc_tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || mbc_tree == NULL, 0)) goto parse_bracket_exp_espace; /* Then join them by ALT node. */ dfa->has_plural_match = 1; alt_token.type = OP_ALT; new_idx = re_dfa_add_node (dfa, alt_token, 0); work_tree = create_tree (work_tree, mbc_tree, 0, new_idx); if (BE (new_idx != -1 && mbc_tree != NULL, 1)) return work_tree; } else { free_charset (mbcset); return work_tree; } #else /* not RE_ENABLE_I18N */ return work_tree; #endif /* not RE_ENABLE_I18N */ parse_bracket_exp_espace: *err = REG_ESPACE; parse_bracket_exp_free_return: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ return NULL; } /* Parse an element in the bracket expression. */ static reg_errcode_t parse_bracket_element (elem, regexp, token, token_len, dfa, syntax) bracket_elem_t *elem; re_string_t *regexp; re_token_t *token; int token_len; re_dfa_t *dfa; reg_syntax_t syntax; { #ifdef RE_ENABLE_I18N int cur_char_size; cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); if (cur_char_size > 1) { elem->type = MB_CHAR; elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); re_string_skip_bytes (regexp, cur_char_size); return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ re_string_skip_bytes (regexp, token_len); /* Skip a token. */ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS || token->type == OP_OPEN_EQUIV_CLASS) return parse_bracket_symbol (elem, regexp, token); elem->type = SB_CHAR; elem->opr.ch = token->opr.c; return REG_NOERROR; } /* Parse a bracket symbol in the bracket expression. Bracket symbols are such as [::], [..], and [==]. */ static reg_errcode_t parse_bracket_symbol (elem, regexp, token) bracket_elem_t *elem; re_string_t *regexp; re_token_t *token; { unsigned char ch, delim = token->opr.c; int i = 0; for (;; ++i) { if (re_string_eoi(regexp) || i >= BRACKET_NAME_BUF_SIZE) return REG_EBRACK; if (token->type == OP_OPEN_CHAR_CLASS) ch = re_string_fetch_byte_case (regexp); else ch = re_string_fetch_byte (regexp); if (ch == delim && re_string_peek_byte (regexp, 0) == ']') break; elem->opr.name[i] = ch; } re_string_skip_bytes (regexp, 1); elem->opr.name[i] = '\0'; switch (token->type) { case OP_OPEN_COLL_ELEM: elem->type = COLL_SYM; break; case OP_OPEN_EQUIV_CLASS: elem->type = EQUIV_CLASS; break; case OP_OPEN_CHAR_CLASS: elem->type = CHAR_CLASS; break; default: break; } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the equivalence class which is represented by NAME. The result are written to MBCSET and SBCSET. EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_equiv_class (sbcset, mbcset, equiv_class_alloc, name) re_charset_t *mbcset; int *equiv_class_alloc; #else /* not RE_ENABLE_I18N */ build_equiv_class (sbcset, name) #endif /* not RE_ENABLE_I18N */ re_bitset_ptr_t sbcset; const unsigned char *name; { #if defined _LIBC && defined RE_ENABLE_I18N uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { const int32_t *table, *indirect; const unsigned char *weights, *extra, *cp; unsigned char char_buf[2]; int32_t idx1, idx2; unsigned int ch; size_t len; /* This #include defines a local function! */ # include /* Calculate the index for equivalence class. */ cp = name; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx1 = findidx (&cp); if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0)) /* This isn't a valid character. */ return REG_ECOLLATE; /* Build single byte matcing table for this equivalence class. */ char_buf[1] = (unsigned char) '\0'; len = weights[idx1]; for (ch = 0; ch < SBC_MAX; ++ch) { char_buf[0] = ch; cp = char_buf; idx2 = findidx (&cp); /* idx2 = table[ch]; */ if (idx2 == 0) /* This isn't a valid character. */ continue; if (len == weights[idx2]) { int cnt = 0; while (cnt <= len && weights[idx1 + 1 + cnt] == weights[idx2 + 1 + cnt]) ++cnt; if (cnt > len) bitset_set (sbcset, ch); } } /* Check whether the array has enough space. */ if (*equiv_class_alloc == mbcset->nequiv_classes) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nequiv_classes is 0. */ *equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; /* Use realloc since the array is NULL if *alloc == 0. */ mbcset->equiv_classes = re_realloc (mbcset->equiv_classes, int32_t, *equiv_class_alloc); if (BE (mbcset->equiv_classes == NULL, 0)) return REG_ESPACE; } mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; } else #endif /* _LIBC && RE_ENABLE_I18N */ { if (BE (strlen ((const char *) name) != 1, 0)) return REG_ECOLLATE; bitset_set (sbcset, *name); } return REG_NOERROR; } /* Helper function for parse_bracket_exp. Build the character class which is represented by NAME. The result are written to MBCSET and SBCSET. CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, is a pointer argument sinse we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N build_charclass (trans, sbcset, mbcset, char_class_alloc, class_name, syntax) re_charset_t *mbcset; int *char_class_alloc; #else /* not RE_ENABLE_I18N */ build_charclass (trans, sbcset, class_name, syntax) #endif /* not RE_ENABLE_I18N */ RE_TRANSLATE_TYPE trans; re_bitset_ptr_t sbcset; const unsigned char *class_name; reg_syntax_t syntax; { int i; const char *name = (const char *) class_name; /* In case of REG_ICASE "upper" and "lower" match the both of upper and lower cases. */ if ((syntax & RE_ICASE) && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) name = "alpha"; #ifdef RE_ENABLE_I18N /* Check the space of the arrays. */ if (*char_class_alloc == mbcset->nchar_classes) { /* Not enough, realloc it. */ /* +1 in case of mbcset->nchar_classes is 0. */ *char_class_alloc = 2 * mbcset->nchar_classes + 1; /* Use realloc since array is NULL if *alloc == 0. */ mbcset->char_classes = re_realloc (mbcset->char_classes, wctype_t, *char_class_alloc); if (BE (mbcset->char_classes == NULL, 0)) return REG_ESPACE; } mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); #endif /* RE_ENABLE_I18N */ #define BUILD_CHARCLASS_LOOP(ctype_func)\ for (i = 0; i < SBC_MAX; ++i) \ { \ if (ctype_func (i)) \ { \ int ch = trans ? trans[i] : i; \ bitset_set (sbcset, ch); \ } \ } if (strcmp (name, "alnum") == 0) BUILD_CHARCLASS_LOOP (isalnum) else if (strcmp (name, "cntrl") == 0) BUILD_CHARCLASS_LOOP (iscntrl) else if (strcmp (name, "lower") == 0) BUILD_CHARCLASS_LOOP (islower) else if (strcmp (name, "space") == 0) BUILD_CHARCLASS_LOOP (isspace) else if (strcmp (name, "alpha") == 0) BUILD_CHARCLASS_LOOP (isalpha) else if (strcmp (name, "digit") == 0) BUILD_CHARCLASS_LOOP (isdigit) else if (strcmp (name, "print") == 0) BUILD_CHARCLASS_LOOP (isprint) else if (strcmp (name, "upper") == 0) BUILD_CHARCLASS_LOOP (isupper) else if (strcmp (name, "blank") == 0) BUILD_CHARCLASS_LOOP (isblank) else if (strcmp (name, "graph") == 0) BUILD_CHARCLASS_LOOP (isgraph) else if (strcmp (name, "punct") == 0) BUILD_CHARCLASS_LOOP (ispunct) else if (strcmp (name, "xdigit") == 0) BUILD_CHARCLASS_LOOP (isxdigit) else return REG_ECTYPE; return REG_NOERROR; } static bin_tree_t * build_word_op (dfa, trans, not, err) re_dfa_t *dfa; RE_TRANSLATE_TYPE trans; int not; reg_errcode_t *err; { re_bitset_ptr_t sbcset; #ifdef RE_ENABLE_I18N re_charset_t *mbcset; int alloc = 0; #else /* not RE_ENABLE_I18N */ int non_match = 0; #endif /* not RE_ENABLE_I18N */ reg_errcode_t ret; re_token_t br_token; bin_tree_t *tree; int new_idx; sbcset = (re_bitset_ptr_t) calloc (sizeof (unsigned int), BITSET_UINTS); #ifdef RE_ENABLE_I18N mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); #endif /* RE_ENABLE_I18N */ #ifdef RE_ENABLE_I18N if (BE (sbcset == NULL || mbcset == NULL, 0)) #else /* not RE_ENABLE_I18N */ if (BE (sbcset == NULL, 0)) #endif /* not RE_ENABLE_I18N */ { *err = REG_ESPACE; return NULL; } if (not) { #ifdef RE_ENABLE_I18N int i; /* if (syntax & RE_HAT_LISTS_NOT_NEWLINE) bitset_set(cset->sbcset, '\0'); */ mbcset->non_match = 1; if (re_mb_cur_max > 1) for (i = 0; i < SBC_MAX; ++i) if (__btowc (i) == WEOF) bitset_set (sbcset, i); #else /* not RE_ENABLE_I18N */ non_match = 1; #endif /* not RE_ENABLE_I18N */ } /* We don't care the syntax in this case. */ ret = build_charclass (trans, sbcset, #ifdef RE_ENABLE_I18N mbcset, &alloc, #endif /* RE_ENABLE_I18N */ (const unsigned char *) "alpha", 0); if (BE (ret != REG_NOERROR, 0)) { re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = ret; return NULL; } /* \w match '_' also. */ bitset_set (sbcset, '_'); /* If it is non-matching list. */ #ifdef RE_ENABLE_I18N if (mbcset->non_match) #else /* not RE_ENABLE_I18N */ if (non_match) #endif /* not RE_ENABLE_I18N */ bitset_not (sbcset); /* Build a tree for simple bracket. */ br_token.type = SIMPLE_BRACKET; br_token.opr.sbcset = sbcset; new_idx = re_dfa_add_node (dfa, br_token, 0); tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || tree == NULL, 0)) goto build_word_op_espace; #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { re_token_t alt_token; bin_tree_t *mbc_tree; /* Build a tree for complex bracket. */ br_token.type = COMPLEX_BRACKET; br_token.opr.mbcset = mbcset; dfa->has_mb_node = 1; new_idx = re_dfa_add_node (dfa, br_token, 0); mbc_tree = create_tree (NULL, NULL, 0, new_idx); if (BE (new_idx == -1 || mbc_tree == NULL, 0)) goto build_word_op_espace; /* Then join them by ALT node. */ alt_token.type = OP_ALT; new_idx = re_dfa_add_node (dfa, alt_token, 0); tree = create_tree (tree, mbc_tree, 0, new_idx); if (BE (new_idx != -1 && mbc_tree != NULL, 1)) return tree; } else { free_charset (mbcset); return tree; } #else /* not RE_ENABLE_I18N */ return tree; #endif /* not RE_ENABLE_I18N */ build_word_op_espace: re_free (sbcset); #ifdef RE_ENABLE_I18N free_charset (mbcset); #endif /* RE_ENABLE_I18N */ *err = REG_ESPACE; return NULL; } /* This is intended for the expressions like "a{1,3}". Fetch a number from `input', and return the number. Return -1, if the number field is empty like "{,1}". Return -2, If an error is occured. */ static int fetch_number (input, token, syntax) re_string_t *input; re_token_t *token; reg_syntax_t syntax; { int num = -1; unsigned char c; while (1) { *token = fetch_token (input, syntax); c = token->opr.c; if (BE (token->type == END_OF_RE, 0)) return -2; if (token->type == OP_CLOSE_DUP_NUM || c == ',') break; num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2) ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0')); num = (num > RE_DUP_MAX) ? -2 : num; } return num; } #ifdef RE_ENABLE_I18N static void free_charset (re_charset_t *cset) { re_free (cset->mbchars); # ifdef _LIBC re_free (cset->coll_syms); re_free (cset->equiv_classes); re_free (cset->range_starts); re_free (cset->range_ends); # endif re_free (cset->char_classes); re_free (cset); } #endif /* RE_ENABLE_I18N */ /* Functions for binary tree operation. */ /* Create a node of tree. Note: This function automatically free left and right if malloc fails. */ static bin_tree_t * create_tree (left, right, type, index) bin_tree_t *left; bin_tree_t *right; re_token_type_t type; int index; { bin_tree_t *tree; tree = re_malloc (bin_tree_t, 1); if (BE (tree == NULL, 0)) { free_bin_tree (left); free_bin_tree (right); return NULL; } tree->parent = NULL; tree->left = left; tree->right = right; tree->type = type; tree->node_idx = index; tree->first = -1; tree->next = -1; re_node_set_init_empty (&tree->eclosure); if (left != NULL) left->parent = tree; if (right != NULL) right->parent = tree; return tree; } /* Free the sub tree pointed by TREE. */ static void free_bin_tree (tree) bin_tree_t *tree; { if (tree == NULL) return; /*re_node_set_free (&tree->eclosure);*/ free_bin_tree (tree->left); free_bin_tree (tree->right); re_free (tree); } /* Duplicate the node SRC, and return new node. */ static bin_tree_t * duplicate_tree (src, dfa) const bin_tree_t *src; re_dfa_t *dfa; { bin_tree_t *left = NULL, *right = NULL, *new_tree; int new_node_idx; /* Since node indies must be according to Post-order of the tree, we must duplicate the left at first. */ if (src->left != NULL) { left = duplicate_tree (src->left, dfa); if (left == NULL) return NULL; } /* Secondaly, duplicate the right. */ if (src->right != NULL) { right = duplicate_tree (src->right, dfa); if (right == NULL) { free_bin_tree (left); return NULL; } } /* At last, duplicate itself. */ if (src->type == NON_TYPE) { new_node_idx = re_dfa_add_node (dfa, dfa->nodes[src->node_idx], 0); dfa->nodes[new_node_idx].duplicated = 1; if (BE (new_node_idx == -1, 0)) { free_bin_tree (left); free_bin_tree (right); return NULL; } } else new_node_idx = src->type; new_tree = create_tree (left, right, src->type, new_node_idx); if (BE (new_tree == NULL, 0)) { free_bin_tree (left); free_bin_tree (right); } return new_tree; } EOF echo - 'regex.c' cat << 'EOF' > 'regex.c' /* Extended regular expression matching and search library. Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) # define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) # define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) # define regerror(errcode, preg, errbuf, errbuf_size) \ __regerror(errcode, preg, errbuf, errbuf_size) # define re_set_registers(bu, re, nu, st, en) \ __re_set_registers (bu, re, nu, st, en) # define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) # define re_match(bufp, string, size, pos, regs) \ __re_match (bufp, string, size, pos, regs) # define re_search(bufp, string, size, startpos, range, regs) \ __re_search (bufp, string, size, startpos, range, regs) # define re_compile_pattern(pattern, length, bufp) \ __re_compile_pattern (pattern, length, bufp) # define re_set_syntax(syntax) __re_set_syntax (syntax) # define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) # define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif /* POSIX says that must be included (by the caller) before . */ #include #include #include #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" #include "regexec.c" /* Binary backward compatibility. */ #if _LIBC # include # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") int re_max_failures = 2000; # endif #endif EOF echo - 'regex_internal.c' cat << 'EOF' > 'regex_internal.c' /* Extended regular expression matching and search library. Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ static void re_string_construct_common _RE_ARGS((const char *str, int len, re_string_t *pstr, RE_TRANSLATE_TYPE trans, int icase)); #ifdef RE_ENABLE_I18N static int re_string_skip_chars _RE_ARGS((re_string_t *pstr, int new_raw_idx, wint_t *last_wc)); #endif /* RE_ENABLE_I18N */ static re_dfastate_t *create_newstate_common _RE_ARGS((re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash)); static reg_errcode_t register_state _RE_ARGS((re_dfa_t *dfa, re_dfastate_t *newstate, unsigned int hash)); static re_dfastate_t *create_ci_newstate _RE_ARGS((re_dfa_t *dfa, const re_node_set *nodes, unsigned int hash)); static re_dfastate_t *create_cd_newstate _RE_ARGS((re_dfa_t *dfa, const re_node_set *nodes, unsigned int context, unsigned int hash)); static inline unsigned int calc_state_hash _RE_ARGS((const re_node_set *nodes, unsigned int context)); /* Functions for string operation. */ /* This function allocate the buffers. It is necessary to call re_string_reconstruct before using the object. */ static reg_errcode_t re_string_allocate (pstr, str, len, init_len, trans, icase) re_string_t *pstr; const char *str; int len, init_len, icase; RE_TRANSLATE_TYPE trans; { reg_errcode_t ret; int init_buf_len = (len + 1 < init_len) ? len + 1: init_len; re_string_construct_common (str, len, pstr, trans, icase); pstr->stop = pstr->len; ret = re_string_realloc_buffers (pstr, init_buf_len); if (BE (ret != REG_NOERROR, 0)) return ret; pstr->mbs_case = (MBS_CASE_ALLOCATED (pstr) ? pstr->mbs_case : (unsigned char *) str); pstr->mbs = MBS_ALLOCATED (pstr) ? pstr->mbs : pstr->mbs_case; pstr->valid_len = (MBS_CASE_ALLOCATED (pstr) || MBS_ALLOCATED (pstr) #ifdef RE_ENABLE_I18N || re_mb_cur_max > 1 #endif ) ? pstr->valid_len : len; return REG_NOERROR; } /* This function allocate the buffers, and initialize them. */ static reg_errcode_t re_string_construct (pstr, str, len, trans, icase) re_string_t *pstr; const char *str; int len, icase; RE_TRANSLATE_TYPE trans; { reg_errcode_t ret; re_string_construct_common (str, len, pstr, trans, icase); pstr->stop = pstr->len; /* Set 0 so that this function can initialize whole buffers. */ pstr->valid_len = 0; if (len > 0) { ret = re_string_realloc_buffers (pstr, len + 1); if (BE (ret != REG_NOERROR, 0)) return ret; } pstr->mbs_case = (MBS_CASE_ALLOCATED (pstr) ? pstr->mbs_case : (unsigned char *) str); pstr->mbs = MBS_ALLOCATED (pstr) ? pstr->mbs : pstr->mbs_case; if (icase) { #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) build_wcs_upper_buffer (pstr); else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (trans != NULL) re_string_translate_buffer (pstr); else pstr->valid_len = len; } } /* Initialized whole buffers, then valid_len == bufs_len. */ pstr->valid_len = pstr->bufs_len; return REG_NOERROR; } /* Helper functions for re_string_allocate, and re_string_construct. */ static reg_errcode_t re_string_realloc_buffers (pstr, new_buf_len) re_string_t *pstr; int new_buf_len; { #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { wint_t *new_array = re_realloc (pstr->wcs, wint_t, new_buf_len); if (BE (new_array == NULL, 0)) return REG_ESPACE; pstr->wcs = new_array; } #endif /* RE_ENABLE_I18N */ if (MBS_ALLOCATED (pstr)) { unsigned char *new_array = re_realloc (pstr->mbs, unsigned char, new_buf_len); if (BE (new_array == NULL, 0)) return REG_ESPACE; pstr->mbs = new_array; } if (MBS_CASE_ALLOCATED (pstr)) { unsigned char *new_array = re_realloc (pstr->mbs_case, unsigned char, new_buf_len); if (BE (new_array == NULL, 0)) return REG_ESPACE; pstr->mbs_case = new_array; if (!MBS_ALLOCATED (pstr)) pstr->mbs = pstr->mbs_case; } pstr->bufs_len = new_buf_len; return REG_NOERROR; } static void re_string_construct_common (str, len, pstr, trans, icase) const char *str; int len; re_string_t *pstr; RE_TRANSLATE_TYPE trans; int icase; { memset (pstr, '\0', sizeof (re_string_t)); pstr->raw_mbs = (const unsigned char *) str; pstr->len = len; pstr->trans = trans; pstr->icase = icase ? 1 : 0; } #ifdef RE_ENABLE_I18N /* Build wide character buffer PSTR->WCS. If the byte sequence of the string are: (0), (1), (0), (1), Then wide character buffer will be: , WEOF , , WEOF , We use WEOF for padding, they indicate that the position isn't a first byte of a multibyte character. Note that this function assumes PSTR->VALID_LEN elements are already built and starts from PSTR->VALID_LEN. */ static void build_wcs_buffer (pstr) re_string_t *pstr; { mbstate_t prev_st; int byte_idx, end_idx, mbclen, remain_len; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len)? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; pstr->cur_state = prev_st; } /* Apply the translateion if we need. */ if (pstr->trans != NULL && mbclen == 1) { int ch = pstr->trans[pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]]; pstr->mbs_case[byte_idx] = ch; } /* Write wide character and padding. */ pstr->wcs[byte_idx++] = wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } pstr->valid_len = byte_idx; } /* Build wide character buffer PSTR->WCS like build_wcs_buffer, but for REG_ICASE. */ static void build_wcs_upper_buffer (pstr) re_string_t *pstr; { mbstate_t prev_st; int byte_idx, end_idx, mbclen, remain_len; /* Build the buffers from pstr->valid_len to either pstr->len or pstr->bufs_len. */ end_idx = (pstr->bufs_len > pstr->len)? pstr->len : pstr->bufs_len; for (byte_idx = pstr->valid_len; byte_idx < end_idx;) { wchar_t wc; remain_len = end_idx - byte_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx), remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2, 0)) { /* The buffer doesn't have enough space, finish to build. */ pstr->cur_state = prev_st; break; } else if (mbclen == 1 || mbclen == (size_t) -1 || mbclen == 0) { /* In case of a singlebyte character. */ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; /* Apply the translateion if we need. */ if (pstr->trans != NULL && mbclen == 1) { ch = pstr->trans[ch]; pstr->mbs_case[byte_idx] = ch; } pstr->wcs[byte_idx] = iswlower (wc) ? toupper (wc) : wc; pstr->mbs[byte_idx++] = islower (ch) ? toupper (ch) : ch; if (BE (mbclen == (size_t) -1, 0)) pstr->cur_state = prev_st; } else /* mbclen > 1 */ { if (iswlower (wc)) wcrtomb ((char *) pstr->mbs + byte_idx, towupper (wc), &prev_st); else memcpy (pstr->mbs + byte_idx, pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); pstr->wcs[byte_idx++] = iswlower (wc) ? toupper (wc) : wc; /* Write paddings. */ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } } pstr->valid_len = byte_idx; } /* Skip characters until the index becomes greater than NEW_RAW_IDX. Return the index. */ static int re_string_skip_chars (pstr, new_raw_idx, last_wc) re_string_t *pstr; int new_raw_idx; wint_t *last_wc; { mbstate_t prev_st; int rawbuf_idx, mbclen; wchar_t wc = 0; /* Skip the characters which are not necessary to check. */ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_len; rawbuf_idx < new_raw_idx;) { int remain_len; remain_len = pstr->len - rawbuf_idx; prev_st = pstr->cur_state; mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx, remain_len, &pstr->cur_state); if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) { /* We treat these cases as a singlebyte character. */ mbclen = 1; pstr->cur_state = prev_st; } /* Then proceed the next character. */ rawbuf_idx += mbclen; } *last_wc = (wint_t) wc; return rawbuf_idx; } #endif /* RE_ENABLE_I18N */ /* Build the buffer PSTR->MBS, and apply the translation if we need. This function is used in case of REG_ICASE. */ static void build_upper_buffer (pstr) re_string_t *pstr; { int char_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; if (pstr->trans != NULL) { ch = pstr->trans[ch]; pstr->mbs_case[char_idx] = ch; } if (islower (ch)) pstr->mbs[char_idx] = toupper (ch); else pstr->mbs[char_idx] = ch; } pstr->valid_len = char_idx; } /* Apply TRANS to the buffer in PSTR. */ static void re_string_translate_buffer (pstr) re_string_t *pstr; { int buf_idx, end_idx; end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) { int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; pstr->mbs_case[buf_idx] = pstr->trans[ch]; } pstr->valid_len = buf_idx; } /* This function re-construct the buffers. Concretely, convert to wide character in case of re_mb_cur_max > 1, convert to upper case in case of REG_ICASE, apply translation. */ static reg_errcode_t re_string_reconstruct (pstr, idx, eflags, newline) re_string_t *pstr; int idx, eflags, newline; { int offset = idx - pstr->raw_mbs_idx; if (offset < 0) { /* Reset buffer. */ #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); #endif /* RE_ENABLE_I18N */ pstr->len += pstr->raw_mbs_idx; pstr->stop += pstr->raw_mbs_idx; pstr->valid_len = pstr->raw_mbs_idx = 0; pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); if (!MBS_CASE_ALLOCATED (pstr)) pstr->mbs_case = (unsigned char *) pstr->raw_mbs; if (!MBS_ALLOCATED (pstr) && !MBS_CASE_ALLOCATED (pstr)) pstr->mbs = (unsigned char *) pstr->raw_mbs; offset = idx; } if (offset != 0) { /* Are the characters which are already checked remain? */ if (offset < pstr->valid_len) { /* Yes, move them to the front of the buffer. */ pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags, newline); #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) memmove (pstr->wcs, pstr->wcs + offset, (pstr->valid_len - offset) * sizeof (wint_t)); #endif /* RE_ENABLE_I18N */ if (MBS_ALLOCATED (pstr)) memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); if (MBS_CASE_ALLOCATED (pstr)) memmove (pstr->mbs_case, pstr->mbs_case + offset, pstr->valid_len - offset); pstr->valid_len -= offset; #if DEBUG assert (pstr->valid_len > 0); #endif } else { /* No, skip all characters until IDX. */ pstr->valid_len = 0; #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { int wcs_idx; wint_t wc; pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) pstr->wcs[wcs_idx] = WEOF; if (pstr->trans && wc <= 0xff) wc = pstr->trans[wc]; pstr->tip_context = (IS_WIDE_WORD_CHAR (wc) ? CONTEXT_WORD : ((newline && IS_WIDE_NEWLINE (wc)) ? CONTEXT_NEWLINE : 0)); } else #endif /* RE_ENABLE_I18N */ { int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; if (pstr->trans) c = pstr->trans[c]; pstr->tip_context = (IS_WORD_CHAR (c) ? CONTEXT_WORD : ((newline && IS_NEWLINE (c)) ? CONTEXT_NEWLINE : 0)); } } if (!MBS_CASE_ALLOCATED (pstr)) { pstr->mbs_case += offset; /* In case of !MBS_ALLOCATED && !MBS_CASE_ALLOCATED. */ if (!MBS_ALLOCATED (pstr)) pstr->mbs += offset; } } pstr->raw_mbs_idx = idx; pstr->len -= offset; pstr->stop -= offset; /* Then build the buffers. */ #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { if (pstr->icase) build_wcs_upper_buffer (pstr); else build_wcs_buffer (pstr); } else #endif /* RE_ENABLE_I18N */ { if (pstr->icase) build_upper_buffer (pstr); else if (pstr->trans != NULL) re_string_translate_buffer (pstr); } pstr->cur_idx = 0; return REG_NOERROR; } static void re_string_destruct (pstr) re_string_t *pstr; { #ifdef RE_ENABLE_I18N re_free (pstr->wcs); #endif /* RE_ENABLE_I18N */ if (MBS_ALLOCATED (pstr)) re_free (pstr->mbs); if (MBS_CASE_ALLOCATED (pstr)) re_free (pstr->mbs_case); } /* Return the context at IDX in INPUT. */ static unsigned int re_string_context_at (input, idx, eflags, newline_anchor) const re_string_t *input; int idx, eflags, newline_anchor; { int c; if (idx < 0 || idx == input->len) { if (idx < 0) /* In this case, we use the value stored in input->tip_context, since we can't know the character in input->mbs[-1] here. */ return input->tip_context; else /* (idx == input->len) */ return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF : CONTEXT_NEWLINE | CONTEXT_ENDBUF); } #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) { wint_t wc; int wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { #ifdef DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif --wc_idx; if (wc_idx < 0) return input->tip_context; } wc = input->wcs[wc_idx]; if (IS_WIDE_WORD_CHAR (wc)) return CONTEXT_WORD; return (newline_anchor && IS_WIDE_NEWLINE (wc)) ? CONTEXT_NEWLINE : 0; } else #endif { c = re_string_byte_at (input, idx); if (IS_WORD_CHAR (c)) return CONTEXT_WORD; return (newline_anchor && IS_NEWLINE (c)) ? CONTEXT_NEWLINE : 0; } } /* Functions for set operation. */ static reg_errcode_t re_node_set_alloc (set, size) re_node_set *set; int size; { set->alloc = size; set->nelem = 0; set->elems = re_malloc (int, size); if (BE (set->elems == NULL, 0)) return REG_ESPACE; return REG_NOERROR; } static reg_errcode_t re_node_set_init_1 (set, elem) re_node_set *set; int elem; { set->alloc = 1; set->nelem = 1; set->elems = re_malloc (int, 1); if (BE (set->elems == NULL, 0)) { set->alloc = set->nelem = 0; return REG_ESPACE; } set->elems[0] = elem; return REG_NOERROR; } static reg_errcode_t re_node_set_init_2 (set, elem1, elem2) re_node_set *set; int elem1, elem2; { set->alloc = 2; set->elems = re_malloc (int, 2); if (BE (set->elems == NULL, 0)) return REG_ESPACE; if (elem1 == elem2) { set->nelem = 1; set->elems[0] = elem1; } else { set->nelem = 2; if (elem1 < elem2) { set->elems[0] = elem1; set->elems[1] = elem2; } else { set->elems[0] = elem2; set->elems[1] = elem1; } } return REG_NOERROR; } static reg_errcode_t re_node_set_init_copy (dest, src) re_node_set *dest; const re_node_set *src; { dest->nelem = src->nelem; if (src->nelem > 0) { dest->alloc = dest->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) { dest->alloc = dest->nelem = 0; return REG_ESPACE; } memcpy (dest->elems, src->elems, src->nelem * sizeof (int)); } else re_node_set_init_empty (dest); return REG_NOERROR; } /* Calculate the intersection of the sets SRC1 and SRC2. And merge it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. Note: We assume dest->elems is NULL, when dest->alloc is 0. */ static reg_errcode_t re_node_set_add_intersect (dest, src1, src2) re_node_set *dest; const re_node_set *src1, *src2; { int i1, i2, id; if (src1->nelem > 0 && src2->nelem > 0) { if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) { dest->alloc = src1->nelem + src2->nelem + dest->nelem; dest->elems = re_realloc (dest->elems, int, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } } else return REG_NOERROR; for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { ++i2; continue; } if (src1->elems[i1] == src2->elems[i2]) { while (id < dest->nelem && dest->elems[id] < src2->elems[i2]) ++id; if (id < dest->nelem && dest->elems[id] == src2->elems[i2]) ++id; else { memmove (dest->elems + id + 1, dest->elems + id, sizeof (int) * (dest->nelem - id)); dest->elems[id++] = src2->elems[i2++]; ++dest->nelem; } } ++i1; } return REG_NOERROR; } /* Calculate the union set of the sets SRC1 and SRC2. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t re_node_set_init_union (dest, src1, src2) re_node_set *dest; const re_node_set *src1, *src2; { int i1, i2, id; if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) { dest->alloc = src1->nelem + src2->nelem; dest->elems = re_malloc (int, dest->alloc); if (BE (dest->elems == NULL, 0)) return REG_ESPACE; } else { if (src1 != NULL && src1->nelem > 0) return re_node_set_init_copy (dest, src1); else if (src2 != NULL && src2->nelem > 0) return re_node_set_init_copy (dest, src2); else re_node_set_init_empty (dest); return REG_NOERROR; } for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) { if (src1->elems[i1] > src2->elems[i2]) { dest->elems[id++] = src2->elems[i2++]; continue; } if (src1->elems[i1] == src2->elems[i2]) ++i2; dest->elems[id++] = src1->elems[i1++]; } if (i1 < src1->nelem) { memcpy (dest->elems + id, src1->elems + i1, (src1->nelem - i1) * sizeof (int)); id += src1->nelem - i1; } else if (i2 < src2->nelem) { memcpy (dest->elems + id, src2->elems + i2, (src2->nelem - i2) * sizeof (int)); id += src2->nelem - i2; } dest->nelem = id; return REG_NOERROR; } /* Calculate the union set of the sets DEST and SRC. And store it to DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ static reg_errcode_t re_node_set_merge (dest, src) re_node_set *dest; const re_node_set *src; { int si, di; if (src == NULL || src->nelem == 0) return REG_NOERROR; if (dest->alloc < src->nelem + dest->nelem) { int *new_buffer; dest->alloc = 2 * (src->nelem + dest->alloc); new_buffer = re_realloc (dest->elems, int, dest->alloc); if (BE (new_buffer == NULL, 0)) return REG_ESPACE; dest->elems = new_buffer; } for (si = 0, di = 0 ; si < src->nelem && di < dest->nelem ;) { int cp_from, ncp, mid, right, src_elem = src->elems[si]; /* Binary search the spot we will add the new element. */ right = dest->nelem; while (di < right) { mid = (di + right) / 2; if (dest->elems[mid] < src_elem) di = mid + 1; else right = mid; } if (di >= dest->nelem) break; if (dest->elems[di] == src_elem) { /* Skip since, DEST already has the element. */ ++di; ++si; continue; } /* Skip the src elements which are less than dest->elems[di]. */ cp_from = si; while (si < src->nelem && src->elems[si] < dest->elems[di]) ++si; /* Copy these src elements. */ ncp = si - cp_from; memmove (dest->elems + di + ncp, dest->elems + di, sizeof (int) * (dest->nelem - di)); memcpy (dest->elems + di, src->elems + cp_from, sizeof (int) * ncp); /* Update counters. */ di += ncp; dest->nelem += ncp; } /* Copy remaining src elements. */ if (si < src->nelem) { memcpy (dest->elems + di, src->elems + si, sizeof (int) * (src->nelem - si)); dest->nelem += src->nelem - si; } return REG_NOERROR; } /* Insert the new element ELEM to the re_node_set* SET. return 0 if SET already has ELEM, return -1 if an error is occured, return 1 otherwise. */ static int re_node_set_insert (set, elem) re_node_set *set; int elem; { int idx, right, mid; /* In case of the set is empty. */ if (set->elems == NULL || set->alloc == 0) { if (BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1)) return 1; else return -1; } /* Binary search the spot we will add the new element. */ idx = 0; right = set->nelem; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } /* Realloc if we need. */ if (set->alloc < set->nelem + 1) { int *new_array; set->alloc = set->alloc * 2; new_array = re_malloc (int, set->alloc); if (BE (new_array == NULL, 0)) return -1; /* Copy the elements they are followed by the new element. */ if (idx > 0) memcpy (new_array, set->elems, sizeof (int) * (idx)); /* Copy the elements which follows the new element. */ if (set->nelem - idx > 0) memcpy (new_array + idx + 1, set->elems + idx, sizeof (int) * (set->nelem - idx)); re_free (set->elems); set->elems = new_array; } else { /* Move the elements which follows the new element. */ if (set->nelem - idx > 0) memmove (set->elems + idx + 1, set->elems + idx, sizeof (int) * (set->nelem - idx)); } /* Insert the new element. */ set->elems[idx] = elem; ++set->nelem; return 1; } /* Compare two node sets SET1 and SET2. return 1 if SET1 and SET2 are equivalent, retrun 0 otherwise. */ static int re_node_set_compare (set1, set2) const re_node_set *set1, *set2; { int i; if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) return 0; for (i = 0 ; i < set1->nelem ; i++) if (set1->elems[i] != set2->elems[i]) return 0; return 1; } /* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ static int re_node_set_contains (set, elem) const re_node_set *set; int elem; { int idx, right, mid; if (set->nelem <= 0) return 0; /* Binary search the element. */ idx = 0; right = set->nelem - 1; while (idx < right) { mid = (idx + right) / 2; if (set->elems[mid] < elem) idx = mid + 1; else right = mid; } return set->elems[idx] == elem ? idx + 1 : 0; } static void re_node_set_remove_at (set, idx) re_node_set *set; int idx; { if (idx < 0 || idx >= set->nelem) return; if (idx < set->nelem - 1) memmove (set->elems + idx, set->elems + idx + 1, sizeof (int) * (set->nelem - idx - 1)); --set->nelem; } /* Add the token TOKEN to dfa->nodes, and return the index of the token. Or return -1, if an error will be occured. */ static int re_dfa_add_node (dfa, token, mode) re_dfa_t *dfa; re_token_t token; int mode; { if (dfa->nodes_len >= dfa->nodes_alloc) { re_token_t *new_array; dfa->nodes_alloc *= 2; new_array = re_realloc (dfa->nodes, re_token_t, dfa->nodes_alloc); if (BE (new_array == NULL, 0)) return -1; else dfa->nodes = new_array; if (mode) { int *new_nexts, *new_indices; re_node_set *new_edests, *new_eclosures, *new_inveclosures; new_nexts = re_realloc (dfa->nexts, int, dfa->nodes_alloc); new_indices = re_realloc (dfa->org_indices, int, dfa->nodes_alloc); new_edests = re_realloc (dfa->edests, re_node_set, dfa->nodes_alloc); new_eclosures = re_realloc (dfa->eclosures, re_node_set, dfa->nodes_alloc); new_inveclosures = re_realloc (dfa->inveclosures, re_node_set, dfa->nodes_alloc); if (BE (new_nexts == NULL || new_indices == NULL || new_edests == NULL || new_eclosures == NULL || new_inveclosures == NULL, 0)) return -1; dfa->nexts = new_nexts; dfa->org_indices = new_indices; dfa->edests = new_edests; dfa->eclosures = new_eclosures; dfa->inveclosures = new_inveclosures; } } dfa->nodes[dfa->nodes_len] = token; dfa->nodes[dfa->nodes_len].duplicated = 0; dfa->nodes[dfa->nodes_len].constraint = 0; return dfa->nodes_len++; } static unsigned int inline calc_state_hash (nodes, context) const re_node_set *nodes; unsigned int context; { unsigned int hash = nodes->nelem + context; int i; for (i = 0 ; i < nodes->nelem ; i++) hash += nodes->elems[i]; return hash; } /* Search for the state whose node_set is equivalent to NODES. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t* re_acquire_state (err, dfa, nodes) reg_errcode_t *err; re_dfa_t *dfa; const re_node_set *nodes; { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (BE (nodes->nelem == 0, 0)) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, 0); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (&state->nodes, nodes)) return state; } /* There are no appropriate state in the dfa, create the new one. */ new_state = create_ci_newstate (dfa, nodes, hash); if (BE (new_state != NULL, 1)) return new_state; else { *err = REG_ESPACE; return NULL; } } /* Search for the state whose node_set is equivalent to NODES and whose context is equivalent to CONTEXT. Return the pointer to the state, if we found it in the DFA. Otherwise create the new one and return it. In case of an error return NULL and set the error code in ERR. Note: - We assume NULL as the invalid state, then it is possible that return value is NULL and ERR is REG_NOERROR. - We never return non-NULL value in case of any errors, it is for optimization. */ static re_dfastate_t* re_acquire_state_context (err, dfa, nodes, context) reg_errcode_t *err; re_dfa_t *dfa; const re_node_set *nodes; unsigned int context; { unsigned int hash; re_dfastate_t *new_state; struct re_state_table_entry *spot; int i; if (nodes->nelem == 0) { *err = REG_NOERROR; return NULL; } hash = calc_state_hash (nodes, context); spot = dfa->state_table + (hash & dfa->state_hash_mask); for (i = 0 ; i < spot->num ; i++) { re_dfastate_t *state = spot->array[i]; if (hash != state->hash) continue; if (re_node_set_compare (state->entrance_nodes, nodes) && state->context == context) return state; } /* There are no appropriate state in `dfa', create the new one. */ new_state = create_cd_newstate (dfa, nodes, context, hash); if (BE (new_state != NULL, 1)) return new_state; else { *err = REG_ESPACE; return NULL; } } /* Allocate memory for DFA state and initialize common properties. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * create_newstate_common (dfa, nodes, hash) re_dfa_t *dfa; const re_node_set *nodes; unsigned int hash; { re_dfastate_t *newstate; reg_errcode_t err; newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); if (BE (newstate == NULL, 0)) return NULL; err = re_node_set_init_copy (&newstate->nodes, nodes); if (BE (err != REG_NOERROR, 0)) { re_free (newstate); return NULL; } newstate->trtable = NULL; newstate->trtable_search = NULL; newstate->hash = hash; return newstate; } /* Store the new state NEWSTATE whose hash value is HASH in appropriate position. Return value indicate the error code if failed. */ static reg_errcode_t register_state (dfa, newstate, hash) re_dfa_t *dfa; re_dfastate_t *newstate; unsigned int hash; { struct re_state_table_entry *spot; spot = dfa->state_table + (hash & dfa->state_hash_mask); if (spot->alloc <= spot->num) { re_dfastate_t **new_array; spot->alloc = 2 * spot->num + 2; new_array = re_realloc (spot->array, re_dfastate_t *, spot->alloc); if (BE (new_array == NULL, 0)) return REG_ESPACE; spot->array = new_array; } spot->array[spot->num++] = newstate; return REG_NOERROR; } /* Create the new state which is independ of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * create_ci_newstate (dfa, nodes, hash) re_dfa_t *dfa; const re_node_set *nodes; unsigned int hash; { int i; reg_errcode_t err; re_dfastate_t *newstate; newstate = create_newstate_common (dfa, nodes, hash); if (BE (newstate == NULL, 0)) return NULL; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (type == CHARACTER && !node->constraint) continue; /* If the state has the halt node, the state is a halt state. */ else if (type == END_OF_RE) newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET || (type == OP_PERIOD && re_mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR || node->constraint) newstate->has_constraint = 1; } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } /* Create the new state which is depend on the context CONTEXT. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * create_cd_newstate (dfa, nodes, context, hash) re_dfa_t *dfa; const re_node_set *nodes; unsigned int context, hash; { int i, nctx_nodes = 0; reg_errcode_t err; re_dfastate_t *newstate; newstate = create_newstate_common (dfa, nodes, hash); if (BE (newstate == NULL, 0)) return NULL; newstate->context = context; newstate->entrance_nodes = &newstate->nodes; for (i = 0 ; i < nodes->nelem ; i++) { unsigned int constraint = 0; re_token_t *node = dfa->nodes + nodes->elems[i]; re_token_type_t type = node->type; if (node->constraint) constraint = node->constraint; if (type == CHARACTER && !constraint) continue; /* If the state has the halt node, the state is a halt state. */ else if (type == END_OF_RE) newstate->halt = 1; #ifdef RE_ENABLE_I18N else if (type == COMPLEX_BRACKET || (type == OP_PERIOD && re_mb_cur_max > 1)) newstate->accept_mb = 1; #endif /* RE_ENABLE_I18N */ else if (type == OP_BACK_REF) newstate->has_backref = 1; else if (type == ANCHOR) constraint = node->opr.ctx_type; if (constraint) { if (newstate->entrance_nodes == &newstate->nodes) { newstate->entrance_nodes = re_malloc (re_node_set, 1); if (BE (newstate->entrance_nodes == NULL, 0)) { free_state (newstate); return NULL; } re_node_set_init_copy (newstate->entrance_nodes, nodes); nctx_nodes = 0; newstate->has_constraint = 1; } if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) { re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); ++nctx_nodes; } } } err = register_state (dfa, newstate, hash); if (BE (err != REG_NOERROR, 0)) { free_state (newstate); newstate = NULL; } return newstate; } static void free_state (state) re_dfastate_t *state; { if (state->entrance_nodes != &state->nodes) { re_node_set_free (state->entrance_nodes); re_free (state->entrance_nodes); } re_node_set_free (&state->nodes); re_free (state->trtable); re_free (state->trtable_search); re_free (state); } EOF echo - 'regex_internal.h' cat << 'EOF' > 'regex_internal.h' /* Extended regular expression matching and search library. Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #if 0 /* Don't include this here. On some systems it sets RE_DUP_MAX to a * lower value than GNU regex allows. Instead, include it in * regex.c, before include of , which correctly * #undefs RE_DUP_MAX and sets it to the right value. */ #include #endif #include #include #include #if defined HAVE_LOCALE_H || defined _LIBC # include #endif #if defined HAVE_WCHAR_H || defined _LIBC # include #endif /* HAVE_WCHAR_H || _LIBC */ #if defined HAVE_WCTYPE_H || defined _LIBC # include #endif /* HAVE_WCTYPE_H || _LIBC */ /* In case that the system doesn't have isblank(). */ #if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank # define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif #ifdef _LIBC # ifndef _RE_DEFINE_LOCALE_FUNCTIONS # define _RE_DEFINE_LOCALE_FUNCTIONS 1 # include # include # include # endif #endif /* This is for other GNU distributions with internationalized messages. */ #if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC # include # ifdef _LIBC # undef gettext # define gettext(msgid) \ INTUSE(__dcgettext) (INTUSE(_libc_intl_domainname), msgid, LC_MESSAGES) # endif #else # define gettext(msgid) (msgid) #endif #ifndef gettext_noop /* This define is so xgettext can find the internationalizable strings. */ # define gettext_noop(String) String #endif #if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC # define RE_ENABLE_I18N #endif #if __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # define inline #endif /* Number of bits in a byte. */ #define BYTE_BITS 8 /* Number of single byte character. */ #define SBC_MAX 256 #define COLL_ELEM_LEN_MAX 8 /* The character which represents newline. */ #define NEWLINE_CHAR '\n' #define WIDE_NEWLINE_CHAR L'\n' /* Rename to standard API for using out of glibc. */ #ifndef _LIBC # define __wctype wctype # define __iswctype iswctype # define __btowc btowc # define __wcrtomb wcrtomb # define attribute_hidden # define __thread #endif /* not _LIBC */ #if _LIBC || __GNUC__ >= 3 # define BE(expr, val) __builtin_expect (expr, val) #else # define BE(expr, val) (expr) # define inline #endif #ifdef RE_ENABLE_I18N __thread int re_mb_cur_max = 1; #endif extern const char __re_error_msgid[] attribute_hidden; extern const size_t __re_error_msgid_idx[] attribute_hidden; /* Number of bits in an unsinged int. */ #define UINT_BITS (sizeof (unsigned int) * BYTE_BITS) /* Number of unsigned int in an bit_set. */ #define BITSET_UINTS ((SBC_MAX + UINT_BITS - 1) / UINT_BITS) typedef unsigned int bitset[BITSET_UINTS]; typedef unsigned int *re_bitset_ptr_t; #define bitset_set(set,i) (set[i / UINT_BITS] |= 1UL << i % UINT_BITS) #define bitset_clear(set,i) (set[i / UINT_BITS] &= ~(1UL << i % UINT_BITS)) #define bitset_contain(set,i) (set[i / UINT_BITS] & (1UL << i % UINT_BITS)) #define bitset_empty(set) memset (set, 0, sizeof (unsigned int) * BITSET_UINTS) #define bitset_set_all(set) \ memset (set, 255, sizeof (unsigned int) * BITSET_UINTS) #define bitset_copy(dest,src) \ memcpy (dest, src, sizeof (unsigned int) * BITSET_UINTS) static inline void bitset_not _RE_ARGS((bitset set)); static inline void bitset_merge _RE_ARGS((bitset dest, const bitset src)); static inline void bitset_not_merge _RE_ARGS((bitset dest, const bitset src)); #define PREV_WORD_CONSTRAINT 0x0001 #define PREV_NOTWORD_CONSTRAINT 0x0002 #define NEXT_WORD_CONSTRAINT 0x0004 #define NEXT_NOTWORD_CONSTRAINT 0x0008 #define PREV_NEWLINE_CONSTRAINT 0x0010 #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 #define DUMMY_CONSTRAINT 0x0100 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, WORD_DELIM = DUMMY_CONSTRAINT } re_context_type; typedef struct { int alloc; int nelem; int *elems; } re_node_set; typedef enum { NON_TYPE = 0, /* Token type, these are used only by token. */ OP_OPEN_BRACKET, OP_CLOSE_BRACKET, OP_CHARSET_RANGE, OP_OPEN_DUP_NUM, OP_CLOSE_DUP_NUM, OP_NON_MATCH_LIST, OP_OPEN_COLL_ELEM, OP_CLOSE_COLL_ELEM, OP_OPEN_EQUIV_CLASS, OP_CLOSE_EQUIV_CLASS, OP_OPEN_CHAR_CLASS, OP_CLOSE_CHAR_CLASS, OP_WORD, OP_NOTWORD, BACK_SLASH, /* Tree type, these are used only by tree. */ CONCAT, ALT, SUBEXP, SIMPLE_BRACKET, #ifdef RE_ENABLE_I18N COMPLEX_BRACKET, #endif /* RE_ENABLE_I18N */ /* Node type, These are used by token, node, tree. */ OP_OPEN_SUBEXP, OP_CLOSE_SUBEXP, OP_PERIOD, CHARACTER, END_OF_RE, OP_ALT, OP_DUP_ASTERISK, OP_DUP_PLUS, OP_DUP_QUESTION, OP_BACK_REF, ANCHOR, /* Dummy marker. */ END_OF_RE_TOKEN_T } re_token_type_t; #ifdef RE_ENABLE_I18N typedef struct { /* Multibyte characters. */ wchar_t *mbchars; /* Collating symbols. */ # ifdef _LIBC int32_t *coll_syms; # endif /* Equivalence classes. */ # ifdef _LIBC int32_t *equiv_classes; # endif /* Range expressions. */ # ifdef _LIBC uint32_t *range_starts; uint32_t *range_ends; # else /* not _LIBC */ wchar_t *range_starts; wchar_t *range_ends; # endif /* not _LIBC */ /* Character classes. */ wctype_t *char_classes; /* If this character set is the non-matching list. */ unsigned int non_match : 1; /* # of multibyte characters. */ int nmbchars; /* # of collating symbols. */ int ncoll_syms; /* # of equivalence classes. */ int nequiv_classes; /* # of range expressions. */ int nranges; /* # of character classes. */ int nchar_classes; } re_charset_t; #endif /* RE_ENABLE_I18N */ typedef struct { union { unsigned char c; /* for CHARACTER */ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ #ifdef RE_ENABLE_I18N re_charset_t *mbcset; /* for COMPLEX_BRACKET */ #endif /* RE_ENABLE_I18N */ int idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; #if __GNUC__ >= 2 re_token_type_t type : 8; #else re_token_type_t type; #endif unsigned int constraint : 10; /* context constraint */ unsigned int duplicated : 1; #ifdef RE_ENABLE_I18N unsigned int mb_partial : 1; #endif } re_token_t; #define IS_EPSILON_NODE(type) \ ((type) == OP_ALT || (type) == OP_DUP_ASTERISK || (type) == OP_DUP_PLUS \ || (type) == OP_DUP_QUESTION || (type) == ANCHOR \ || (type) == OP_OPEN_SUBEXP || (type) == OP_CLOSE_SUBEXP) #define ACCEPT_MB_NODE(type) \ ((type) == COMPLEX_BRACKET || (type) == OP_PERIOD) struct re_string_t { /* Indicate the raw buffer which is the original string passed as an argument of regexec(), re_search(), etc.. */ const unsigned char *raw_mbs; /* Store the multibyte string. In case of "case insensitive mode" like REG_ICASE, upper cases of the string are stored, otherwise MBS points the same address that RAW_MBS points. */ unsigned char *mbs; /* Store the case sensitive multibyte string. In case of "case insensitive mode", the original string are stored, otherwise MBS_CASE points the same address that MBS points. */ unsigned char *mbs_case; #ifdef RE_ENABLE_I18N /* Store the wide character string which is corresponding to MBS. */ wint_t *wcs; mbstate_t cur_state; #endif /* Index in RAW_MBS. Each character mbs[i] corresponds to raw_mbs[raw_mbs_idx + i]. */ int raw_mbs_idx; /* The length of the valid characters in the buffers. */ int valid_len; /* The length of the buffers MBS, MBS_CASE, and WCS. */ int bufs_len; /* The index in MBS, which is updated by re_string_fetch_byte. */ int cur_idx; /* This is length_of_RAW_MBS - RAW_MBS_IDX. */ int len; /* End of the buffer may be shorter than its length in the cases such as re_match_2, re_search_2. Then, we use STOP for end of the buffer instead of LEN. */ int stop; /* The context of mbs[0]. We store the context independently, since the context of mbs[0] may be different from raw_mbs[0], which is the beginning of the input string. */ unsigned int tip_context; /* The translation passed as a part of an argument of re_compile_pattern. */ RE_TRANSLATE_TYPE trans; /* 1 if REG_ICASE. */ unsigned int icase : 1; }; typedef struct re_string_t re_string_t; /* In case of REG_ICASE, we allocate the buffer dynamically for mbs. */ #define MBS_ALLOCATED(pstr) (pstr->icase) /* In case that we need translation, we allocate the buffer dynamically for mbs_case. Note that mbs == mbs_case if not REG_ICASE. */ #define MBS_CASE_ALLOCATED(pstr) (pstr->trans != NULL) static reg_errcode_t re_string_allocate _RE_ARGS((re_string_t *pstr, const char *str, int len, int init_len, RE_TRANSLATE_TYPE trans, int icase)); static reg_errcode_t re_string_construct _RE_ARGS((re_string_t *pstr, const char *str, int len, RE_TRANSLATE_TYPE trans, int icase)); static reg_errcode_t re_string_reconstruct _RE_ARGS((re_string_t *pstr, int idx, int eflags, int newline)); static reg_errcode_t re_string_realloc_buffers _RE_ARGS((re_string_t *pstr, int new_buf_len)); #ifdef RE_ENABLE_I18N static void build_wcs_buffer _RE_ARGS((re_string_t *pstr)); static void build_wcs_upper_buffer _RE_ARGS((re_string_t *pstr)); #endif /* RE_ENABLE_I18N */ static void build_upper_buffer _RE_ARGS((re_string_t *pstr)); static void re_string_translate_buffer _RE_ARGS((re_string_t *pstr)); static void re_string_destruct _RE_ARGS((re_string_t *pstr)); #ifdef RE_ENABLE_I18N static int re_string_elem_size_at _RE_ARGS((const re_string_t *pstr, int idx)); static inline int re_string_char_size_at _RE_ARGS((const re_string_t *pstr, int idx)); static inline wint_t re_string_wchar_at _RE_ARGS((const re_string_t *pstr, int idx)); #endif /* RE_ENABLE_I18N */ static unsigned int re_string_context_at _RE_ARGS((const re_string_t *input, int idx, int eflags, int newline_anchor)); #define re_string_peek_byte(pstr, offset) \ ((pstr)->mbs[(pstr)->cur_idx + offset]) #define re_string_peek_byte_case(pstr, offset) \ ((pstr)->mbs_case[(pstr)->cur_idx + offset]) #define re_string_fetch_byte(pstr) \ ((pstr)->mbs[(pstr)->cur_idx++]) #define re_string_fetch_byte_case(pstr) \ ((pstr)->mbs_case[(pstr)->cur_idx++]) #define re_string_first_byte(pstr, idx) \ ((idx) == (pstr)->len || (pstr)->wcs[idx] != WEOF) #define re_string_is_single_byte_char(pstr, idx) \ ((pstr)->wcs[idx] != WEOF && ((pstr)->len == (idx) \ || (pstr)->wcs[(idx) + 1] != WEOF)) #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) #define re_string_cur_idx(pstr) ((pstr)->cur_idx) #define re_string_get_buffer(pstr) ((pstr)->mbs) #define re_string_length(pstr) ((pstr)->len) #define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) #define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) #define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) #define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) #define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) #define re_free(p) free (p) struct bin_tree_t { struct bin_tree_t *parent; struct bin_tree_t *left; struct bin_tree_t *right; /* `node_idx' is the index in dfa->nodes, if `type' == 0. Otherwise `type' indicate the type of this node. */ re_token_type_t type; int node_idx; int first; int next; re_node_set eclosure; }; typedef struct bin_tree_t bin_tree_t; #define CONTEXT_WORD 1 #define CONTEXT_NEWLINE (CONTEXT_WORD << 1) #define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) #define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) #define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) #define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) #define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) #define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) #define IS_ORDINARY_CONTEXT(c) ((c) == 0) #define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') #define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) #define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') #define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) #define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) #define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) struct re_dfastate_t { unsigned int hash; re_node_set nodes; re_node_set *entrance_nodes; struct re_dfastate_t **trtable; struct re_dfastate_t **trtable_search; /* If this state is a special state. A state is a special state if the state is the halt state, or a anchor. */ unsigned int context : 2; unsigned int halt : 1; /* If this state can accept `multi byte'. Note that we refer to multibyte characters, and multi character collating elements as `multi byte'. */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; unsigned int has_constraint : 1; }; typedef struct re_dfastate_t re_dfastate_t; typedef struct { /* start <= node < end */ int start; int end; } re_subexp_t; struct re_state_table_entry { int num; int alloc; re_dfastate_t **array; }; /* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ typedef struct { int next_idx; int alloc; re_dfastate_t **array; } state_array_t; /* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ typedef struct { int node; int str_idx; /* The position NODE match at. */ state_array_t path; } re_sub_match_last_t; /* Store information about the node NODE whose type is OP_OPEN_SUBEXP. And information about the node, whose type is OP_CLOSE_SUBEXP, corresponding to NODE is stored in LASTS. */ typedef struct { int str_idx; int node; int next_last_offset; state_array_t *path; int alasts; /* Allocation size of LASTS. */ int nlasts; /* The number of LASTS. */ re_sub_match_last_t **lasts; } re_sub_match_top_t; struct re_backref_cache_entry { int node; int str_idx; int subexp_from; int subexp_to; int flag; }; typedef struct { /* EFLAGS of the argument of regexec. */ int eflags; /* Where the matching ends. */ int match_last; int last_node; /* The string object corresponding to the input string. */ re_string_t *input; /* The state log used by the matcher. */ re_dfastate_t **state_log; int state_log_top; /* Back reference cache. */ int nbkref_ents; int abkref_ents; struct re_backref_cache_entry *bkref_ents; int max_mb_elem_len; int nsub_tops; int asub_tops; re_sub_match_top_t **sub_tops; } re_match_context_t; typedef struct { int cur_bkref; int cls_subexp_idx; re_dfastate_t **sifted_states; re_dfastate_t **limited_states; re_node_set limits; int last_node; int last_str_idx; int check_subexp; } re_sift_context_t; struct re_fail_stack_ent_t { int idx; int node; regmatch_t *regs; re_node_set eps_via_nodes; }; struct re_fail_stack_t { int num; int alloc; struct re_fail_stack_ent_t *stack; }; struct re_dfa_t { re_bitset_ptr_t word_char; /* number of subexpressions `re_nsub' is in regex_t. */ int subexps_alloc; re_subexp_t *subexps; re_token_t *nodes; int nodes_alloc; int nodes_len; bin_tree_t *str_tree; int *nexts; int *org_indices; re_node_set *edests; re_node_set *eclosures; re_node_set *inveclosures; struct re_state_table_entry *state_table; unsigned int state_hash_mask; re_dfastate_t *init_state; re_dfastate_t *init_state_word; re_dfastate_t *init_state_nl; re_dfastate_t *init_state_begbuf; int states_alloc; int init_node; int nbackref; /* The number of backreference in this dfa. */ /* Bitmap expressing which backreference is used. */ unsigned int used_bkref_map; #ifdef DEBUG char* re_str; #endif unsigned int has_plural_match : 1; /* If this dfa has "multibyte node", which is a backreference or a node which can accept multibyte character or multi character collating element. */ unsigned int has_mb_node : 1; }; typedef struct re_dfa_t re_dfa_t; static reg_errcode_t re_node_set_alloc _RE_ARGS((re_node_set *set, int size)); static reg_errcode_t re_node_set_init_1 _RE_ARGS((re_node_set *set, int elem)); static reg_errcode_t re_node_set_init_2 _RE_ARGS((re_node_set *set, int elem1, int elem2)); #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) static reg_errcode_t re_node_set_init_copy _RE_ARGS((re_node_set *dest, const re_node_set *src)); static reg_errcode_t re_node_set_add_intersect _RE_ARGS((re_node_set *dest, const re_node_set *src1, const re_node_set *src2)); static reg_errcode_t re_node_set_init_union _RE_ARGS((re_node_set *dest, const re_node_set *src1, const re_node_set *src2)); static reg_errcode_t re_node_set_merge _RE_ARGS((re_node_set *dest, const re_node_set *src)); static int re_node_set_insert _RE_ARGS((re_node_set *set, int elem)); static int re_node_set_compare _RE_ARGS((const re_node_set *set1, const re_node_set *set2)); static int re_node_set_contains _RE_ARGS((const re_node_set *set, int elem)); static void re_node_set_remove_at _RE_ARGS((re_node_set *set, int idx)); #define re_node_set_remove(set,id) \ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) #define re_node_set_empty(p) ((p)->nelem = 0) #define re_node_set_free(set) re_free ((set)->elems) static int re_dfa_add_node _RE_ARGS((re_dfa_t *dfa, re_token_t token, int mode)); static re_dfastate_t *re_acquire_state _RE_ARGS((reg_errcode_t *err, re_dfa_t *dfa, const re_node_set *nodes)); static re_dfastate_t *re_acquire_state_context _RE_ARGS((reg_errcode_t *err, re_dfa_t *dfa, const re_node_set *nodes, unsigned int context)); static void free_state _RE_ARGS((re_dfastate_t *state)); typedef enum { SB_CHAR, MB_CHAR, EQUIV_CLASS, COLL_SYM, CHAR_CLASS } bracket_elem_type; typedef struct { bracket_elem_type type; union { unsigned char ch; unsigned char *name; wchar_t wch; } opr; } bracket_elem_t; /* Inline functions for bitset operation. */ static inline void bitset_not (set) bitset set; { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_UINTS; ++bitset_i) set[bitset_i] = ~set[bitset_i]; } static inline void bitset_merge (dest, src) bitset dest; const bitset src; { int bitset_i; for (bitset_i = 0; bitset_i < BITSET_UINTS; ++bitset_i) dest[bitset_i] |= src[bitset_i]; } static inline void bitset_not_merge (dest, src) bitset dest; const bitset src; { int i; for (i = 0; i < BITSET_UINTS; ++i) dest[i] |= ~src[i]; } #ifdef RE_ENABLE_I18N /* Inline functions for re_string. */ static inline int re_string_char_size_at (pstr, idx) const re_string_t *pstr; int idx; { int byte_idx; if (re_mb_cur_max == 1) return 1; for (byte_idx = 1; idx + byte_idx < pstr->len; ++byte_idx) if (pstr->wcs[idx + byte_idx] != WEOF) break; return byte_idx; } static inline wint_t re_string_wchar_at (pstr, idx) const re_string_t *pstr; int idx; { if (re_mb_cur_max == 1) return (wint_t) pstr->mbs[idx]; return (wint_t) pstr->wcs[idx]; } static int re_string_elem_size_at (pstr, idx) const re_string_t *pstr; int idx; { #ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; int32_t tmp; # include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) { table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; tmp = findidx (&p); return p - pstr->mbs - idx; } else #endif /* _LIBC */ return 1; } #endif /* RE_ENABLE_I18N */ #endif /* _REGEX_INTERNAL_H */ EOF echo - 'regexec.c' cat << 'EOF' > 'regexec.c' /* Extended regular expression matching and search library. Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ static reg_errcode_t match_ctx_init _RE_ARGS((re_match_context_t *cache, int eflags, re_string_t *input, int n)); static void match_ctx_clean _RE_ARGS((re_match_context_t *mctx)); static void match_ctx_free _RE_ARGS((re_match_context_t *cache)); static void match_ctx_free_subtops _RE_ARGS((re_match_context_t *mctx)); static reg_errcode_t match_ctx_add_entry _RE_ARGS((re_match_context_t *cache, int node, int str_idx, int from, int to)); static int search_cur_bkref_entry _RE_ARGS((re_match_context_t *mctx, int str_idx)); static void match_ctx_clear_flag _RE_ARGS((re_match_context_t *mctx)); static reg_errcode_t match_ctx_add_subtop _RE_ARGS((re_match_context_t *mctx, int node, int str_idx)); static re_sub_match_last_t * match_ctx_add_sublast _RE_ARGS((re_sub_match_top_t *subtop, int node, int str_idx)); static void sift_ctx_init _RE_ARGS((re_sift_context_t *sctx, re_dfastate_t **sifted_sts, re_dfastate_t **limited_sts, int last_node, int last_str_idx, int check_subexp)); static reg_errcode_t re_search_internal _RE_ARGS((const regex_t *preg, const char *string, int length, int start, int range, int stop, size_t nmatch, regmatch_t pmatch[], int eflags)); static int re_search_2_stub _RE_ARGS((struct re_pattern_buffer *bufp, const char *string1, int length1, const char *string2, int length2, int start, int range, struct re_registers *regs, int stop, int ret_len)); static int re_search_stub _RE_ARGS((struct re_pattern_buffer *bufp, const char *string, int length, int start, int range, int stop, struct re_registers *regs, int ret_len)); static unsigned re_copy_regs _RE_ARGS((struct re_registers *regs, regmatch_t *pmatch, int nregs, int regs_allocated)); static inline re_dfastate_t *acquire_init_state_context _RE_ARGS((reg_errcode_t *err, const regex_t *preg, const re_match_context_t *mctx, int idx)); static reg_errcode_t prune_impossible_nodes _RE_ARGS((const regex_t *preg, re_match_context_t *mctx)); static int check_matching _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, int fl_search, int fl_longest_match)); static int check_halt_node_context _RE_ARGS((const re_dfa_t *dfa, int node, unsigned int context)); static int check_halt_state_context _RE_ARGS((const regex_t *preg, const re_dfastate_t *state, const re_match_context_t *mctx, int idx)); static void update_regs _RE_ARGS((re_dfa_t *dfa, regmatch_t *pmatch, int cur_node, int cur_idx, int nmatch)); static int proceed_next_node _RE_ARGS((const regex_t *preg, int nregs, regmatch_t *regs, const re_match_context_t *mctx, int *pidx, int node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs)); static reg_errcode_t push_fail_stack _RE_ARGS((struct re_fail_stack_t *fs, int str_idx, int *dests, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes)); static int pop_fail_stack _RE_ARGS((struct re_fail_stack_t *fs, int *pidx, int nregs, regmatch_t *regs, re_node_set *eps_via_nodes)); static reg_errcode_t set_regs _RE_ARGS((const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, regmatch_t *pmatch, int fl_backtrack)); static reg_errcode_t free_fail_stack_return _RE_ARGS((struct re_fail_stack_t *fs)); #ifdef RE_ENABLE_I18N static int sift_states_iter_mb _RE_ARGS((const regex_t *preg, const re_match_context_t *mctx, re_sift_context_t *sctx, int node_idx, int str_idx, int max_str_idx)); #endif /* RE_ENABLE_I18N */ static reg_errcode_t sift_states_backward _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, re_sift_context_t *sctx)); static reg_errcode_t update_cur_sifted_state _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes)); static reg_errcode_t add_epsilon_src_nodes _RE_ARGS((re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates)); static reg_errcode_t sub_epsilon_src_nodes _RE_ARGS((re_dfa_t *dfa, int node, re_node_set *dest_nodes, const re_node_set *and_nodes)); static int check_dst_limits _RE_ARGS((re_dfa_t *dfa, re_node_set *limits, re_match_context_t *mctx, int dst_node, int dst_idx, int src_node, int src_idx)); static int check_dst_limits_calc_pos _RE_ARGS((re_dfa_t *dfa, re_match_context_t *mctx, int limit, re_node_set *eclosures, int subexp_idx, int node, int str_idx)); static reg_errcode_t check_subexp_limits _RE_ARGS((re_dfa_t *dfa, re_node_set *dest_nodes, const re_node_set *candidates, re_node_set *limits, struct re_backref_cache_entry *bkref_ents, int str_idx)); static reg_errcode_t sift_states_bkref _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, re_sift_context_t *sctx, int str_idx, re_node_set *dest_nodes)); static reg_errcode_t clean_state_log_if_need _RE_ARGS((re_match_context_t *mctx, int next_state_log_idx)); static reg_errcode_t merge_state_array _RE_ARGS((re_dfa_t *dfa, re_dfastate_t **dst, re_dfastate_t **src, int num)); static re_dfastate_t *transit_state _RE_ARGS((reg_errcode_t *err, const regex_t *preg, re_match_context_t *mctx, re_dfastate_t *state, int fl_search)); static reg_errcode_t check_subexp_matching_top _RE_ARGS((re_dfa_t *dfa, re_match_context_t *mctx, re_node_set *cur_nodes, int str_idx)); static re_dfastate_t *transit_state_sb _RE_ARGS((reg_errcode_t *err, const regex_t *preg, re_dfastate_t *pstate, int fl_search, re_match_context_t *mctx)); #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb _RE_ARGS((const regex_t *preg, re_dfastate_t *pstate, re_match_context_t *mctx)); #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref _RE_ARGS((const regex_t *preg, re_node_set *nodes, re_match_context_t *mctx)); static reg_errcode_t get_subexp _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, int bkref_node, int bkref_str_idx)); static reg_errcode_t get_subexp_sub _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, re_sub_match_top_t *sub_top, re_sub_match_last_t *sub_last, int bkref_node, int bkref_str)); static int find_subexp_node _RE_ARGS((re_dfa_t *dfa, re_node_set *nodes, int subexp_idx, int fl_open)); static reg_errcode_t check_arrival _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, state_array_t *path, int top_node, int top_str, int last_node, int last_str, int fl_open)); static reg_errcode_t check_arrival_add_next_nodes _RE_ARGS((const regex_t *preg, re_dfa_t *dfa, re_match_context_t *mctx, int str_idx, re_node_set *cur_nodes, re_node_set *next_nodes)); static reg_errcode_t check_arrival_expand_ecl _RE_ARGS((re_dfa_t *dfa, re_node_set *cur_nodes, int ex_subexp, int fl_open)); static reg_errcode_t check_arrival_expand_ecl_sub _RE_ARGS((re_dfa_t *dfa, re_node_set *dst_nodes, int target, int ex_subexp, int fl_open)); static reg_errcode_t expand_bkref_cache _RE_ARGS((const regex_t *preg, re_match_context_t *mctx, re_node_set *cur_nodes, int cur_str, int last_str, int subexp_num, int fl_open)); static re_dfastate_t **build_trtable _RE_ARGS((const regex_t *dfa, const re_dfastate_t *state, int fl_search)); #ifdef RE_ENABLE_I18N static int check_node_accept_bytes _RE_ARGS((const regex_t *preg, int node_idx, const re_string_t *input, int idx)); # ifdef _LIBC static unsigned int find_collation_sequence_value _RE_ARGS((const unsigned char *mbs, size_t name_len)); # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ static int group_nodes_into_DFAstates _RE_ARGS((const regex_t *dfa, const re_dfastate_t *state, re_node_set *states_node, bitset *states_ch)); static int check_node_accept _RE_ARGS((const regex_t *preg, const re_token_t *node, const re_match_context_t *mctx, int idx)); static reg_errcode_t extend_buffers _RE_ARGS((re_match_context_t *mctx)); /* Entry point for POSIX code. */ /* regexec searches for a given pattern, specified by PREG, in the string STRING. If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *__restrict preg; const char *__restrict string; size_t nmatch; regmatch_t pmatch[]; int eflags; { reg_errcode_t err; int length = strlen (string); if (preg->no_sub) err = re_search_internal (preg, string, length, 0, length, length, 0, NULL, eflags); else err = re_search_internal (preg, string, length, 0, length, length, nmatch, pmatch, eflags); return err != REG_NOERROR; } #ifdef _LIBC weak_alias (__regexec, regexec) #endif /* Entry points for GNU code. */ /* re_match, re_search, re_match_2, re_search_2 The former two functions operate on STRING with length LENGTH, while the later two operate on concatenation of STRING1 and STRING2 with lengths LENGTH1 and LENGTH2, respectively. re_match() matches the compiled pattern in BUFP against the string, starting at index START. re_search() first tries matching at index START, then it tries to match starting from index START + 1, and so on. The last start position tried is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same way as re_match().) The parameter STOP of re_{match,search}_2 specifies that no match exceeding the first STOP characters of the concatenation of the strings should be concerned. If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match and all groups is stroed in REGS. (For the "_2" variants, the offsets are computed relative to the concatenation, not relative to the individual strings.) On success, re_match* functions return the length of the match, re_search* return the position of the start of the match. Return value -1 means no match was found and -2 indicates an internal error. */ int re_match (bufp, string, length, start, regs) struct re_pattern_buffer *bufp; const char *string; int length, start; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, 0, length, regs, 1); } #ifdef _LIBC weak_alias (__re_match, re_match) #endif int re_search (bufp, string, length, start, range, regs) struct re_pattern_buffer *bufp; const char *string; int length, start, range; struct re_registers *regs; { return re_search_stub (bufp, string, length, start, range, length, regs, 0); } #ifdef _LIBC weak_alias (__re_search, re_search) #endif int re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, 0, regs, stop, 1); } #ifdef _LIBC weak_alias (__re_match_2, re_match_2) #endif int re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop; struct re_registers *regs; { return re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, 0); } #ifdef _LIBC weak_alias (__re_search_2, re_search_2) #endif static int re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs, stop, ret_len) struct re_pattern_buffer *bufp; const char *string1, *string2; int length1, length2, start, range, stop, ret_len; struct re_registers *regs; { const char *str; int rval; int len = length1 + length2; int free_str = 0; if (BE (length1 < 0 || length2 < 0 || stop < 0, 0)) return -2; /* Concatenate the strings. */ if (length2 > 0) if (length1 > 0) { char *s = re_malloc (char, len); if (BE (s == NULL, 0)) return -2; memcpy (s, string1, length1); memcpy (s + length1, string2, length2); str = s; free_str = 1; } else str = string2; else str = string1; rval = re_search_stub (bufp, str, len, start, range, stop, regs, ret_len); if (free_str) re_free ((char *) str); return rval; } /* The parameters have the same meaning as those of re_search. Additional parameters: If RET_LEN is nonzero the length of the match is returned (re_match style); otherwise the position of the match is returned. */ static int re_search_stub (bufp, string, length, start, range, stop, regs, ret_len) struct re_pattern_buffer *bufp; const char *string; int length, start, range, stop, ret_len; struct re_registers *regs; { reg_errcode_t result; regmatch_t *pmatch; int nregs, rval; int eflags = 0; /* Check for out-of-range. */ if (BE (start < 0 || start > length, 0)) return -1; if (BE (start + range > length, 0)) range = length - start; else if (BE (start + range < 0, 0)) range = -start; eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; /* Compile fastmap if we haven't yet. */ if (range > 0 && bufp->fastmap != NULL && !bufp->fastmap_accurate) re_compile_fastmap (bufp); if (BE (bufp->no_sub, 0)) regs = NULL; /* We need at least 1 register. */ if (regs == NULL) nregs = 1; else if (BE (bufp->regs_allocated == REGS_FIXED && regs->num_regs < bufp->re_nsub + 1, 0)) { nregs = regs->num_regs; if (BE (nregs < 1, 0)) { /* Nothing can be copied to regs. */ regs = NULL; nregs = 1; } } else nregs = bufp->re_nsub + 1; pmatch = re_malloc (regmatch_t, nregs); if (BE (pmatch == NULL, 0)) return -2; result = re_search_internal (bufp, string, length, start, range, stop, nregs, pmatch, eflags); rval = 0; /* I hope we needn't fill ther regs with -1's when no match was found. */ if (result != REG_NOERROR) rval = -1; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, bufp->regs_allocated); if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) rval = -2; } if (BE (rval == 0, 1)) { if (ret_len) { assert (pmatch[0].rm_so == start); rval = pmatch[0].rm_eo - start; } else rval = pmatch[0].rm_so; } re_free (pmatch); return rval; } static unsigned re_copy_regs (regs, pmatch, nregs, regs_allocated) struct re_registers *regs; regmatch_t *pmatch; int nregs, regs_allocated; { int rval = REGS_REALLOCATE; int i; int need_regs = nregs + 1; /* We need one extra element beyond `num_regs' for the `-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ if (regs_allocated == REGS_UNALLOCATED) { /* No. So allocate them with malloc. */ regs->start = re_malloc (regoff_t, need_regs); if (BE (regs->start == NULL, 0)) return REGS_UNALLOCATED; regs->end = re_malloc (regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } else if (regs_allocated == REGS_REALLOCATE) { /* Yes. If we need more elements than were already allocated, reallocate them. If we need fewer, just leave it alone. */ if (need_regs > regs->num_regs) { regs->start = re_realloc (regs->start, regoff_t, need_regs); if (BE (regs->start == NULL, 0)) { if (regs->end != NULL) re_free (regs->end); return REGS_UNALLOCATED; } regs->end = re_realloc (regs->end, regoff_t, need_regs); if (BE (regs->end == NULL, 0)) { re_free (regs->start); return REGS_UNALLOCATED; } regs->num_regs = need_regs; } } else { assert (regs_allocated == REGS_FIXED); /* This function may not be called with REGS_FIXED and nregs too big. */ assert (regs->num_regs >= nregs); rval = REGS_FIXED; } /* Copy the regs. */ for (i = 0; i < nregs; ++i) { regs->start[i] = pmatch[i].rm_so; regs->end[i] = pmatch[i].rm_eo; } for ( ; i < regs->num_regs; ++i) regs->start[i] = regs->end[i] = -1; return rval; } /* Set REGS to hold NUM_REGS registers, storing them in STARTS and ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use this memory for recording register information. STARTS and ENDS must be allocated using the malloc library routine, and must each be at least NUM_REGS * sizeof (regoff_t) bytes long. If NUM_REGS == 0, then subsequent matches should allocate their own register data. Unless this function is called, the first search or match using PATTERN_BUFFER will allocate its own register data, without freeing the old data. */ void re_set_registers (bufp, regs, num_regs, starts, ends) struct re_pattern_buffer *bufp; struct re_registers *regs; unsigned num_regs; regoff_t *starts, *ends; { if (num_regs) { bufp->regs_allocated = REGS_REALLOCATE; regs->num_regs = num_regs; regs->start = starts; regs->end = ends; } else { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; regs->start = regs->end = (regoff_t *) 0; } } #ifdef _LIBC weak_alias (__re_set_registers, re_set_registers) #endif /* Entry points compatible with 4.2 BSD regex library. We don't define them unless specifically requested. */ #if defined _REGEX_RE_COMP || defined _LIBC int # ifdef _LIBC weak_function # endif re_exec (s) const char *s; { return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); } #endif /* _REGEX_RE_COMP */ static re_node_set empty_set; /* Internal entry point. */ /* Searches for a compiled pattern PREG in the string STRING, whose length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same mingings with regexec. START, and RANGE have the same meanings with re_search. Return REG_NOERROR if we find a match, and REG_NOMATCH if not, otherwise return the error code. Note: We assume front end functions already check ranges. (START + RANGE >= 0 && START + RANGE <= LENGTH) */ static reg_errcode_t re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch, eflags) const regex_t *preg; const char *string; int length, start, range, stop, eflags; size_t nmatch; regmatch_t pmatch[]; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; re_string_t input; int left_lim, right_lim, incr; int fl_longest_match, match_first, match_last = -1; int fast_translate, sb; re_match_context_t mctx; char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate && range && !preg->can_be_null) ? preg->fastmap : NULL); /* Check if the DFA haven't been compiled. */ if (BE (preg->used == 0 || dfa->init_state == NULL || dfa->init_state_word == NULL || dfa->init_state_nl == NULL || dfa->init_state_begbuf == NULL, 0)) return REG_NOMATCH; re_node_set_init_empty (&empty_set); memset (&mctx, '\0', sizeof (re_match_context_t)); /* We must check the longest matching, if nmatch > 0. */ fl_longest_match = (nmatch != 0 || dfa->nbackref); err = re_string_allocate (&input, string, length, dfa->nodes_len + 1, preg->translate, preg->syntax & RE_ICASE); if (BE (err != REG_NOERROR, 0)) goto free_return; input.stop = stop; err = match_ctx_init (&mctx, eflags, &input, dfa->nbackref * 2); if (BE (err != REG_NOERROR, 0)) goto free_return; /* We will log all the DFA states through which the dfa pass, if nmatch > 1, or this dfa has "multibyte node", which is a back-reference or a node which can accept multibyte character or multi character collating element. */ if (nmatch > 1 || dfa->has_mb_node) { mctx.state_log = re_malloc (re_dfastate_t *, dfa->nodes_len + 1); if (BE (mctx.state_log == NULL, 0)) { err = REG_ESPACE; goto free_return; } } else mctx.state_log = NULL; #ifdef DEBUG /* We assume front-end functions already check them. */ assert (start + range >= 0 && start + range <= length); #endif match_first = start; input.tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF : CONTEXT_NEWLINE | CONTEXT_BEGBUF); /* Check incrementally whether of not the input string match. */ incr = (range < 0) ? -1 : 1; left_lim = (range < 0) ? start + range : start; right_lim = (range < 0) ? start : start + range; #ifdef RE_ENABLE_I18N sb = re_mb_cur_max == 1; #else sb = 1; #endif fast_translate = sb || !(preg->syntax & RE_ICASE || preg->translate); for (;;) { /* At first get the current byte from input string. */ if (fastmap) { if (BE (fast_translate, 1)) { unsigned RE_TRANSLATE_TYPE t = (unsigned RE_TRANSLATE_TYPE) preg->translate; if (BE (range >= 0, 1)) { if (BE (t != NULL, 0)) { while (BE (match_first < right_lim, 1) && !fastmap[t[(unsigned char) string[match_first]]]) ++match_first; } else { while (BE (match_first < right_lim, 1) && !fastmap[(unsigned char) string[match_first]]) ++match_first; } if (BE (match_first == right_lim, 0)) { int ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (!fastmap[t ? t[ch] : ch]) break; } } else { while (match_first >= left_lim) { int ch = match_first >= length ? 0 : (unsigned char) string[match_first]; if (fastmap[t ? t[ch] : ch]) break; --match_first; } if (match_first < left_lim) break; } } else { int ch; do { /* In this case, we can't determine easily the current byte, since it might be a component byte of a multibyte character. Then we use the constructed buffer instead. */ /* If MATCH_FIRST is out of the valid range, reconstruct the buffers. */ if (input.raw_mbs_idx + input.valid_len <= match_first || match_first < input.raw_mbs_idx) { err = re_string_reconstruct (&input, match_first, eflags, preg->newline_anchor); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* If MATCH_FIRST is out of the buffer, leave it as '\0'. Note that MATCH_FIRST must not be smaller than 0. */ ch = ((match_first >= length) ? 0 : re_string_byte_at (&input, match_first - input.raw_mbs_idx)); if (fastmap[ch]) break; match_first += incr; } while (match_first >= left_lim && match_first <= right_lim); if (! fastmap[ch]) break; } } /* Reconstruct the buffers so that the matcher can assume that the matching starts from the begining of the buffer. */ err = re_string_reconstruct (&input, match_first, eflags, preg->newline_anchor); if (BE (err != REG_NOERROR, 0)) goto free_return; #ifdef RE_ENABLE_I18N /* Eliminate it when it is a component of a multibyte character and isn't the head of a multibyte character. */ if (sb || re_string_first_byte (&input, 0)) #endif { /* It seems to be appropriate one, then use the matcher. */ /* We assume that the matching starts from 0. */ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; match_last = check_matching (preg, &mctx, 0, fl_longest_match); if (match_last != -1) { if (BE (match_last == -2, 0)) { err = REG_ESPACE; goto free_return; } else { mctx.match_last = match_last; if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) { re_dfastate_t *pstate = mctx.state_log[match_last]; mctx.last_node = check_halt_state_context (preg, pstate, &mctx, match_last); } if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) || dfa->nbackref) { err = prune_impossible_nodes (preg, &mctx); if (err == REG_NOERROR) break; if (BE (err != REG_NOMATCH, 0)) goto free_return; } else break; /* We found a matching. */ } } match_ctx_clean (&mctx); } /* Update counter. */ match_first += incr; if (match_first < left_lim || right_lim < match_first) break; } /* Set pmatch[] if we need. */ if (match_last != -1 && nmatch > 0) { int reg_idx; /* Initialize registers. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; /* Set the points where matching start/end. */ pmatch[0].rm_so = 0; pmatch[0].rm_eo = mctx.match_last; if (!preg->no_sub && nmatch > 1) { err = set_regs (preg, &mctx, nmatch, pmatch, dfa->has_plural_match && dfa->nbackref > 0); if (BE (err != REG_NOERROR, 0)) goto free_return; } /* At last, add the offset to the each registers, since we slided the buffers so that We can assume that the matching starts from 0. */ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so != -1) { pmatch[reg_idx].rm_so += match_first; pmatch[reg_idx].rm_eo += match_first; } } err = (match_last == -1) ? REG_NOMATCH : REG_NOERROR; free_return: re_free (mctx.state_log); if (dfa->nbackref) match_ctx_free (&mctx); re_string_destruct (&input); return err; } static reg_errcode_t prune_impossible_nodes (preg, mctx) const regex_t *preg; re_match_context_t *mctx; { int halt_node, match_last; reg_errcode_t ret; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; re_dfastate_t **sifted_states; re_dfastate_t **lim_states = NULL; re_sift_context_t sctx; #ifdef DEBUG assert (mctx->state_log != NULL); #endif match_last = mctx->match_last; halt_node = mctx->last_node; sifted_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (sifted_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } if (dfa->nbackref) { lim_states = re_malloc (re_dfastate_t *, match_last + 1); if (BE (lim_states == NULL, 0)) { ret = REG_ESPACE; goto free_return; } while (1) { memset (lim_states, '\0', sizeof (re_dfastate_t *) * (match_last + 1)); match_ctx_clear_flag (mctx); sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last, 0); ret = sift_states_backward (preg, mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; if (sifted_states[0] != NULL || lim_states[0] != NULL) break; do { --match_last; if (match_last < 0) { ret = REG_NOMATCH; goto free_return; } } while (!mctx->state_log[match_last]->halt); halt_node = check_halt_state_context (preg, mctx->state_log[match_last], mctx, match_last); } ret = merge_state_array (dfa, sifted_states, lim_states, match_last + 1); re_free (lim_states); lim_states = NULL; if (BE (ret != REG_NOERROR, 0)) goto free_return; } else { sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last, 0); ret = sift_states_backward (preg, mctx, &sctx); re_node_set_free (&sctx.limits); if (BE (ret != REG_NOERROR, 0)) goto free_return; } re_free (mctx->state_log); mctx->state_log = sifted_states; sifted_states = NULL; mctx->last_node = halt_node; mctx->match_last = match_last; ret = REG_NOERROR; free_return: re_free (sifted_states); re_free (lim_states); return ret; } /* Acquire an initial state and return it. We must select appropriate initial state depending on the context, since initial states may have constraints like "\<", "^", etc.. */ static inline re_dfastate_t * acquire_init_state_context (err, preg, mctx, idx) reg_errcode_t *err; const regex_t *preg; const re_match_context_t *mctx; int idx; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; *err = REG_NOERROR; if (dfa->init_state->has_constraint) { unsigned int context; context = re_string_context_at (mctx->input, idx - 1, mctx->eflags, preg->newline_anchor); if (IS_WORD_CONTEXT (context)) return dfa->init_state_word; else if (IS_ORDINARY_CONTEXT (context)) return dfa->init_state; else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) return dfa->init_state_begbuf; else if (IS_NEWLINE_CONTEXT (context)) return dfa->init_state_nl; else if (IS_BEGBUF_CONTEXT (context)) { /* It is relatively rare case, then calculate on demand. */ return re_acquire_state_context (err, dfa, dfa->init_state->entrance_nodes, context); } else /* Must not happen? */ return dfa->init_state; } else return dfa->init_state; } /* Check whether the regular expression match input string INPUT or not, and return the index where the matching end, return -1 if not match, or return -2 in case of an error. FL_SEARCH means we must search where the matching starts, FL_LONGEST_MATCH means we want the POSIX longest matching. Note that the matcher assume that the maching starts from the current index of the buffer. */ static int check_matching (preg, mctx, fl_search, fl_longest_match) const regex_t *preg; re_match_context_t *mctx; int fl_search, fl_longest_match; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t err; int match = 0; int match_last = -1; int cur_str_idx = re_string_cur_idx (mctx->input); re_dfastate_t *cur_state; cur_state = acquire_init_state_context (&err, preg, mctx, cur_str_idx); /* An initial state must not be NULL(invalid state). */ if (BE (cur_state == NULL, 0)) return -2; if (mctx->state_log != NULL) mctx->state_log[cur_str_idx] = cur_state; /* Check OP_OPEN_SUBEXP in the initial state in case that we use them later. E.g. Processing back references. */ if (dfa->nbackref) { err = check_subexp_matching_top (dfa, mctx, &cur_state->nodes, 0); if (BE (err != REG_NOERROR, 0)) return err; } if (cur_state->has_backref) { err = transit_state_bkref (preg, &cur_state->nodes, mctx); if (BE (err != REG_NOERROR, 0)) return err; } /* If the RE accepts NULL string. */ if (cur_state->halt) { if (!cur_state->has_constraint || check_halt_state_context (preg, cur_state, mctx, cur_str_idx)) { if (!fl_longest_match) return cur_str_idx; else { match_last = cur_str_idx; match = 1; } } } while (!re_string_eoi (mctx->input)) { cur_state = transit_state (&err, preg, mctx, cur_state, fl_search && !match); if (cur_state == NULL) /* Reached at the invalid state or an error. */ { cur_str_idx = re_string_cur_idx (mctx->input); if (BE (err != REG_NOERROR, 0)) return -2; if (fl_search && !match) { /* Restart from initial state, since we are searching the point from where matching start. */ #ifdef RE_ENABLE_I18N if (re_mb_cur_max == 1 || re_string_first_byte (mctx->input, cur_str_idx)) #endif /* RE_ENABLE_I18N */ cur_state = acquire_init_state_context (&err, preg, mctx, cur_str_idx); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) return -2; if (mctx->state_log != NULL) mctx->state_log[cur_str_idx] = cur_state; } else if (!fl_longest_match && match) break; else /* (fl_longest_match && match) || (!fl_search && !match) */ { if (mctx->state_log == NULL) break; else { int max = mctx->state_log_top; for (; cur_str_idx <= max; ++cur_str_idx) if (mctx->state_log[cur_str_idx] != NULL) break; if (cur_str_idx > max) break; } } } if (cur_state != NULL && cur_state->halt) { /* Reached at a halt state. Check the halt state can satisfy the current context. */ if (!cur_state->has_constraint || check_halt_state_context (preg, cur_state, mctx, re_string_cur_idx (mctx->input))) { /* We found an appropriate halt state. */ match_last = re_string_cur_idx (mctx->input); match = 1; if (!fl_longest_match) break; } } } return match_last; } /* Check NODE match the current context. */ static int check_halt_node_context (dfa, node, context) const re_dfa_t *dfa; int node; unsigned int context; { re_token_type_t type = dfa->nodes[node].type; unsigned int constraint = dfa->nodes[node].constraint; if (type != END_OF_RE) return 0; if (!constraint) return 1; if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) return 0; return 1; } /* Check the halt state STATE match the current context. Return 0 if not match, if the node, STATE has, is a halt node and match the context, return the node. */ static int check_halt_state_context (preg, state, mctx, idx) const regex_t *preg; const re_dfastate_t *state; const re_match_context_t *mctx; int idx; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; unsigned int context; #ifdef DEBUG assert (state->halt); #endif context = re_string_context_at (mctx->input, idx, mctx->eflags, preg->newline_anchor); for (i = 0; i < state->nodes.nelem; ++i) if (check_halt_node_context (dfa, state->nodes.elems[i], context)) return state->nodes.elems[i]; return 0; } /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES, return -1 in case of errors. */ static int proceed_next_node (preg, nregs, regs, mctx, pidx, node, eps_via_nodes, fs) const regex_t *preg; regmatch_t *regs; const re_match_context_t *mctx; int nregs, *pidx, node; re_node_set *eps_via_nodes; struct re_fail_stack_t *fs; { re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int i, err, dest_node; dest_node = -1; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; int ndest, dest_nodes[2]; err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -1; /* Pick up valid destinations. */ for (ndest = 0, i = 0; i < dfa->edests[node].nelem; ++i) { int candidate = dfa->edests[node].elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) continue; dest_nodes[0] = (ndest == 0) ? candidate : dest_nodes[0]; dest_nodes[1] = (ndest == 1) ? candidate : dest_nodes[1]; ++ndest; } if (ndest <= 1) return ndest == 0 ? -1 : (ndest == 1 ? dest_nodes[0] : 0); /* In order to avoid infinite loop like "(a*)*". */ if (re_node_set_contains (eps_via_nodes, dest_nodes[0])) return dest_nodes[1]; if (fs != NULL) push_fail_stack (fs, *pidx, dest_nodes, nregs, regs, eps_via_nodes); return dest_nodes[0]; } else { int naccepted = 0; re_token_type_t type = dfa->nodes[node].type; #ifdef RE_ENABLE_I18N if (ACCEPT_MB_NODE (type)) naccepted = check_node_accept_bytes (preg, node, mctx->input, *pidx); else #endif /* RE_ENABLE_I18N */ if (type == OP_BACK_REF) { int subexp_idx = dfa->nodes[node].opr.idx; naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; if (fs != NULL) { if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) return -1; else if (naccepted) { char *buf = (char *) re_string_get_buffer (mctx->input); if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, naccepted) != 0) return -1; } } if (naccepted == 0) { err = re_node_set_insert (eps_via_nodes, node); if (BE (err < 0, 0)) return -2; dest_node = dfa->edests[node].elems[0]; if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node)) return dest_node; } } if (naccepted != 0 || check_node_accept (preg, dfa->nodes + node, mctx, *pidx)) { dest_node = dfa->nexts[node]; *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, dest_node))) return -1; re_node_set_empty (eps_via_nodes); return dest_node; } } return -1; } static reg_errcode_t push_fail_stack (fs, str_idx, dests, nregs, regs, eps_via_nodes) struct re_fail_stack_t *fs; int str_idx, *dests, nregs; regmatch_t *regs; re_node_set *eps_via_nodes; { reg_errcode_t err; int num = fs->num++; if (fs->num == fs->alloc) { struct re_fail_stack_ent_t *new_array; fs->alloc *= 2; new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) * fs->alloc)); if (new_array == NULL) return REG_ESPACE; fs->stack = new_array; } fs->stack[num].idx = str_idx; fs->stack[num].node = dests[1]; fs->stack[num].regs = re_malloc (regmatch_t, nregs); memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); return err; } static int pop_fail_stack (fs, pidx, nregs, regs, eps_via_nodes) struct re_fail_stack_t *fs; int *pidx, nregs; regmatch_t *regs; re_node_set *eps_via_nodes; { int num = --fs->num; assert (num >= 0); *pidx = fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes = fs->stack[num].eps_via_nodes; return fs->stack[num].node; } /* Set the positions where the subexpressions are starts/ends to registers PMATCH. Note: We assume that pmatch[0] is already set, and pmatch[i].rm_so == pmatch[i].rm_eo == -1 (i > 1). */ static reg_errcode_t set_regs (preg, mctx, nmatch, pmatch, fl_backtrack) const regex_t *preg; const re_match_context_t *mctx; size_t nmatch; regmatch_t *pmatch; int fl_backtrack; { re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int idx, cur_node, real_nmatch; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; struct re_fail_stack_t fs_body; fs_body.num = 0; fs_body.alloc = 2; fs_body.stack = NULL; #ifdef DEBUG assert (nmatch > 1); assert (mctx->state_log != NULL); #endif if (fl_backtrack) { fs = &fs_body; fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); } else fs = NULL; cur_node = dfa->init_node; real_nmatch = (nmatch <= preg->re_nsub) ? nmatch : preg->re_nsub + 1; re_node_set_init_empty (&eps_via_nodes); for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) { update_regs (dfa, pmatch, cur_node, idx, real_nmatch); if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) { int reg_idx; if (fs) { for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) break; if (reg_idx == nmatch) { re_node_set_free (&eps_via_nodes); return free_fail_stack_return (fs); } cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); } else { re_node_set_free (&eps_via_nodes); return REG_NOERROR; } } /* Proceed to next node. */ cur_node = proceed_next_node (preg, nmatch, pmatch, mctx, &idx, cur_node, &eps_via_nodes, fs); if (BE (cur_node < 0, 0)) { if (cur_node == -2) return REG_ESPACE; if (fs) cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, &eps_via_nodes); else { re_node_set_free (&eps_via_nodes); return REG_NOMATCH; } } } re_node_set_free (&eps_via_nodes); return free_fail_stack_return (fs); } static reg_errcode_t free_fail_stack_return (fs) struct re_fail_stack_t *fs; { if (fs) { int fs_idx; for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) { re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); re_free (fs->stack[fs_idx].regs); } re_free (fs->stack); } return REG_NOERROR; } static void update_regs (dfa, pmatch, cur_node, cur_idx, nmatch) re_dfa_t *dfa; regmatch_t *pmatch; int cur_node, cur_idx, nmatch; { int type = dfa->nodes[cur_node].type; int reg_num; if (type != OP_OPEN_SUBEXP && type != OP_CLOSE_SUBEXP) return; reg_num = dfa->nodes[cur_node].opr.idx + 1; if (reg_num >= nmatch) return; if (type == OP_OPEN_SUBEXP) { /* We are at the first node of this sub expression. */ pmatch[reg_num].rm_so = cur_idx; pmatch[reg_num].rm_eo = -1; } else if (type == OP_CLOSE_SUBEXP) /* We are at the first node of this sub expression. */ pmatch[reg_num].rm_eo = cur_idx; } #define NUMBER_OF_STATE 1 /* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 and sift the nodes in each states according to the following rules. Updated state_log will be wrote to STATE_LOG. Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if... 1. When STR_IDX == MATCH_LAST(the last index in the state_log): If `a' isn't the LAST_NODE and `a' can't epsilon transit to the LAST_NODE, we throw away the node `a'. 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts string `s' and transit to `b': i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is throwed away, we throw away the node `a'. 3. When 0 <= STR_IDX < n and 'a' epsilon transit to 'b': i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the node `a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is throwed away, we throw away the node `a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) static reg_errcode_t sift_states_backward (preg, mctx, sctx) const regex_t *preg; re_match_context_t *mctx; re_sift_context_t *sctx; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int null_cnt = 0; int str_idx = sctx->last_str_idx; re_node_set cur_dest; re_node_set *cur_src; /* Points the state_log[str_idx]->nodes */ #ifdef DEBUG assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); #endif cur_src = &mctx->state_log[str_idx]->nodes; /* Build sifted state_log[str_idx]. It has the nodes which can epsilon transit to the last_node and the last_node itself. */ err = re_node_set_init_1 (&cur_dest, sctx->last_node); if (BE (err != REG_NOERROR, 0)) return err; err = update_cur_sifted_state (preg, mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; /* Then check each states in the state_log. */ while (str_idx > 0) { int i, ret; /* Update counters. */ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; if (null_cnt > mctx->max_mb_elem_len) { memset (sctx->sifted_states, '\0', sizeof (re_dfastate_t *) * str_idx); re_node_set_free (&cur_dest); return REG_NOERROR; } re_node_set_empty (&cur_dest); --str_idx; cur_src = ((mctx->state_log[str_idx] == NULL) ? &empty_set : &mctx->state_log[str_idx]->nodes); /* Then build the next sifted state. We build the next sifted state on `cur_dest', and update `sifted_states[str_idx]' with `cur_dest'. Note: `cur_dest' is the sifted state from `state_log[str_idx + 1]'. `cur_src' points the node_set of the old `state_log[str_idx]'. */ for (i = 0; i < cur_src->nelem; i++) { int prev_node = cur_src->elems[i]; int naccepted = 0; re_token_type_t type = dfa->nodes[prev_node].type; if (IS_EPSILON_NODE(type)) continue; #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (ACCEPT_MB_NODE (type)) naccepted = sift_states_iter_mb (preg, mctx, sctx, prev_node, str_idx, sctx->last_str_idx); #endif /* RE_ENABLE_I18N */ /* We don't check backreferences here. See update_cur_sifted_state(). */ if (!naccepted && check_node_accept (preg, dfa->nodes + prev_node, mctx, str_idx) && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], dfa->nexts[prev_node])) naccepted = 1; if (naccepted == 0) continue; if (sctx->limits.nelem) { int to_idx = str_idx + naccepted; if (check_dst_limits (dfa, &sctx->limits, mctx, dfa->nexts[prev_node], to_idx, prev_node, str_idx)) continue; } ret = re_node_set_insert (&cur_dest, prev_node); if (BE (ret == -1, 0)) { err = REG_ESPACE; goto free_return; } } /* Add all the nodes which satisfy the following conditions: - It can epsilon transit to a node in CUR_DEST. - It is in CUR_SRC. And update state_log. */ err = update_cur_sifted_state (preg, mctx, sctx, str_idx, &cur_dest); if (BE (err != REG_NOERROR, 0)) goto free_return; } err = REG_NOERROR; free_return: re_node_set_free (&cur_dest); return err; } /* Helper functions. */ static inline reg_errcode_t clean_state_log_if_need (mctx, next_state_log_idx) re_match_context_t *mctx; int next_state_log_idx; { int top = mctx->state_log_top; if (next_state_log_idx >= mctx->input->bufs_len || (next_state_log_idx >= mctx->input->valid_len && mctx->input->valid_len < mctx->input->len)) { reg_errcode_t err; err = extend_buffers (mctx); if (BE (err != REG_NOERROR, 0)) return err; } if (top < next_state_log_idx) { memset (mctx->state_log + top + 1, '\0', sizeof (re_dfastate_t *) * (next_state_log_idx - top)); mctx->state_log_top = next_state_log_idx; } return REG_NOERROR; } static reg_errcode_t merge_state_array (dfa, dst, src, num) re_dfa_t *dfa; re_dfastate_t **dst; re_dfastate_t **src; int num; { int st_idx; reg_errcode_t err; for (st_idx = 0; st_idx < num; ++st_idx) { if (dst[st_idx] == NULL) dst[st_idx] = src[st_idx]; else if (src[st_idx] != NULL) { re_node_set merged_set; err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, &src[st_idx]->nodes); if (BE (err != REG_NOERROR, 0)) return err; dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); re_node_set_free (&merged_set); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } static reg_errcode_t update_cur_sifted_state (preg, mctx, sctx, str_idx, dest_nodes) const regex_t *preg; re_match_context_t *mctx; re_sift_context_t *sctx; int str_idx; re_node_set *dest_nodes; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? &empty_set : &mctx->state_log[str_idx]->nodes); /* At first, add the nodes which can epsilon transit to a node in DEST_NODE. */ if (dest_nodes->nelem) { err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Then, check the limitations in the current sift_context. */ if (dest_nodes->nelem && sctx->limits.nelem) { err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, mctx->bkref_ents, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } /* Update state_log. */ sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); if (BE (sctx->sifted_states[str_idx] == NULL && err != REG_NOERROR, 0)) return err; if ((mctx->state_log[str_idx] != NULL && mctx->state_log[str_idx]->has_backref)) { err = sift_states_bkref (preg, mctx, sctx, str_idx, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } static reg_errcode_t add_epsilon_src_nodes (dfa, dest_nodes, candidates) re_dfa_t *dfa; re_node_set *dest_nodes; const re_node_set *candidates; { reg_errcode_t err; int src_idx; re_node_set src_copy; err = re_node_set_init_copy (&src_copy, dest_nodes); if (BE (err != REG_NOERROR, 0)) return err; for (src_idx = 0; src_idx < src_copy.nelem; ++src_idx) { err = re_node_set_add_intersect (dest_nodes, candidates, dfa->inveclosures + src_copy.elems[src_idx]); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&src_copy); return err; } } re_node_set_free (&src_copy); return REG_NOERROR; } static reg_errcode_t sub_epsilon_src_nodes (dfa, node, dest_nodes, candidates) re_dfa_t *dfa; int node; re_node_set *dest_nodes; const re_node_set *candidates; { int ecl_idx; reg_errcode_t err; re_node_set *inv_eclosure = dfa->inveclosures + node; re_node_set except_nodes; re_node_set_init_empty (&except_nodes); for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (cur_node == node) continue; if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) { int edst1 = dfa->edests[cur_node].elems[0]; int edst2 = ((dfa->edests[cur_node].nelem > 1) ? dfa->edests[cur_node].elems[1] : -1); if ((!re_node_set_contains (inv_eclosure, edst1) && re_node_set_contains (dest_nodes, edst1)) || (edst2 > 0 && !re_node_set_contains (inv_eclosure, edst2) && re_node_set_contains (dest_nodes, edst2))) { err = re_node_set_add_intersect (&except_nodes, candidates, dfa->inveclosures + cur_node); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&except_nodes); return err; } } } } for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) { int cur_node = inv_eclosure->elems[ecl_idx]; if (!re_node_set_contains (&except_nodes, cur_node)) { int idx = re_node_set_contains (dest_nodes, cur_node) - 1; re_node_set_remove_at (dest_nodes, idx); } } re_node_set_free (&except_nodes); return REG_NOERROR; } static int check_dst_limits (dfa, limits, mctx, dst_node, dst_idx, src_node, src_idx) re_dfa_t *dfa; re_node_set *limits; re_match_context_t *mctx; int dst_node, dst_idx, src_node, src_idx; { int lim_idx, src_pos, dst_pos; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = mctx->bkref_ents + limits->elems[lim_idx]; subexp_idx = dfa->nodes[ent->node].opr.idx - 1; dst_pos = check_dst_limits_calc_pos (dfa, mctx, limits->elems[lim_idx], dfa->eclosures + dst_node, subexp_idx, dst_node, dst_idx); src_pos = check_dst_limits_calc_pos (dfa, mctx, limits->elems[lim_idx], dfa->eclosures + src_node, subexp_idx, src_node, src_idx); /* In case of: ( ) ( ) ( ) */ if (src_pos == dst_pos) continue; /* This is unrelated limitation. */ else return 1; } return 0; } static int check_dst_limits_calc_pos (dfa, mctx, limit, eclosures, subexp_idx, node, str_idx) re_dfa_t *dfa; re_match_context_t *mctx; re_node_set *eclosures; int limit, subexp_idx, node, str_idx; { struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; int pos = (str_idx < lim->subexp_from ? -1 : (lim->subexp_to < str_idx ? 1 : 0)); if (pos == 0 && (str_idx == lim->subexp_from || str_idx == lim->subexp_to)) { int node_idx; for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) { int node = eclosures->elems[node_idx]; re_token_type_t type= dfa->nodes[node].type; if (type == OP_BACK_REF) { int bi = search_cur_bkref_entry (mctx, str_idx); for (; bi < mctx->nbkref_ents; ++bi) { struct re_backref_cache_entry *ent = mctx->bkref_ents + bi; if (ent->str_idx > str_idx) break; if (ent->node == node && ent->subexp_from == ent->subexp_to) { int cpos, dst; dst = dfa->edests[node].elems[0]; cpos = check_dst_limits_calc_pos (dfa, mctx, limit, dfa->eclosures + dst, subexp_idx, dst, str_idx); if ((str_idx == lim->subexp_from && cpos == -1) || (str_idx == lim->subexp_to && cpos == 0)) return cpos; } } } if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx && str_idx == lim->subexp_from) { pos = -1; break; } if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx && str_idx == lim->subexp_to) break; } if (node_idx == eclosures->nelem && str_idx == lim->subexp_to) pos = 1; } return pos; } /* Check the limitations of sub expressions LIMITS, and remove the nodes which are against limitations from DEST_NODES. */ static reg_errcode_t check_subexp_limits (dfa, dest_nodes, candidates, limits, bkref_ents, str_idx) re_dfa_t *dfa; re_node_set *dest_nodes; const re_node_set *candidates; re_node_set *limits; struct re_backref_cache_entry *bkref_ents; int str_idx; { reg_errcode_t err; int node_idx, lim_idx; for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) { int subexp_idx; struct re_backref_cache_entry *ent; ent = bkref_ents + limits->elems[lim_idx]; if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) continue; /* This is unrelated limitation. */ subexp_idx = dfa->nodes[ent->node].opr.idx - 1; if (ent->subexp_to == str_idx) { int ops_node = -1; int cls_node = -1; for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type= dfa->nodes[node].type; if (type == OP_OPEN_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) ops_node = node; else if (type == OP_CLOSE_SUBEXP && subexp_idx == dfa->nodes[node].opr.idx) cls_node = node; } /* Check the limitation of the open subexpression. */ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ if (ops_node >= 0) { err = sub_epsilon_src_nodes(dfa, ops_node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } /* Check the limitation of the close subexpression. */ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; if (!re_node_set_contains (dfa->inveclosures + node, cls_node) && !re_node_set_contains (dfa->eclosures + node, cls_node)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes(dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; --node_idx; } } } else /* (ent->subexp_to != str_idx) */ { for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) { int node = dest_nodes->elems[node_idx]; re_token_type_t type= dfa->nodes[node].type; if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) { if (subexp_idx != dfa->nodes[node].opr.idx) continue; if ((type == OP_CLOSE_SUBEXP && ent->subexp_to != str_idx) || (type == OP_OPEN_SUBEXP)) { /* It is against this limitation. Remove it form the current sifted state. */ err = sub_epsilon_src_nodes(dfa, node, dest_nodes, candidates); if (BE (err != REG_NOERROR, 0)) return err; } } } } } return REG_NOERROR; } static reg_errcode_t sift_states_bkref (preg, mctx, sctx, str_idx, dest_nodes) const regex_t *preg; re_match_context_t *mctx; re_sift_context_t *sctx; int str_idx; re_node_set *dest_nodes; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *)preg->buffer; int node_idx, node; re_sift_context_t local_sctx; const re_node_set *candidates; candidates = ((mctx->state_log[str_idx] == NULL) ? &empty_set : &mctx->state_log[str_idx]->nodes); local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) { int cur_bkref_idx = re_string_cur_idx (mctx->input); re_token_type_t type; node = candidates->elems[node_idx]; type = dfa->nodes[node].type; if (node == sctx->cur_bkref && str_idx == cur_bkref_idx) continue; /* Avoid infinite loop for the REs like "()\1+". */ if (node == sctx->last_node && str_idx == sctx->last_str_idx) continue; if (type == OP_BACK_REF) { int enabled_idx = search_cur_bkref_entry (mctx, str_idx); for (; enabled_idx < mctx->nbkref_ents; ++enabled_idx) { int disabled_idx, subexp_len, to_idx, dst_node; struct re_backref_cache_entry *entry; entry = mctx->bkref_ents + enabled_idx; if (entry->str_idx > str_idx) break; if (entry->node != node) continue; subexp_len = entry->subexp_to - entry->subexp_from; to_idx = str_idx + subexp_len; dst_node = (subexp_len ? dfa->nexts[node] : dfa->edests[node].elems[0]); if (to_idx > sctx->last_str_idx || sctx->sifted_states[to_idx] == NULL || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) || check_dst_limits (dfa, &sctx->limits, mctx, node, str_idx, dst_node, to_idx)) continue; { re_dfastate_t *cur_state; entry->flag = 0; for (disabled_idx = enabled_idx + 1; disabled_idx < mctx->nbkref_ents; ++disabled_idx) { struct re_backref_cache_entry *entry2; entry2 = mctx->bkref_ents + disabled_idx; if (entry2->str_idx > str_idx) break; entry2->flag = (entry2->node == node) ? 1 : entry2->flag; } if (local_sctx.sifted_states == NULL) { local_sctx = *sctx; err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.last_node = node; local_sctx.last_str_idx = str_idx; err = re_node_set_insert (&local_sctx.limits, enabled_idx); if (BE (err < 0, 0)) { err = REG_ESPACE; goto free_return; } cur_state = local_sctx.sifted_states[str_idx]; err = sift_states_backward (preg, mctx, &local_sctx); if (BE (err != REG_NOERROR, 0)) goto free_return; if (sctx->limited_states != NULL) { err = merge_state_array (dfa, sctx->limited_states, local_sctx.sifted_states, str_idx + 1); if (BE (err != REG_NOERROR, 0)) goto free_return; } local_sctx.sifted_states[str_idx] = cur_state; re_node_set_remove (&local_sctx.limits, enabled_idx); /* We must not use the variable entry here, since mctx->bkref_ents might be realloced. */ mctx->bkref_ents[enabled_idx].flag = 1; } } enabled_idx = search_cur_bkref_entry (mctx, str_idx); for (; enabled_idx < mctx->nbkref_ents; ++enabled_idx) { struct re_backref_cache_entry *entry; entry = mctx->bkref_ents + enabled_idx; if (entry->str_idx > str_idx) break; if (entry->node == node) entry->flag = 0; } } } err = REG_NOERROR; free_return: if (local_sctx.sifted_states != NULL) { re_node_set_free (&local_sctx.limits); } return err; } #ifdef RE_ENABLE_I18N static int sift_states_iter_mb (preg, mctx, sctx, node_idx, str_idx, max_str_idx) const regex_t *preg; const re_match_context_t *mctx; re_sift_context_t *sctx; int node_idx, str_idx, max_str_idx; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int naccepted; /* Check the node can accept `multi byte'. */ naccepted = check_node_accept_bytes (preg, node_idx, mctx->input, str_idx); if (naccepted > 0 && str_idx + naccepted <= max_str_idx && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], dfa->nexts[node_idx])) /* The node can't accept the `multi byte', or the destination was already throwed away, then the node could't accept the current input `multi byte'. */ naccepted = 0; /* Otherwise, it is sure that the node could accept `naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ /* Functions for state transition. */ /* Return the next state to which the current state STATE will transit by accepting the current input byte, and update STATE_LOG if necessary. If STATE can accept a multibyte char/collating element/back reference update the destination of STATE_LOG. */ static re_dfastate_t * transit_state (err, preg, mctx, state, fl_search) reg_errcode_t *err; const regex_t *preg; re_match_context_t *mctx; re_dfastate_t *state; int fl_search; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; re_dfastate_t **trtable, *next_state; unsigned char ch; int cur_idx; if (re_string_cur_idx (mctx->input) + 1 >= mctx->input->bufs_len || (re_string_cur_idx (mctx->input) + 1 >= mctx->input->valid_len && mctx->input->valid_len < mctx->input->len)) { *err = extend_buffers (mctx); if (BE (*err != REG_NOERROR, 0)) return NULL; } *err = REG_NOERROR; if (state == NULL) { next_state = state; re_string_skip_bytes (mctx->input, 1); } else { #ifdef RE_ENABLE_I18N /* If the current state can accept multibyte. */ if (state->accept_mb) { *err = transit_state_mb (preg, state, mctx); if (BE (*err != REG_NOERROR, 0)) return NULL; } #endif /* RE_ENABLE_I18N */ /* Then decide the next state with the single byte. */ if (1) { /* Use transition table */ ch = re_string_fetch_byte (mctx->input); trtable = fl_search ? state->trtable_search : state->trtable; if (trtable == NULL) { trtable = build_trtable (preg, state, fl_search); if (fl_search) state->trtable_search = trtable; else state->trtable = trtable; } next_state = trtable[ch]; } else { /* don't use transition table */ next_state = transit_state_sb (err, preg, state, fl_search, mctx); if (BE (next_state == NULL && err != REG_NOERROR, 0)) return NULL; } } cur_idx = re_string_cur_idx (mctx->input); /* Update the state_log if we need. */ if (mctx->state_log != NULL) { if (cur_idx > mctx->state_log_top) { mctx->state_log[cur_idx] = next_state; mctx->state_log_top = cur_idx; } else if (mctx->state_log[cur_idx] == 0) { mctx->state_log[cur_idx] = next_state; } else { re_dfastate_t *pstate; unsigned int context; re_node_set next_nodes, *log_nodes, *table_nodes = NULL; /* If (state_log[cur_idx] != 0), it implies that cur_idx is the destination of a multibyte char/collating element/ back reference. Then the next state is the union set of these destinations and the results of the transition table. */ pstate = mctx->state_log[cur_idx]; log_nodes = pstate->entrance_nodes; if (next_state != NULL) { table_nodes = next_state->entrance_nodes; *err = re_node_set_init_union (&next_nodes, table_nodes, log_nodes); if (BE (*err != REG_NOERROR, 0)) return NULL; } else next_nodes = *log_nodes; /* Note: We already add the nodes of the initial state, then we don't need to add them here. */ context = re_string_context_at (mctx->input, re_string_cur_idx (mctx->input) - 1, mctx->eflags, preg->newline_anchor); next_state = mctx->state_log[cur_idx] = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ if (table_nodes != NULL) re_node_set_free (&next_nodes); } } /* Check OP_OPEN_SUBEXP in the current state in case that we use them later. We must check them here, since the back references in the next state might use them. */ if (dfa->nbackref && next_state/* && fl_process_bkref */) { *err = check_subexp_matching_top (dfa, mctx, &next_state->nodes, cur_idx); if (BE (*err != REG_NOERROR, 0)) return NULL; } /* If the next state has back references. */ if (next_state != NULL && next_state->has_backref) { *err = transit_state_bkref (preg, &next_state->nodes, mctx); if (BE (*err != REG_NOERROR, 0)) return NULL; next_state = mctx->state_log[cur_idx]; } return next_state; } /* Helper functions for transit_state. */ /* From the node set CUR_NODES, pick up the nodes whose types are OP_OPEN_SUBEXP and which have corresponding back references in the regular expression. And register them to use them later for evaluating the correspoding back references. */ static reg_errcode_t check_subexp_matching_top (dfa, mctx, cur_nodes, str_idx) re_dfa_t *dfa; re_match_context_t *mctx; re_node_set *cur_nodes; int str_idx; { int node_idx; reg_errcode_t err; /* TODO: This isn't efficient. Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) { int node = cur_nodes->elems[node_idx]; if (dfa->nodes[node].type == OP_OPEN_SUBEXP && dfa->used_bkref_map & (1 << dfa->nodes[node].opr.idx)) { err = match_ctx_add_subtop (mctx, node, str_idx); if (BE (err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } /* Return the next state to which the current state STATE will transit by accepting the current input byte. */ static re_dfastate_t * transit_state_sb (err, preg, state, fl_search, mctx) reg_errcode_t *err; const regex_t *preg; re_dfastate_t *state; int fl_search; re_match_context_t *mctx; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; re_node_set next_nodes; re_dfastate_t *next_state; int node_cnt, cur_str_idx = re_string_cur_idx (mctx->input); unsigned int context; *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); if (BE (*err != REG_NOERROR, 0)) return NULL; for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) { int cur_node = state->nodes.elems[node_cnt]; if (check_node_accept (preg, dfa->nodes + cur_node, mctx, cur_str_idx)) { *err = re_node_set_merge (&next_nodes, dfa->eclosures + dfa->nexts[cur_node]); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } if (fl_search) { #ifdef RE_ENABLE_I18N int not_initial = 0; if (re_mb_cur_max > 1) for (node_cnt = 0; node_cnt < next_nodes.nelem; ++node_cnt) if (dfa->nodes[next_nodes.elems[node_cnt]].type == CHARACTER) { not_initial = dfa->nodes[next_nodes.elems[node_cnt]].mb_partial; break; } if (!not_initial) #endif { *err = re_node_set_merge (&next_nodes, dfa->init_state->entrance_nodes); if (BE (*err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return NULL; } } } context = re_string_context_at (mctx->input, cur_str_idx, mctx->eflags, preg->newline_anchor); next_state = re_acquire_state_context (err, dfa, &next_nodes, context); /* We don't need to check errors here, since the return value of this function is next_state and ERR is already set. */ re_node_set_free (&next_nodes); re_string_skip_bytes (mctx->input, 1); return next_state; } #ifdef RE_ENABLE_I18N static reg_errcode_t transit_state_mb (preg, pstate, mctx) const regex_t *preg; re_dfastate_t *pstate; re_match_context_t *mctx; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; for (i = 0; i < pstate->nodes.nelem; ++i) { re_node_set dest_nodes, *new_nodes; int cur_node_idx = pstate->nodes.elems[i]; int naccepted = 0, dest_idx; unsigned int context; re_dfastate_t *dest_state; if (dfa->nodes[cur_node_idx].constraint) { context = re_string_context_at (mctx->input, re_string_cur_idx (mctx->input), mctx->eflags, preg->newline_anchor); if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, context)) continue; } /* How many bytes the node can accepts? */ if (ACCEPT_MB_NODE (dfa->nodes[cur_node_idx].type)) naccepted = check_node_accept_bytes (preg, cur_node_idx, mctx->input, re_string_cur_idx (mctx->input)); if (naccepted == 0) continue; /* The node can accepts `naccepted' bytes. */ dest_idx = re_string_cur_idx (mctx->input) + naccepted; mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted : mctx->max_mb_elem_len); err = clean_state_log_if_need (mctx, dest_idx); if (BE (err != REG_NOERROR, 0)) return err; #ifdef DEBUG assert (dfa->nexts[cur_node_idx] != -1); #endif /* `cur_node_idx' may point the entity of the OP_CONTEXT_NODE, then we use pstate->nodes.elems[i] instead. */ new_nodes = dfa->eclosures + dfa->nexts[pstate->nodes.elems[i]]; dest_state = mctx->state_log[dest_idx]; if (dest_state == NULL) dest_nodes = *new_nodes; else { err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_nodes); if (BE (err != REG_NOERROR, 0)) return err; } context = re_string_context_at (mctx->input, dest_idx - 1, mctx->eflags, preg->newline_anchor); mctx->state_log[dest_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); if (dest_state != NULL) re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) return err; } return REG_NOERROR; } #endif /* RE_ENABLE_I18N */ static reg_errcode_t transit_state_bkref (preg, nodes, mctx) const regex_t *preg; re_node_set *nodes; re_match_context_t *mctx; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i; int cur_str_idx = re_string_cur_idx (mctx->input); for (i = 0; i < nodes->nelem; ++i) { int dest_str_idx, prev_nelem, bkc_idx; int node_idx = nodes->elems[i]; unsigned int context; re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; /* Check whether `node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; if (node->constraint) { context = re_string_context_at (mctx->input, cur_str_idx, mctx->eflags, preg->newline_anchor); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) continue; } /* `node' is a backreference. Check the substring which the substring matched. */ bkc_idx = mctx->nbkref_ents; err = get_subexp (preg, mctx, node_idx, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; /* And add the epsilon closures (which is `new_dest_nodes') of the backreference to appropriate state_log. */ #ifdef DEBUG assert (dfa->nexts[node_idx] != -1); #endif for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) { int subexp_len; re_dfastate_t *dest_state; struct re_backref_cache_entry *bkref_ent; bkref_ent = mctx->bkref_ents + bkc_idx; if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) continue; subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; new_dest_nodes = (subexp_len == 0 ? dfa->eclosures + dfa->edests[node_idx].elems[0] : dfa->eclosures + dfa->nexts[node_idx]); dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - bkref_ent->subexp_from); context = re_string_context_at (mctx->input, dest_str_idx - 1, mctx->eflags, preg->newline_anchor); dest_state = mctx->state_log[dest_str_idx]; prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 : mctx->state_log[cur_str_idx]->nodes.nelem); /* Add `new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, new_dest_nodes, context); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } else { re_node_set dest_nodes; err = re_node_set_init_union (&dest_nodes, dest_state->entrance_nodes, new_dest_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&dest_nodes); goto free_return; } mctx->state_log[dest_str_idx] = re_acquire_state_context (&err, dfa, &dest_nodes, context); re_node_set_free (&dest_nodes); if (BE (mctx->state_log[dest_str_idx] == NULL && err != REG_NOERROR, 0)) goto free_return; } /* We need to check recursively if the backreference can epsilon transit. */ if (subexp_len == 0 && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) { err = check_subexp_matching_top (dfa, mctx, new_dest_nodes, cur_str_idx); if (BE (err != REG_NOERROR, 0)) goto free_return; err = transit_state_bkref (preg, new_dest_nodes, mctx); if (BE (err != REG_NOERROR, 0)) goto free_return; } } } err = REG_NOERROR; free_return: return err; } /* Enumerate all the candidates which the backreference BKREF_NODE can match at BKREF_STR_IDX, and register them by match_ctx_add_entry(). Note that we might collect inappropriate candidates here. However, the cost of checking them strictly here is too high, then we delay these checking for prune_impossible_nodes(). */ static reg_errcode_t get_subexp (preg, mctx, bkref_node, bkref_str_idx) const regex_t *preg; re_match_context_t *mctx; int bkref_node, bkref_str_idx; { int subexp_num, sub_top_idx; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; char *buf = (char *) re_string_get_buffer (mctx->input); /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); for (; cache_idx < mctx->nbkref_ents; ++cache_idx) { struct re_backref_cache_entry *entry = mctx->bkref_ents + cache_idx; if (entry->str_idx > bkref_str_idx) break; if (entry->node == bkref_node) return REG_NOERROR; /* We already checked it. */ } subexp_num = dfa->nodes[bkref_node].opr.idx - 1; /* For each sub expression */ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) { reg_errcode_t err; re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; re_sub_match_last_t *sub_last; int sub_last_idx, sl_str; char *bkref_str; if (dfa->nodes[sub_top->node].opr.idx != subexp_num) continue; /* It isn't related. */ sl_str = sub_top->str_idx; bkref_str = buf + bkref_str_idx; /* At first, check the last node of sub expressions we already evaluated. */ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) { int sl_str_diff; sub_last = sub_top->lasts[sub_last_idx]; sl_str_diff = sub_last->str_idx - sl_str; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_diff > 0 && memcmp (bkref_str, buf + sl_str, sl_str_diff) != 0) break; /* We don't need to search this sub expression any more. */ bkref_str += sl_str_diff; sl_str += sl_str_diff; err = get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; } if (sub_last_idx < sub_top->nlasts) continue; if (sub_last_idx > 0) ++sl_str; /* Then, search for the other last nodes of the sub expression. */ for (; sl_str <= bkref_str_idx; ++sl_str) { int cls_node, sl_str_off; re_node_set *nodes; sl_str_off = sl_str - sub_top->str_idx; /* The matched string by the sub expression match with the substring at the back reference? */ if (sl_str_off > 0 && memcmp (bkref_str++, buf + sl_str - 1, 1) != 0) break; /* We don't need to search this sub expression any more. */ if (mctx->state_log[sl_str] == NULL) continue; /* Does this state have a ')' of the sub expression? */ nodes = &mctx->state_log[sl_str]->nodes; cls_node = find_subexp_node (dfa, nodes, subexp_num, 0); if (cls_node == -1) continue; /* No. */ if (sub_top->path == NULL) { sub_top->path = calloc (sizeof (state_array_t), sl_str - sub_top->str_idx + 1); if (sub_top->path == NULL) return REG_ESPACE; } /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node in the current context? */ err = check_arrival (preg, mctx, sub_top->path, sub_top->node, sub_top->str_idx, cls_node, sl_str, 0); if (err == REG_NOMATCH) continue; if (BE (err != REG_NOERROR, 0)) return err; sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); if (BE (sub_last == NULL, 0)) return REG_ESPACE; err = get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node, bkref_str_idx); if (err == REG_NOMATCH) continue; } } return REG_NOERROR; } /* Helper functions for get_subexp(). */ /* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. If it can arrive, register the sub expression expressed with SUB_TOP and SUB_LAST. */ static reg_errcode_t get_subexp_sub (preg, mctx, sub_top, sub_last, bkref_node, bkref_str) const regex_t *preg; re_match_context_t *mctx; re_sub_match_top_t *sub_top; re_sub_match_last_t *sub_last; int bkref_node, bkref_str; { reg_errcode_t err; int to_idx; /* Can the subexpression arrive the back reference? */ err = check_arrival (preg, mctx, &sub_last->path, sub_last->node, sub_last->str_idx, bkref_node, bkref_str, 1); if (err != REG_NOERROR) return err; err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, sub_last->str_idx); if (BE (err != REG_NOERROR, 0)) return err; to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; clean_state_log_if_need (mctx, to_idx); return REG_NOERROR; } /* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. Search '(' if FL_OPEN, or search ')' otherwise. TODO: This function isn't efficient... Because there might be more than one nodes whose types are OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all nodes. E.g. RE: (a){2} */ static int find_subexp_node (dfa, nodes, subexp_idx, fl_open) re_dfa_t *dfa; re_node_set *nodes; int subexp_idx, fl_open; { int cls_idx; for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) { int cls_node = nodes->elems[cls_idx]; re_token_t *node = dfa->nodes + cls_node; if (((fl_open && node->type == OP_OPEN_SUBEXP) || (!fl_open && node->type == OP_CLOSE_SUBEXP)) && node->opr.idx == subexp_idx) return cls_node; } return -1; } /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be heavily reused. Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ static reg_errcode_t check_arrival (preg, mctx, path, top_node, top_str, last_node, last_str, fl_open) const regex_t *preg; re_match_context_t *mctx; state_array_t *path; int top_node, top_str, last_node, last_str, fl_open; { re_dfa_t *dfa = (re_dfa_t *) preg->buffer; reg_errcode_t err; int subexp_num, backup_cur_idx, str_idx, null_cnt; re_dfastate_t *cur_state = NULL; re_node_set *cur_nodes, next_nodes; re_dfastate_t **backup_state_log; unsigned int context; subexp_num = dfa->nodes[top_node].opr.idx; /* Extend the buffer if we need. */ if (path->alloc < last_str + mctx->max_mb_elem_len + 1) { re_dfastate_t **new_array; int old_alloc = path->alloc; path->alloc += last_str + mctx->max_mb_elem_len + 1; new_array = re_realloc (path->array, re_dfastate_t *, path->alloc); if (new_array == NULL) return REG_ESPACE; path->array = new_array; memset (new_array + old_alloc, '\0', sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } str_idx = path->next_idx == 0 ? top_str : path->next_idx; /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; backup_cur_idx = mctx->input->cur_idx; mctx->state_log = path->array; mctx->input->cur_idx = str_idx; /* Setup initial node set. */ context = re_string_context_at (mctx->input, str_idx - 1, mctx->eflags, preg->newline_anchor); if (str_idx == top_str) { err = re_node_set_init_1 (&next_nodes, top_node); if (BE (err != REG_NOERROR, 0)) return err; err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, fl_open); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } else { cur_state = mctx->state_log[str_idx]; if (cur_state && cur_state->has_backref) { err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); if (BE ( err != REG_NOERROR, 0)) return err; } else re_node_set_init_empty (&next_nodes); } if (str_idx == top_str || (cur_state && cur_state->has_backref)) { if (next_nodes.nelem) { err = expand_bkref_cache (preg, mctx, &next_nodes, str_idx, last_str, subexp_num, fl_open); if (BE ( err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; } for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) { re_node_set_empty (&next_nodes); if (mctx->state_log[str_idx + 1]) { err = re_node_set_merge (&next_nodes, &mctx->state_log[str_idx + 1]->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } if (cur_state) { err = check_arrival_add_next_nodes(preg, dfa, mctx, str_idx, &cur_state->nodes, &next_nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } ++str_idx; if (next_nodes.nelem) { err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, fl_open); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } err = expand_bkref_cache (preg, mctx, &next_nodes, str_idx, last_str, subexp_num, fl_open); if (BE ( err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } } context = re_string_context_at (mctx->input, str_idx - 1, mctx->eflags, preg->newline_anchor); cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); if (BE (cur_state == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&next_nodes); return err; } mctx->state_log[str_idx] = cur_state; null_cnt = cur_state == NULL ? null_cnt + 1 : 0; } re_node_set_free (&next_nodes); cur_nodes = (mctx->state_log[last_str] == NULL ? NULL : &mctx->state_log[last_str]->nodes); path->next_idx = str_idx; /* Fix MCTX. */ mctx->state_log = backup_state_log; mctx->input->cur_idx = backup_cur_idx; if (cur_nodes == NULL) return REG_NOMATCH; /* Then check the current node set has the node LAST_NODE. */ return (re_node_set_contains (cur_nodes, last_node) || re_node_set_contains (cur_nodes, last_node) ? REG_NOERROR : REG_NOMATCH); } /* Helper functions for check_arrival. */ /* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them to NEXT_NODES. TODO: This function is similar to the functions transit_state*(), however this function has many additional works. Can't we unify them? */ static reg_errcode_t check_arrival_add_next_nodes (preg, dfa, mctx, str_idx, cur_nodes, next_nodes) const regex_t *preg; re_dfa_t *dfa; re_match_context_t *mctx; int str_idx; re_node_set *cur_nodes, *next_nodes; { int cur_idx; reg_errcode_t err; re_node_set union_set; re_node_set_init_empty (&union_set); for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) { int naccepted = 0; int cur_node = cur_nodes->elems[cur_idx]; re_token_type_t type = dfa->nodes[cur_node].type; if (IS_EPSILON_NODE(type)) continue; #ifdef RE_ENABLE_I18N /* If the node may accept `multi byte'. */ if (ACCEPT_MB_NODE (type)) { naccepted = check_node_accept_bytes (preg, cur_node, mctx->input, str_idx); if (naccepted > 1) { re_dfastate_t *dest_state; int next_node = dfa->nexts[cur_node]; int next_idx = str_idx + naccepted; dest_state = mctx->state_log[next_idx]; re_node_set_empty (&union_set); if (dest_state) { err = re_node_set_merge (&union_set, &dest_state->nodes); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } err = re_node_set_insert (&union_set, next_node); if (BE (err < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } else { err = re_node_set_insert (&union_set, next_node); if (BE (err < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } mctx->state_log[next_idx] = re_acquire_state (&err, dfa, &union_set); if (BE (mctx->state_log[next_idx] == NULL && err != REG_NOERROR, 0)) { re_node_set_free (&union_set); return err; } } } #endif /* RE_ENABLE_I18N */ if (naccepted || check_node_accept (preg, dfa->nodes + cur_node, mctx, str_idx)) { err = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); if (BE (err < 0, 0)) { re_node_set_free (&union_set); return REG_ESPACE; } } } re_node_set_free (&union_set); return REG_NOERROR; } /* For all the nodes in CUR_NODES, add the epsilon closures of them to CUR_NODES, however exclude the nodes which are: - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. */ static reg_errcode_t check_arrival_expand_ecl (dfa, cur_nodes, ex_subexp, fl_open) re_dfa_t *dfa; re_node_set *cur_nodes; int ex_subexp, fl_open; { reg_errcode_t err; int idx, outside_node; re_node_set new_nodes; #ifdef DEBUG assert (cur_nodes->nelem); #endif err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); if (BE (err != REG_NOERROR, 0)) return err; /* Create a new node set NEW_NODES with the nodes which are epsilon closures of the node in CUR_NODES. */ for (idx = 0; idx < cur_nodes->nelem; ++idx) { int cur_node = cur_nodes->elems[idx]; re_node_set *eclosure = dfa->eclosures + cur_node; outside_node = find_subexp_node (dfa, eclosure, ex_subexp, fl_open); if (outside_node == -1) { /* There are no problematic nodes, just merge them. */ err = re_node_set_merge (&new_nodes, eclosure); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } else { /* There are problematic nodes, re-calculate incrementally. */ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, ex_subexp, fl_open); if (BE (err != REG_NOERROR, 0)) { re_node_set_free (&new_nodes); return err; } } } re_node_set_free (cur_nodes); *cur_nodes = new_nodes; return REG_NOERROR; } /* Helper function for check_arrival_expand_ecl. Check incrementally the epsilon closure of TARGET, and if it isn't problematic append it to DST_NODES. */ static reg_errcode_t check_arrival_expand_ecl_sub (dfa, dst_nodes, target, ex_subexp, fl_open) re_dfa_t *dfa; int target, ex_subexp, fl_open; re_node_set *dst_nodes; { int cur_node, type; for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) { int err; type = dfa->nodes[cur_node].type; if (((type == OP_OPEN_SUBEXP && fl_open) || (type == OP_CLOSE_SUBEXP && !fl_open)) && dfa->nodes[cur_node].opr.idx == ex_subexp) { if (!fl_open) { err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; } break; } err = re_node_set_insert (dst_nodes, cur_node); if (BE (err == -1, 0)) return REG_ESPACE; if (dfa->edests[cur_node].nelem == 0) break; if (dfa->edests[cur_node].nelem == 2) { err = check_arrival_expand_ecl_sub (dfa, dst_nodes, dfa->edests[cur_node].elems[1], ex_subexp, fl_open); if (BE (err != REG_NOERROR, 0)) return err; } cur_node = dfa->edests[cur_node].elems[0]; } return REG_NOERROR; } /* For all the back references in the current state, calculate the destination of the back references by the appropriate entry in MCTX->BKREF_ENTS. */ static reg_errcode_t expand_bkref_cache (preg, mctx, cur_nodes, cur_str, last_str, subexp_num, fl_open) const regex_t *preg; re_match_context_t *mctx; int cur_str, last_str, subexp_num, fl_open; re_node_set *cur_nodes; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int cache_idx, cache_idx_start; /* The current state. */ cache_idx_start = search_cur_bkref_entry (mctx, cur_str); for (cache_idx = cache_idx_start; cache_idx < mctx->nbkref_ents; ++cache_idx) { int to_idx, next_node; struct re_backref_cache_entry *ent = mctx->bkref_ents + cache_idx; if (ent->str_idx > cur_str) break; /* Is this entry ENT is appropriate? */ if (!re_node_set_contains (cur_nodes, ent->node)) continue; /* No. */ to_idx = cur_str + ent->subexp_to - ent->subexp_from; /* Calculate the destination of the back reference, and append it to MCTX->STATE_LOG. */ if (to_idx == cur_str) { /* The backreference did epsilon transit, we must re-check all the node in the current state. */ re_node_set new_dests; reg_errcode_t err2, err3; next_node = dfa->edests[ent->node].elems[0]; if (re_node_set_contains (cur_nodes, next_node)) continue; err = re_node_set_init_1 (&new_dests, next_node); err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, fl_open); err3 = re_node_set_merge (cur_nodes, &new_dests); re_node_set_free (&new_dests); if (BE (err != REG_NOERROR || err2 != REG_NOERROR || err3 != REG_NOERROR, 0)) { err = (err != REG_NOERROR ? err : (err2 != REG_NOERROR ? err2 : err3)); return err; } /* TODO: It is still inefficient... */ cache_idx = cache_idx_start - 1; continue; } else { re_node_set union_set; next_node = dfa->nexts[ent->node]; if (mctx->state_log[to_idx]) { int ret; if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, next_node)) continue; err = re_node_set_init_copy (&union_set, &mctx->state_log[to_idx]->nodes); ret = re_node_set_insert (&union_set, next_node); if (BE (err != REG_NOERROR || ret < 0, 0)) { re_node_set_free (&union_set); err = err != REG_NOERROR ? err : REG_ESPACE; return err; } } else { err = re_node_set_init_1 (&union_set, next_node); if (BE (err != REG_NOERROR, 0)) return err; } mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); re_node_set_free (&union_set); if (BE (mctx->state_log[to_idx] == NULL && err != REG_NOERROR, 0)) return err; } } return REG_NOERROR; } /* Build transition table for the state. Return the new table if succeeded, otherwise return NULL. */ static re_dfastate_t ** build_trtable (preg, state, fl_search) const regex_t *preg; const re_dfastate_t *state; int fl_search; { reg_errcode_t err; re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i, j, k, ch; int dests_node_malloced = 0, dest_states_malloced = 0; int ndests; /* Number of the destination states from `state'. */ re_dfastate_t **trtable; re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; re_node_set follows, *dests_node; bitset *dests_ch; bitset acceptable; /* We build DFA states which corresponds to the destination nodes from `state'. `dests_node[i]' represents the nodes which i-th destination state contains, and `dests_ch[i]' represents the characters which i-th destination state accepts. */ #ifdef _LIBC if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX)) dests_node = (re_node_set *) alloca ((sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX); else #endif { dests_node = (re_node_set *) malloc ((sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX); if (BE (dests_node == NULL, 0)) return NULL; dests_node_malloced = 1; } dests_ch = (bitset *) (dests_node + SBC_MAX); /* Initialize transiton table. */ trtable = (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); if (BE (trtable == NULL, 0)) { if (dests_node_malloced) free (dests_node); return NULL; } /* At first, group all nodes belonging to `state' into several destinations. */ ndests = group_nodes_into_DFAstates (preg, state, dests_node, dests_ch); if (BE (ndests <= 0, 0)) { if (dests_node_malloced) free (dests_node); /* Return NULL in case of an error, trtable otherwise. */ if (ndests == 0) return trtable; free (trtable); return NULL; } err = re_node_set_alloc (&follows, ndests + 1); if (BE (err != REG_NOERROR, 0)) goto out_free; #ifdef _LIBC if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset)) * SBC_MAX + ndests * 3 * sizeof (re_dfastate_t *))) dest_states = (re_dfastate_t **) alloca (ndests * 3 * sizeof (re_dfastate_t *)); else #endif { dest_states = (re_dfastate_t **) malloc (ndests * 3 * sizeof (re_dfastate_t *)); if (BE (dest_states == NULL, 0)) { out_free: if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); free (trtable); if (dests_node_malloced) free (dests_node); return NULL; } dest_states_malloced = 1; } dest_states_word = dest_states + ndests; dest_states_nl = dest_states_word + ndests; bitset_empty (acceptable); /* Then build the states for all destinations. */ for (i = 0; i < ndests; ++i) { int next_node; re_node_set_empty (&follows); /* Merge the follows of this destination states. */ for (j = 0; j < dests_node[i].nelem; ++j) { next_node = dfa->nexts[dests_node[i].elems[j]]; if (next_node != -1) { err = re_node_set_merge (&follows, dfa->eclosures + next_node); if (BE (err != REG_NOERROR, 0)) goto out_free; } } /* If search flag is set, merge the initial state. */ if (fl_search) { #ifdef RE_ENABLE_I18N int not_initial = 0; for (j = 0; j < follows.nelem; ++j) if (dfa->nodes[follows.elems[j]].type == CHARACTER) { not_initial = dfa->nodes[follows.elems[j]].mb_partial; break; } if (!not_initial) #endif { err = re_node_set_merge (&follows, dfa->init_state->entrance_nodes); if (BE (err != REG_NOERROR, 0)) goto out_free; } } dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) goto out_free; /* If the new state has context constraint, build appropriate states for these contexts. */ if (dest_states[i]->has_constraint) { dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_WORD); if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) goto out_free; dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, CONTEXT_NEWLINE); if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) goto out_free; } else { dest_states_word[i] = dest_states[i]; dest_states_nl[i] = dest_states[i]; } bitset_merge (acceptable, dests_ch[i]); } /* Update the transition table. */ /* For all characters ch...: */ for (i = 0, ch = 0; i < BITSET_UINTS; ++i) for (j = 0; j < UINT_BITS; ++j, ++ch) if ((acceptable[i] >> j) & 1) { /* The current state accepts the character ch. */ if (IS_WORD_CHAR (ch)) { for (k = 0; k < ndests; ++k) if ((dests_ch[k][i] >> j) & 1) { /* k-th destination accepts the word character ch. */ trtable[ch] = dest_states_word[k]; /* There must be only one destination which accepts character ch. See group_nodes_into_DFAstates. */ break; } } else /* not WORD_CHAR */ { for (k = 0; k < ndests; ++k) if ((dests_ch[k][i] >> j) & 1) { /* k-th destination accepts the non-word character ch. */ trtable[ch] = dest_states[k]; /* There must be only one destination which accepts character ch. See group_nodes_into_DFAstates. */ break; } } } /* new line */ if (bitset_contain (acceptable, NEWLINE_CHAR)) { /* The current state accepts newline character. */ for (k = 0; k < ndests; ++k) if (bitset_contain (dests_ch[k], NEWLINE_CHAR)) { /* k-th destination accepts newline character. */ trtable[NEWLINE_CHAR] = dest_states_nl[k]; /* There must be only one destination which accepts newline. See group_nodes_into_DFAstates. */ break; } } if (dest_states_malloced) free (dest_states); re_node_set_free (&follows); for (i = 0; i < ndests; ++i) re_node_set_free (dests_node + i); if (dests_node_malloced) free (dests_node); return trtable; } /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination to DESTS_NODE[i] and set the characters accepted by the destination to DEST_CH[i]. This function return the number of destinations. */ static int group_nodes_into_DFAstates (preg, state, dests_node, dests_ch) const regex_t *preg; const re_dfastate_t *state; re_node_set *dests_node; bitset *dests_ch; { reg_errcode_t err; const re_dfa_t *dfa = (re_dfa_t *) preg->buffer; int i, j, k; int ndests; /* Number of the destinations from `state'. */ bitset accepts; /* Characters a node can accept. */ const re_node_set *cur_nodes = &state->nodes; bitset_empty (accepts); ndests = 0; /* For all the nodes belonging to `state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; re_token_type_t type = node->type; unsigned int constraint = node->constraint; /* Enumerate all single byte character this node can accept. */ if (type == CHARACTER) bitset_set (accepts, node->opr.c); else if (type == SIMPLE_BRACKET) { bitset_merge (accepts, node->opr.sbcset); } else if (type == OP_PERIOD) { bitset_set_all (accepts); if (!(preg->syntax & RE_DOT_NEWLINE)) bitset_clear (accepts, '\n'); if (preg->syntax & RE_DOT_NOT_NULL) bitset_clear (accepts, '\0'); } else continue; /* Check the `accepts' and sift the characters which are not match it the context. */ if (constraint) { if (constraint & NEXT_WORD_CONSTRAINT) for (j = 0; j < BITSET_UINTS; ++j) accepts[j] &= dfa->word_char[j]; if (constraint & NEXT_NOTWORD_CONSTRAINT) for (j = 0; j < BITSET_UINTS; ++j) accepts[j] &= ~dfa->word_char[j]; if (constraint & NEXT_NEWLINE_CONSTRAINT) { int accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); bitset_empty (accepts); if (accepts_newline) bitset_set (accepts, NEWLINE_CHAR); else continue; } } /* Then divide `accepts' into DFA states, or create a new state. */ for (j = 0; j < ndests; ++j) { bitset intersec; /* Intersection sets, see below. */ bitset remains; /* Flags, see below. */ int has_intersec, not_subset, not_consumed; /* Optimization, skip if this state doesn't accept the character. */ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; /* Enumerate the intersection set of this state and `accepts'. */ has_intersec = 0; for (k = 0; k < BITSET_UINTS; ++k) has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; /* And skip if the intersection set is empty. */ if (!has_intersec) continue; /* Then check if this state is a subset of `accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_UINTS; ++k) { not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; } /* If this state isn't a subset of `accepts', create a new group state, which has the `remains'. */ if (not_subset) { bitset_copy (dests_ch[ndests], remains); bitset_copy (dests_ch[j], intersec); err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; } /* Put the position in the current group. */ err = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); if (BE (err < 0, 0)) goto error_return; /* If all characters are consumed, go to next node. */ if (!not_consumed) break; } /* Some characters remain, create a new group. */ if (j == ndests) { bitset_copy (dests_ch[ndests], accepts); err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); if (BE (err != REG_NOERROR, 0)) goto error_return; ++ndests; bitset_empty (accepts); } } return ndests; error_return: for (j = 0; j < ndests; ++j) re_node_set_free (dests_node + j); return -1; } #ifdef RE_ENABLE_I18N /* Check how many bytes the node `dfa->nodes[node_idx]' accepts. Return the number of the bytes the node accepts. STR_IDX is the current index of the input string. This function handles the nodes which can accept one character, or one collating element like '.', '[a-z]', opposite to the other nodes can only accept one byte. */ static int check_node_accept_bytes (preg, node_idx, input, str_idx) const regex_t *preg; int node_idx, str_idx; const re_string_t *input; { const re_dfa_t *dfa = (re_dfa_t *) preg->buffer; const re_token_t *node = dfa->nodes + node_idx; int elem_len = re_string_elem_size_at (input, str_idx); int char_len = re_string_char_size_at (input, str_idx); int i; # ifdef _LIBC int j; uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); # endif /* _LIBC */ if (elem_len <= 1 && char_len <= 1) return 0; if (node->type == OP_PERIOD) { /* '.' accepts any one character except the following two cases. */ if ((!(preg->syntax & RE_DOT_NEWLINE) && re_string_byte_at (input, str_idx) == '\n') || ((preg->syntax & RE_DOT_NOT_NULL) && re_string_byte_at (input, str_idx) == '\0')) return 0; return char_len; } else if (node->type == COMPLEX_BRACKET) { const re_charset_t *cset = node->opr.mbcset; # ifdef _LIBC const unsigned char *pin = re_string_get_buffer (input) + str_idx; # endif /* _LIBC */ int match_len = 0; wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) ? re_string_wchar_at (input, str_idx) : 0); /* match with multibyte character? */ for (i = 0; i < cset->nmbchars; ++i) if (wc == cset->mbchars[i]) { match_len = char_len; goto check_node_accept_bytes_match; } /* match with character_class? */ for (i = 0; i < cset->nchar_classes; ++i) { wctype_t wt = cset->char_classes[i]; if (__iswctype (wc, wt)) { match_len = char_len; goto check_node_accept_bytes_match; } } # ifdef _LIBC if (nrules != 0) { unsigned int in_collseq = 0; const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; int32_t idx; /* This #include defines a local function! */ # include /* match with collating_symbol? */ if (cset->ncoll_syms) extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (i = 0; i < cset->ncoll_syms; ++i) { const unsigned char *coll_sym = extra + cset->coll_syms[i]; /* Compare the length of input collating element and the length of current collating element. */ if (*coll_sym != elem_len) continue; /* Compare each bytes. */ for (j = 0; j < *coll_sym; j++) if (pin[j] != coll_sym[1 + j]) break; if (j == *coll_sym) { /* Match if every bytes is equal. */ match_len = j; goto check_node_accept_bytes_match; } } if (cset->nranges) { if (elem_len <= char_len) { collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); in_collseq = collseq_table_lookup (collseqwc, wc); } else in_collseq = find_collation_sequence_value (pin, elem_len); } /* match with range expression? */ for (i = 0; i < cset->nranges; ++i) if (cset->range_starts[i] <= in_collseq && in_collseq <= cset->range_ends[i]) { match_len = elem_len; goto check_node_accept_bytes_match; } /* match with equivalence_class? */ if (cset->nequiv_classes) { const unsigned char *cp = pin; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); idx = findidx (&cp); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { int32_t equiv_class_idx = cset->equiv_classes[i]; size_t weight_len = weights[idx]; if (weight_len == weights[equiv_class_idx]) { int cnt = 0; while (cnt <= weight_len && (weights[equiv_class_idx + 1 + cnt] == weights[idx + 1 + cnt])) ++cnt; if (cnt > weight_len) { match_len = elem_len; goto check_node_accept_bytes_match; } } } } } else # endif /* _LIBC */ { /* match with range expression? */ #if __GNUC__ >= 2 wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'}; #else wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; cmp_buf[2] = wc; #endif for (i = 0; i < cset->nranges; ++i) { cmp_buf[0] = cset->range_starts[i]; cmp_buf[4] = cset->range_ends[i]; if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) { match_len = char_len; goto check_node_accept_bytes_match; } } } check_node_accept_bytes_match: if (!cset->non_match) return match_len; else { if (match_len > 0) return 0; else return (elem_len > char_len) ? elem_len : char_len; } } return 0; } # ifdef _LIBC static unsigned int find_collation_sequence_value (mbs, mbs_len) const unsigned char *mbs; size_t mbs_len; { uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules == 0) { if (mbs_len == 1) { /* No valid character. Match it as a single byte character. */ const unsigned char *collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); return collseq[mbs[0]]; } return UINT_MAX; } else { int32_t idx; const unsigned char *extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); for (idx = 0; ;) { int mbs_cnt, found = 0; int32_t elem_mbs_len; /* Skip the name of collating element name. */ idx = idx + extra[idx] + 1; elem_mbs_len = extra[idx++]; if (mbs_len == elem_mbs_len) { for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) break; if (mbs_cnt == elem_mbs_len) /* Found the entry. */ found = 1; } /* Skip the byte sequence of the collating element. */ idx += elem_mbs_len; /* Adjust for the alignment. */ idx = (idx + 3) & ~3; /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ idx = idx + sizeof (uint32_t) * (extra[idx] + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx); /* Skip the collation sequence value. */ idx += sizeof (uint32_t); } } } # endif /* _LIBC */ #endif /* RE_ENABLE_I18N */ /* Check whether the node accepts the byte which is IDX-th byte of the INPUT. */ static int check_node_accept (preg, node, mctx, idx) const regex_t *preg; const re_token_t *node; const re_match_context_t *mctx; int idx; { unsigned char ch; if (node->constraint) { /* The node has constraints. Check whether the current context satisfies the constraints. */ unsigned int context = re_string_context_at (mctx->input, idx, mctx->eflags, preg->newline_anchor); if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) return 0; } ch = re_string_byte_at (mctx->input, idx); if (node->type == CHARACTER) return node->opr.c == ch; else if (node->type == SIMPLE_BRACKET) return bitset_contain (node->opr.sbcset, ch); else if (node->type == OP_PERIOD) return !((ch == '\n' && !(preg->syntax & RE_DOT_NEWLINE)) || (ch == '\0' && (preg->syntax & RE_DOT_NOT_NULL))); else return 0; } /* Extend the buffers, if the buffers have run out. */ static reg_errcode_t extend_buffers (mctx) re_match_context_t *mctx; { reg_errcode_t ret; re_string_t *pstr = mctx->input; /* Double the lengthes of the buffers. */ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); if (BE (ret != REG_NOERROR, 0)) return ret; if (mctx->state_log != NULL) { /* And double the length of state_log. */ re_dfastate_t **new_array; new_array = re_realloc (mctx->state_log, re_dfastate_t *, pstr->bufs_len * 2); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->state_log = new_array; } /* Then reconstruct the buffers. */ if (pstr->icase) { #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) build_wcs_upper_buffer (pstr); else #endif /* RE_ENABLE_I18N */ build_upper_buffer (pstr); } else { #ifdef RE_ENABLE_I18N if (re_mb_cur_max > 1) build_wcs_buffer (pstr); else #endif /* RE_ENABLE_I18N */ { if (pstr->trans != NULL) re_string_translate_buffer (pstr); else pstr->valid_len = pstr->bufs_len; } } return REG_NOERROR; } /* Functions for matching context. */ /* Initialize MCTX. */ static reg_errcode_t match_ctx_init (mctx, eflags, input, n) re_match_context_t *mctx; int eflags, n; re_string_t *input; { mctx->eflags = eflags; mctx->input = input; mctx->match_last = -1; if (n > 0) { mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) return REG_ESPACE; } else mctx->bkref_ents = NULL; mctx->nbkref_ents = 0; mctx->abkref_ents = n; mctx->max_mb_elem_len = 1; mctx->nsub_tops = 0; mctx->asub_tops = n; return REG_NOERROR; } /* Clean the entries which depend on the current input in MCTX. This function must be invoked when the matcher changes the start index of the input, or changes the input string. */ static void match_ctx_clean (mctx) re_match_context_t *mctx; { match_ctx_free_subtops (mctx); mctx->nsub_tops = 0; mctx->nbkref_ents = 0; } /* Free all the memory associated with MCTX. */ static void match_ctx_free (mctx) re_match_context_t *mctx; { match_ctx_free_subtops (mctx); re_free (mctx->sub_tops); re_free (mctx->bkref_ents); } /* Free all the memory associated with MCTX->SUB_TOPS. */ static void match_ctx_free_subtops (mctx) re_match_context_t *mctx; { int st_idx; for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) { int sl_idx; re_sub_match_top_t *top = mctx->sub_tops[st_idx]; for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) { re_sub_match_last_t *last = top->lasts[sl_idx]; re_free (last->path.array); re_free (last); } re_free (top->lasts); if (top->path) { re_free (top->path->array); re_free (top->path); } free (top); } } /* Add a new backreference entry to MCTX. Note that we assume that caller never call this function with duplicate entry, and call with STR_IDX which isn't smaller than any existing entry. */ static reg_errcode_t match_ctx_add_entry (mctx, node, str_idx, from, to) re_match_context_t *mctx; int node, str_idx, from, to; { if (mctx->nbkref_ents >= mctx->abkref_ents) { struct re_backref_cache_entry* new_entry; new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, mctx->abkref_ents * 2); if (BE (new_entry == NULL, 0)) { re_free (mctx->bkref_ents); return REG_ESPACE; } mctx->bkref_ents = new_entry; memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); mctx->abkref_ents *= 2; } mctx->bkref_ents[mctx->nbkref_ents].node = node; mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; mctx->bkref_ents[mctx->nbkref_ents++].flag = 0; if (mctx->max_mb_elem_len < to - from) mctx->max_mb_elem_len = to - from; return REG_NOERROR; } /* Search for the first entry which has the same str_idx. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ static int search_cur_bkref_entry (mctx, str_idx) re_match_context_t *mctx; int str_idx; { int left, right, mid; right = mctx->nbkref_ents; for (left = 0; left < right;) { mid = (left + right) / 2; if (mctx->bkref_ents[mid].str_idx < str_idx) left = mid + 1; else right = mid; } return left; } static void match_ctx_clear_flag (mctx) re_match_context_t *mctx; { int i; for (i = 0; i < mctx->nbkref_ents; ++i) { mctx->bkref_ents[i].flag = 0; } } /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches at STR_IDX. */ static reg_errcode_t match_ctx_add_subtop (mctx, node, str_idx) re_match_context_t *mctx; int node, str_idx; { #ifdef DEBUG assert (mctx->sub_tops != NULL); assert (mctx->asub_tops > 0); #endif if (mctx->nsub_tops == mctx->asub_tops) { re_sub_match_top_t **new_array; mctx->asub_tops *= 2; new_array = re_realloc (mctx->sub_tops, re_sub_match_top_t *, mctx->asub_tops); if (BE (new_array == NULL, 0)) return REG_ESPACE; mctx->sub_tops = new_array; } mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); if (mctx->sub_tops[mctx->nsub_tops] == NULL) return REG_ESPACE; mctx->sub_tops[mctx->nsub_tops]->node = node; mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; return REG_NOERROR; } /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ static re_sub_match_last_t * match_ctx_add_sublast (subtop, node, str_idx) re_sub_match_top_t *subtop; int node, str_idx; { re_sub_match_last_t *new_entry; if (subtop->nlasts == subtop->alasts) { re_sub_match_last_t **new_array; subtop->alasts = 2 * subtop->alasts + 1; new_array = re_realloc (subtop->lasts, re_sub_match_last_t *, subtop->alasts); if (BE (new_array == NULL, 0)) return NULL; subtop->lasts = new_array; } new_entry = calloc (1, sizeof (re_sub_match_last_t)); if (BE (new_entry == NULL, 0)) return NULL; subtop->lasts[subtop->nlasts] = new_entry; new_entry->node = node; new_entry->str_idx = str_idx; ++subtop->nlasts; return new_entry; } static void sift_ctx_init (sctx, sifted_sts, limited_sts, last_node, last_str_idx, check_subexp) re_sift_context_t *sctx; re_dfastate_t **sifted_sts, **limited_sts; int last_node, last_str_idx, check_subexp; { sctx->sifted_states = sifted_sts; sctx->limited_states = limited_sts; sctx->last_node = last_node; sctx->last_str_idx = last_str_idx; sctx->check_subexp = check_subexp; sctx->cur_bkref = -1; sctx->cls_subexp_idx = -1; re_node_set_init_empty (&sctx->limits); } EOF echo - 'test/Gentests' cat << 'EOF' > 'test/Gentests' #!/usr/bin/gawk -f # This program should generate Maketests BEGIN { # read the list of files for (i = 2; i < ARGC; i++) files[ARGV[i]] # throw it away ARGC = 2 ntests = 0 } # process the file Makefile.am: /^[A-Z_]*_TESTS *=/,/[^\\]$/ { gsub(/(^[A-Z_]*_TESTS *=|\\$)/,"") for (i = 1; i <= NF; i++) tests[++ntests] = $i next } /^NEED_LINT *=/,/[^\\]$/ { gsub(/(^NEED_LINT *=|\\$)/,"") for (i = 1; i <= NF; i++) lint[$i] next } /^GENTESTS_UNUSED *=/,/[^\\]$/ { gsub(/(^GENTESTS_UNUSED *=|\\$)/,"") for (i = 1; i <= NF; i++) unused[$i] next } /^[a-zA-Z][a-zA-Z0-9]*:/ { # remember all targets from Makefile.am sub(/:.*/,"") targets[$0] } # Now write the output file: END { # this line tells automake to keep the comment with the rules: print "Gt-dummy:" print "# file Maketests, generated from Makefile.am by the Gentests program" for (i = 1; i <= ntests; i++) { x = tests[i] if (!(x in targets)) generate(x) } print "# end of file Maketests" } function generate(x, s) { if (!(x".awk" in files)) printf "WARNING: file `%s.awk' not found.\n", x > "/dev/stderr" else delete files[x".awk"] print x ":" s = "" if (x in lint) { s = s " --lint" delete lint[x] } if (x".in" in files) { s = s " < $(srcdir)/$@.in" delete files[x".in"] } printf "\t@echo %s\n", x printf "\t@AWKPATH=$(srcdir) $(AWK) -f $@.awk %s >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@\n", s printf "\t@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@\n\n" } END { for (x in lint) if (!(x in targets)) printf "WARNING: --lint target `%s' is missing.\n", x > "/dev/stderr" for (x in files) if (!(x in unused) && \ !(gensub(/\.(awk|in)$/,"","",x) in targets)) printf "WARNING: unused file `%s'.\n", x > "/dev/stderr" } EOF echo - 'test/Makefile.am' cat << 'EOF' > 'test/Makefile.am' # # test/Makefile.am --- automake input file for gawk # # Copyright (C) 1988-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # ## process this file with automake to produce Makefile.in EXTRA_DIST = \ reg \ lib \ Gentests \ Maketests \ README \ addcomma.awk \ addcomma.in \ addcomma.ok \ anchgsub.awk \ anchgsub.in \ anchgsub.ok \ argarray.awk \ argarray.in \ argarray.ok \ argtest.awk \ argtest.ok \ arrayparm.awk \ arrayparm.ok \ arrayref.awk \ arrayref.ok \ arynasty.awk \ arynasty.ok \ arynocls.awk \ arynocls.in \ arynocls.ok \ arysubnm.awk \ arysubnm.ok \ arrymem1.awk \ arrymem1.ok \ asgext.awk \ asgext.in \ asgext.ok \ asort.awk \ asort.ok \ asorti.awk \ asorti.ok \ awkpath.ok \ back89.awk \ back89.in \ back89.ok \ backgsub.awk \ backgsub.in \ backgsub.ok \ badargs.ok \ childin.awk \ childin.in \ childin.ok \ clobber.awk \ clobber.ok \ clos1way.awk \ clos1way.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ compare.awk \ compare.in \ compare.ok \ compare2.awk \ compare2.ok \ concat1.awk \ concat1.in \ concat1.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ datanonl.in \ datanonl.ok \ defref.awk \ defref.ok \ delarprm.awk \ delarprm.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ fieldwdth.in \ fieldwdth.ok \ fldchg.awk \ fldchg.in \ fldchg.ok \ fldchgnf.awk \ fldchgnf.in \ fldchgnf.ok \ fnamedat.awk \ fnamedat.in \ fnamedat.ok \ fnarray.awk \ fnarray.ok \ fnarydel.awk \ fnarydel.ok \ fnaryscl.awk \ fnaryscl.ok \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ fnmisc.awk \ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ fsbs.in \ fsbs.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ fsrs.awk \ fsrs.in \ fsrs.ok \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ funsmnam.ok \ funstack.awk \ funstack.in \ funstack.ok \ gensub.awk \ gensub.in \ gensub.ok \ getline.awk \ getline.in \ getline.ok \ getline2.awk \ getline2.ok \ getline3.awk \ getline3.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ getnr2tb.in \ getnr2tb.ok \ getnr2tm.awk \ getnr2tm.in \ getnr2tm.ok \ gnuops2.awk \ gnuops2.ok \ gnureops.awk \ gnureops.ok \ gsubasgn.awk \ gsubasgn.ok \ gsubtest.awk \ gsubtest.ok \ gsubtst2.awk \ gsubtst2.ok \ gsubtst3.awk \ gsubtst3.in \ gsubtst3.ok \ gsubtst4.awk \ gsubtst4.ok \ gtlnbufv.awk \ hsprint.awk \ hsprint.ok \ icasefs.awk \ icasefs.ok \ icasers.awk \ icasers.in \ icasers.ok \ igncdym.awk \ igncdym.in \ igncdym.ok \ igncfs.awk \ igncfs.in \ igncfs.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ inftest.awk \ inftest.ok \ inputred.awk \ inputred.ok \ intest.awk \ intest.ok \ intprec.awk \ intprec.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ leadnl.in \ leadnl.ok \ lint.awk \ lint.ok \ litoct.awk \ litoct.ok \ longsub.awk \ longsub.in \ longsub.ok \ longwrds.awk \ longwrds.ok \ longwrds.in \ manyfiles.awk \ manyfiles.ok \ match1.awk \ match1.ok \ math.awk \ math.ok \ membug1.awk \ membug1.in \ membug1.ok \ messages.awk \ minusstr.awk \ minusstr.ok \ mmap8k.in \ nasty.awk \ nasty.ok \ nasty2.awk \ nasty2.ok \ negexp.awk \ negexp.ok \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ nfneg.awk \ nfneg.ok \ nfset.awk \ nfset.in \ nfset.ok \ nlfldsep.awk \ nlfldsep.in \ nlfldsep.ok \ nlinstr.awk \ nlinstr.in \ nlinstr.ok \ nlstrina.awk \ nlstrina.ok \ noeffect.awk \ noeffect.ok \ nofmtch.awk \ nofmtch.ok \ noloop1.awk \ noloop1.in \ noloop1.ok \ noloop2.awk \ noloop2.in \ noloop2.ok \ nondec.awk \ nondec.ok \ nonl.awk \ nonl.ok \ noparms.awk \ noparms.ok \ nors.in \ nors.ok \ nulrsend.awk \ nulrsend.in \ nulrsend.ok \ numindex.awk \ numindex.in \ numindex.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ octsub.awk \ octsub.ok \ ofmt.awk \ ofmt.in \ ofmt.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ ofmtfidl.awk \ ofmtfidl.in \ ofmtfidl.ok \ ofmts.awk \ ofmts.in \ ofmts.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ opasnidx.awk \ opasnidx.ok \ opasnslf.awk \ opasnslf.ok \ out1.ok \ out2.ok \ out3.ok \ paramdup.awk \ paramdup.ok \ paramtyp.awk \ paramtyp.ok \ parseme.awk \ parseme.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ pid.ok \ pid.sh \ pipeio1.awk \ pipeio1.ok \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ posix.awk \ posix.in \ posix.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ prec.awk \ prec.ok \ printf0.awk \ printf0.ok \ printf1.awk \ printf1.ok \ printfloat.awk \ prmarscl.awk \ prmarscl.ok \ prmreuse.awk \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ psx96sub.awk \ psx96sub.ok \ rand.awk \ rand.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ rebt8b2.ok \ redfilnm.awk \ redfilnm.in \ redfilnm.ok \ regeq.awk \ regeq.in \ regeq.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ rebuf.awk \ rebuf.in \ rebuf.ok \ reindops.awk \ reindops.in \ reindops.ok \ reint.awk \ reint.in \ reint.ok \ reparse.awk \ reparse.in \ reparse.ok \ resplit.awk \ resplit.in \ resplit.ok \ rs.awk \ rs.in \ rs.ok \ rsnul1nl.awk \ rsnul1nl.in \ rsnul1nl.ok \ rstest1.awk \ rstest1.ok \ rstest2.awk \ rstest2.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ sclforin.awk \ sclforin.ok \ sclifin.awk \ sclifin.ok \ shadow.awk \ shadow.ok \ sort1.awk \ sort1.ok \ space.ok \ splitargv.awk \ splitargv.in \ splitargv.ok \ splitarr.awk \ splitarr.ok \ splitdef.awk \ splitdef.ok \ splitvar.awk \ splitvar.in \ splitvar.ok \ splitwht.awk \ splitwht.ok \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ strtod.awk \ strtod.in \ strtod.ok \ strftime.awk \ strftlng.awk \ strftlng.ok \ subslash.awk \ subslash.ok \ substr.awk \ substr.ok \ swaplns.awk \ swaplns.in \ swaplns.ok \ synerr1.awk \ synerr1.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ tweakfld.awk \ tweakfld.in \ tweakfld.ok \ uninitialized.awk \ uninitialized.ok \ uninit2.awk \ uninit2.ok \ zeroe0.awk \ zeroe0.ok \ zeroflag.awk \ zeroflag.ok # try to keep these sorted BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 arynasty \ arynocls arysubnm asgext awkpath back89 backgsub childin clobber \ clsflnam compare compare2 concat1 convfmt datanonl defref delarprm \ dynlj eofsplit fldchg fldchgnf fnamedat fnarray fnarydel fnaryscl \ fnasgnm fnmisc fnparydl forsimp fsbs fsrs fstabplus funsemnl funsmnam \ funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 hsprint inputred intest intprec leaddig leadnl \ litoct longsub longwrds math membug1 messages minusstr mmap8k \ nasty nasty2 negexp nfldstr nfneg nfset nlfldsep nlinstr nlstrina \ noeffect nofmtch noloop1 noloop2 nonl noparms nors nulrsend \ numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts onlynl \ opasnidx opasnslf paramdup paramtyp parseme pcntplus prdupval prec \ printf0 printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand rebt8b1 \ rebt8b2 redfilnm regeq reindops reparse resplit rs rsnul1nl \ rstest1 rstest2 rswhite sclforin sclifin splitargv splitarr splitdef \ splitvar splitwht sprintfc strtod subslash substr swaplns synerr1 \ tradanch tweakfld uninitialized uninit2 zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ match1 manyfiles nondec posix procinfs regx8bit rebuf reint shadow \ sort1 strftime EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt # List of the tests which should be run with --lint option: NEED_LINT = defref noeffect nofmtch shadow uninitialized uninit2 # List of the files that appear in manual tests or are for reserve testing: GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) AWK = LC_ALL=C $(AWKPROG) # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid # spurious errors if `make -j' in effect. check: msg \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @echo 'precision may lead to slightly different output in a few cases.' basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=`pwd`/$(AWK) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed 's/ *//g' > _$@ @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ inftest:: @echo $@ @echo This test is very machine specific... @$(AWK) -f $(srcdir)/inftest.awk | sed 's/inf/Inf/g' >_$@ @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a second boundary, @echo so if it does, double check the actual results: @echo $@ @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ TZ=GMT0; export TZ; \ date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @AWKPATH=$(srcdir) AWK=$(AWKPROG) LC_ALL=C $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ nors:: @echo $@ @echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo This test is for establishing UDP connections @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo This test is for establishing TCP connections @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo This test is for bidirectional UDP transmission @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo This test is for bidirectional TCP transmission @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # Targets generated for other tests: include Maketests $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$<" *.awk *.in > $(srcdir)/Maketests clean: rm -fr _* core core.* junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ echo ============== $$i ============= ; \ diff -c $${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ fi ; \ done EOF echo - 'test/Makefile.in' cat << 'EOF' > 'test/Makefile.in' # Makefile.in generated by automake 1.7.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # test/Makefile.am --- automake input file for gawk # # Copyright (C) 1988-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. # # GAWK is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # GAWK is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_triplet = @host@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = LC_ALL=C $(AWKPROG) BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GENCAT = @GENCAT@ GLIBC21 = @GLIBC21@ GMSGFMT = @GMSGFMT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLBISON = @INTLBISON@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ STRIP = @STRIP@ U = @U@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ YACC = @YACC@ ac_ct_CC = @ac_ct_CC@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = \ reg \ lib \ Gentests \ Maketests \ README \ addcomma.awk \ addcomma.in \ addcomma.ok \ anchgsub.awk \ anchgsub.in \ anchgsub.ok \ argarray.awk \ argarray.in \ argarray.ok \ argtest.awk \ argtest.ok \ arrayparm.awk \ arrayparm.ok \ arrayref.awk \ arrayref.ok \ arynasty.awk \ arynasty.ok \ arynocls.awk \ arynocls.in \ arynocls.ok \ arysubnm.awk \ arysubnm.ok \ arrymem1.awk \ arrymem1.ok \ asgext.awk \ asgext.in \ asgext.ok \ asort.awk \ asort.ok \ asorti.awk \ asorti.ok \ awkpath.ok \ back89.awk \ back89.in \ back89.ok \ backgsub.awk \ backgsub.in \ backgsub.ok \ badargs.ok \ childin.awk \ childin.in \ childin.ok \ clobber.awk \ clobber.ok \ clos1way.awk \ clos1way.ok \ clsflnam.awk \ clsflnam.in \ clsflnam.ok \ compare.awk \ compare.in \ compare.ok \ compare2.awk \ compare2.ok \ concat1.awk \ concat1.in \ concat1.ok \ convfmt.awk \ convfmt.ok \ datanonl.awk \ datanonl.in \ datanonl.ok \ defref.awk \ defref.ok \ delarprm.awk \ delarprm.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ eofsplit.ok \ fflush.ok \ fflush.sh \ fieldwdth.awk \ fieldwdth.in \ fieldwdth.ok \ fldchg.awk \ fldchg.in \ fldchg.ok \ fldchgnf.awk \ fldchgnf.in \ fldchgnf.ok \ fnamedat.awk \ fnamedat.in \ fnamedat.ok \ fnarray.awk \ fnarray.ok \ fnarydel.awk \ fnarydel.ok \ fnaryscl.awk \ fnaryscl.ok \ fnasgnm.awk \ fnasgnm.in \ fnasgnm.ok \ fnmisc.awk \ fnmisc.ok \ fnparydl.awk \ fnparydl.ok \ forsimp.awk \ forsimp.ok \ fsbs.awk \ fsbs.in \ fsbs.ok \ fsfwfs.awk \ fsfwfs.in \ fsfwfs.ok \ fsrs.awk \ fsrs.in \ fsrs.ok \ fstabplus.awk \ fstabplus.in \ fstabplus.ok \ funsemnl.awk \ funsemnl.ok \ funsmnam.awk \ funsmnam.ok \ funstack.awk \ funstack.in \ funstack.ok \ gensub.awk \ gensub.in \ gensub.ok \ getline.awk \ getline.in \ getline.ok \ getline2.awk \ getline2.ok \ getline3.awk \ getline3.ok \ getlnbuf.awk \ getlnbuf.in \ getlnbuf.ok \ getlnhd.awk \ getlnhd.ok \ getnr2tb.awk \ getnr2tb.in \ getnr2tb.ok \ getnr2tm.awk \ getnr2tm.in \ getnr2tm.ok \ gnuops2.awk \ gnuops2.ok \ gnureops.awk \ gnureops.ok \ gsubasgn.awk \ gsubasgn.ok \ gsubtest.awk \ gsubtest.ok \ gsubtst2.awk \ gsubtst2.ok \ gsubtst3.awk \ gsubtst3.in \ gsubtst3.ok \ gsubtst4.awk \ gsubtst4.ok \ gtlnbufv.awk \ hsprint.awk \ hsprint.ok \ icasefs.awk \ icasefs.ok \ icasers.awk \ icasers.in \ icasers.ok \ igncdym.awk \ igncdym.in \ igncdym.ok \ igncfs.awk \ igncfs.in \ igncfs.ok \ ignrcase.awk \ ignrcase.in \ ignrcase.ok \ inftest.awk \ inftest.ok \ inputred.awk \ inputred.ok \ intest.awk \ intest.ok \ intprec.awk \ intprec.ok \ leaddig.awk \ leaddig.ok \ leadnl.awk \ leadnl.in \ leadnl.ok \ lint.awk \ lint.ok \ litoct.awk \ litoct.ok \ longsub.awk \ longsub.in \ longsub.ok \ longwrds.awk \ longwrds.ok \ longwrds.in \ manyfiles.awk \ manyfiles.ok \ match1.awk \ match1.ok \ math.awk \ math.ok \ membug1.awk \ membug1.in \ membug1.ok \ messages.awk \ minusstr.awk \ minusstr.ok \ mmap8k.in \ nasty.awk \ nasty.ok \ nasty2.awk \ nasty2.ok \ negexp.awk \ negexp.ok \ nfldstr.awk \ nfldstr.in \ nfldstr.ok \ nfneg.awk \ nfneg.ok \ nfset.awk \ nfset.in \ nfset.ok \ nlfldsep.awk \ nlfldsep.in \ nlfldsep.ok \ nlinstr.awk \ nlinstr.in \ nlinstr.ok \ nlstrina.awk \ nlstrina.ok \ noeffect.awk \ noeffect.ok \ nofmtch.awk \ nofmtch.ok \ noloop1.awk \ noloop1.in \ noloop1.ok \ noloop2.awk \ noloop2.in \ noloop2.ok \ nondec.awk \ nondec.ok \ nonl.awk \ nonl.ok \ noparms.awk \ noparms.ok \ nors.in \ nors.ok \ nulrsend.awk \ nulrsend.in \ nulrsend.ok \ numindex.awk \ numindex.in \ numindex.ok \ numsubstr.awk \ numsubstr.in \ numsubstr.ok \ octsub.awk \ octsub.ok \ ofmt.awk \ ofmt.in \ ofmt.ok \ ofmtbig.awk \ ofmtbig.in \ ofmtbig.ok \ ofmtfidl.awk \ ofmtfidl.in \ ofmtfidl.ok \ ofmts.awk \ ofmts.in \ ofmts.ok \ onlynl.awk \ onlynl.in \ onlynl.ok \ opasnidx.awk \ opasnidx.ok \ opasnslf.awk \ opasnslf.ok \ out1.ok \ out2.ok \ out3.ok \ paramdup.awk \ paramdup.ok \ paramtyp.awk \ paramtyp.ok \ parseme.awk \ parseme.ok \ pcntplus.awk \ pcntplus.ok \ pid.awk \ pid.ok \ pid.sh \ pipeio1.awk \ pipeio1.ok \ pipeio2.awk \ pipeio2.in \ pipeio2.ok \ posix.awk \ posix.in \ posix.ok \ poundbang.awk \ prdupval.awk \ prdupval.in \ prdupval.ok \ prec.awk \ prec.ok \ printf0.awk \ printf0.ok \ printf1.awk \ printf1.ok \ printfloat.awk \ prmarscl.awk \ prmarscl.ok \ prmreuse.awk \ prmreuse.ok \ procinfs.awk \ procinfs.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ prtoeval.ok \ psx96sub.awk \ psx96sub.ok \ rand.awk \ rand.ok \ rebt8b1.awk \ rebt8b1.ok \ rebt8b2.awk \ rebt8b2.ok \ redfilnm.awk \ redfilnm.in \ redfilnm.ok \ regeq.awk \ regeq.in \ regeq.ok \ regtest.sh \ regx8bit.awk \ regx8bit.ok \ rebuf.awk \ rebuf.in \ rebuf.ok \ reindops.awk \ reindops.in \ reindops.ok \ reint.awk \ reint.in \ reint.ok \ reparse.awk \ reparse.in \ reparse.ok \ resplit.awk \ resplit.in \ resplit.ok \ rs.awk \ rs.in \ rs.ok \ rsnul1nl.awk \ rsnul1nl.in \ rsnul1nl.ok \ rstest1.awk \ rstest1.ok \ rstest2.awk \ rstest2.ok \ rswhite.awk \ rswhite.in \ rswhite.ok \ sclforin.awk \ sclforin.ok \ sclifin.awk \ sclifin.ok \ shadow.awk \ shadow.ok \ sort1.awk \ sort1.ok \ space.ok \ splitargv.awk \ splitargv.in \ splitargv.ok \ splitarr.awk \ splitarr.ok \ splitdef.awk \ splitdef.ok \ splitvar.awk \ splitvar.in \ splitvar.ok \ splitwht.awk \ splitwht.ok \ sprintfc.awk \ sprintfc.in \ sprintfc.ok \ strtod.awk \ strtod.in \ strtod.ok \ strftime.awk \ strftlng.awk \ strftlng.ok \ subslash.awk \ subslash.ok \ substr.awk \ substr.ok \ swaplns.awk \ swaplns.in \ swaplns.ok \ synerr1.awk \ synerr1.ok \ tradanch.awk \ tradanch.in \ tradanch.ok \ tweakfld.awk \ tweakfld.in \ tweakfld.ok \ uninitialized.awk \ uninitialized.ok \ uninit2.awk \ uninit2.ok \ zeroe0.awk \ zeroe0.ok \ zeroflag.awk \ zeroflag.ok # try to keep these sorted BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 arynasty \ arynocls arysubnm asgext awkpath back89 backgsub childin clobber \ clsflnam compare compare2 concat1 convfmt datanonl defref delarprm \ dynlj eofsplit fldchg fldchgnf fnamedat fnarray fnarydel fnaryscl \ fnasgnm fnmisc fnparydl forsimp fsbs fsrs fstabplus funsemnl funsmnam \ funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ gsubtst2 gsubtst3 gsubtst4 hsprint inputred intest intprec leaddig leadnl \ litoct longsub longwrds math membug1 messages minusstr mmap8k \ nasty nasty2 negexp nfldstr nfneg nfset nlfldsep nlinstr nlstrina \ noeffect nofmtch noloop1 noloop2 nonl noparms nors nulrsend \ numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts onlynl \ opasnidx opasnslf paramdup paramtyp parseme pcntplus prdupval prec \ printf0 printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand rebt8b1 \ rebt8b2 redfilnm regeq reindops reparse resplit rs rsnul1nl \ rstest1 rstest2 rswhite sclforin sclifin splitargv splitarr splitdef \ splitvar splitwht sprintfc strtod subslash substr swaplns synerr1 \ tradanch tweakfld uninitialized uninit2 zeroe0 zeroflag UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ match1 manyfiles nondec posix procinfs regx8bit rebuf reint shadow \ sort1 strftime EXTRA_TESTS = regtest inftest INET_TESTS = inetechu inetecht inetdayu inetdayt # List of the tests which should be run with --lint option: NEED_LINT = defref noeffect nofmtch shadow uninitialized uninit2 # List of the files that appear in manual tests or are for reserve testing: GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk CMP = cmp AWKPROG = ../gawk$(EXEEXT) subdir = test mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = README $(srcdir)/Maketests ChangeLog Makefile.am \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(srcdir)/Maketests $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Message stuff is to make it a little easier to follow. # Make the pass-fail last and dependent on others to avoid # spurious errors if `make -j' in effect. check: msg \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ extend-msg-start gawk-extensions extend-msg-end @$(MAKE) pass-fail basic: $(BASIC_TESTS) unix-tests: $(UNIX_TESTS) gawk-extensions: $(GAWK_EXT_TESTS) extra: $(EXTRA_TESTS) inet inet: inetmesg $(INET_TESTS) msg:: @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @echo 'precision may lead to slightly different output in a few cases.' basic-msg-start: @echo "======== Starting basic tests ========" basic-msg-end: @echo "======== Done with basic tests ========" unix-msg-start: @echo "======== Starting Unix tests ========" unix-msg-end: @echo "======== Done with Unix tests ========" extend-msg-start: @echo "======== Starting gawk extension tests ========" extend-msg-end: @echo "======== Done with gawk extension tests ========" # This test is a PITA because increasingly, /tmp is getting # mounted noexec. So, we'll test it locally. Sigh. # # More PITA; some systems have medium short limits on #! paths, # so this can still fail poundbang:: @echo $@ @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk @chmod +x ./_pbd.awk @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ then : ; \ else \ sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ chmod +x ./_pbd.awk ; \ ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ @case $(srcdir) in \ .) : ;; \ *) rm -f ./argarray.in ;; \ esac @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' AWK=`pwd`/$(AWK) $(srcdir)/regtest.sh manyfiles:: @echo manyfiles @rm -rf junk @mkdir junk @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed 's/ *//g' > _$@ @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare:: @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ inftest:: @echo $@ @echo This test is very machine specific... @$(AWK) -f $(srcdir)/inftest.awk | sed 's/inf/Inf/g' >_$@ @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ getline2:: @echo $@ @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ awkpath:: @echo $@ @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ argtest:: @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ badargs:: @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ nonl:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ strftime:: @echo This test could fail on slow machines or on a second boundary, @echo so if it does, double check the actual results: @echo $@ @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ TZ=GMT0; export TZ; \ date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ tweakfld:: @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ mmap8k:: @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: @echo pid @AWKPATH=$(srcdir) AWK=$(AWKPROG) LC_ALL=C $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in strftlng:: @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ nors:: @echo $@ @echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ reint:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ pipeio1:: @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ pipeio2:: @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ clobber:: @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq arynocls:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ getlnbuf:: @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". inetechu:: @echo This test is for establishing UDP connections @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: @echo This test is for establishing TCP connections @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: @echo This test is for bidirectional UDP transmission @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: @echo This test is for bidirectional TCP transmission @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' redfilnm:: @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ leaddig:: @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ gsubtst3:: @echo $@ @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ space:: @echo $@ @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf0:: @echo $@ @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tb: @echo getnr2tb @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ hsprint: @echo hsprint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtbig: @echo ofmtbig @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ psx96sub: @echo psx96sub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rand: @echo rand @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reindops: @echo reindops @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fieldwdth: @echo fieldwdth @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsfwfs: @echo fsfwfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub: @echo gensub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lint: @echo lint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nondec: @echo nondec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ posix: @echo posix @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ procinfs: @echo procinfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebuf: @echo rebuf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests # Targets generated for other tests: $(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests $(AWK) -f $(srcdir)/Gentests "$<" *.awk *.in > $(srcdir)/Maketests clean: rm -fr _* core core.* junk out1 out2 out3 strftime.ok test1 test2 seq *~ # An attempt to print something that can be grepped for in build logs pass-fail: @COUNT=`ls _* 2>/dev/null | wc -l` ; \ if test $$COUNT = 0 ; \ then echo ALL TESTS PASSED ; \ else echo $$COUNT TESTS FAILED ; \ fi # This target for my convenience to look at all the results diffout: for i in _* ; \ do \ echo ============== $$i ============= ; \ diff -c $${i#_}.ok $$i ; \ done | more # This target is for testing with electric fence. efence: for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ do \ bad=$$(wc -l < _$$i) \ ok=$$(wc -l < $$i.ok) ; \ if (( $$bad == $$ok + 2 )) ; \ then \ rm _$$i ; \ fi ; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: EOF echo - 'test/Maketests' cat << 'EOF' > 'test/Maketests' Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: @echo addcomma @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ anchgsub: @echo anchgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayparm: @echo arrayparm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrayref: @echo arrayref @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arrymem1: @echo arrymem1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arynasty: @echo arynasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ arysubnm: @echo arysubnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asgext: @echo asgext @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ back89: @echo back89 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ backgsub: @echo backgsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ childin: @echo childin @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clsflnam: @echo clsflnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare2: @echo compare2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ concat1: @echo concat1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ convfmt: @echo convfmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ datanonl: @echo datanonl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ defref: @echo defref @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ delarprm: @echo delarprm @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ dynlj: @echo dynlj @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ eofsplit: @echo eofsplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchg: @echo fldchg @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fldchgnf: @echo fldchgnf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnamedat: @echo fnamedat @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarray: @echo fnarray @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnarydel: @echo fnarydel @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnaryscl: @echo fnaryscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnasgnm: @echo fnasgnm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnmisc: @echo fnmisc @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fnparydl: @echo fnparydl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ forsimp: @echo forsimp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsbs: @echo fsbs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsrs: @echo fsrs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fstabplus: @echo fstabplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsemnl: @echo funsemnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funsmnam: @echo funsmnam @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ funstack: @echo funstack @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline: @echo getline @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getline3: @echo getline3 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tb: @echo getnr2tb @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getnr2tm: @echo getnr2tm @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubasgn: @echo gsubasgn @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtest: @echo gsubtest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst2: @echo gsubtst2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gsubtst4: @echo gsubtst4 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ hsprint: @echo hsprint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ inputred: @echo inputred @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intest: @echo intest @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ intprec: @echo intprec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ leadnl: @echo leadnl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longsub: @echo longsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ longwrds: @echo longwrds @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ math: @echo math @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ membug1: @echo membug1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ minusstr: @echo minusstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty: @echo nasty @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nasty2: @echo nasty2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ negexp: @echo negexp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfldstr: @echo nfldstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfneg: @echo nfneg @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nfset: @echo nfset @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlfldsep: @echo nlfldsep @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlinstr: @echo nlinstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nlstrina: @echo nlstrina @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noeffect: @echo noeffect @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nofmtch: @echo nofmtch @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop1: @echo noloop1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noloop2: @echo noloop2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ noparms: @echo noparms @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nulrsend: @echo nulrsend @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numindex: @echo numindex @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ numsubstr: @echo numsubstr @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ octsub: @echo octsub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmt: @echo ofmt @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtbig: @echo ofmtbig @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmtfidl: @echo ofmtfidl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ofmts: @echo ofmts @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ onlynl: @echo onlynl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnidx: @echo opasnidx @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ opasnslf: @echo opasnslf @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramdup: @echo paramdup @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ paramtyp: @echo paramtyp @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ parseme: @echo parseme @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ pcntplus: @echo pcntplus @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prdupval: @echo prdupval @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prec: @echo prec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ printf1: @echo printf1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmarscl: @echo prmarscl @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prmreuse: @echo prmreuse @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prt1eval: @echo prt1eval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ prtoeval: @echo prtoeval @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ psx96sub: @echo psx96sub @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rand: @echo rand @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b1: @echo rebt8b1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebt8b2: @echo rebt8b2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regeq: @echo regeq @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reindops: @echo reindops @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ reparse: @echo reparse @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ resplit: @echo resplit @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rs: @echo rs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rsnul1nl: @echo rsnul1nl @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest1: @echo rstest1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rstest2: @echo rstest2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rswhite: @echo rswhite @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclforin: @echo sclforin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sclifin: @echo sclifin @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitargv: @echo splitargv @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitarr: @echo splitarr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitdef: @echo splitdef @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitvar: @echo splitvar @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ splitwht: @echo splitwht @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sprintfc: @echo sprintfc @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ strtod: @echo strtod @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ subslash: @echo subslash @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ substr: @echo substr @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ swaplns: @echo swaplns @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ synerr1: @echo synerr1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninitialized: @echo uninitialized @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ uninit2: @echo uninit2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroe0: @echo zeroe0 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ zeroflag: @echo zeroflag @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ getlnhd: @echo getlnhd @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asort: @echo asort @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ asorti: @echo asorti @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ clos1way: @echo clos1way @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fieldwdth: @echo fieldwdth @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ fsfwfs: @echo fsfwfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gensub: @echo gensub @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnuops2: @echo gnuops2 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ gnureops: @echo gnureops @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasefs: @echo icasefs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ icasers: @echo icasers @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncdym: @echo igncdym @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ igncfs: @echo igncfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ ignrcase: @echo ignrcase @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ lint: @echo lint @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ match1: @echo match1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ nondec: @echo nondec @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ posix: @echo posix @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ procinfs: @echo procinfs @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ regx8bit: @echo regx8bit @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ rebuf: @echo rebuf @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ shadow: @echo shadow @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ sort1: @echo sort1 @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ # end of file Maketests EOF # apply patch patch -p1 << \EOF diff -urN gawk-3.1.1/ABOUT-NLS gawk-3.1.2/ABOUT-NLS --- gawk-3.1.1/ABOUT-NLS 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/ABOUT-NLS 2003-02-20 15:38:01.000000000 +0200 @@ -171,202 +171,232 @@ ================== Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of April +matrix shows the current state of internationalization, as of August 2002. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. - Ready PO files bg ca cs da de el en eo es et fi fr - +-------------------------------------+ - a2ps | [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] [] | - clisp | [] [] [] [] | - cpio | [] [] [] [] | - diffutils | [] [] [] [] [] [] | - enscript | [] [] | - error | [] [] | - fetchmail | [] () [] [] [] () | - fileutils | [] [] [] [] [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] [] | - gas | [] [] | - gawk | [] [] [] | - gcal | [] [] | - gcc | [] [] | - gettext | [] [] [] [] [] | - gnupg | [] [] [] [] [] [] | - gprof | [] [] | - gpsdrive | () () () () () | - grep | [] [] [] [] [] [] [] | - gretl | | - hello | [] [] [] [] [] [] [] [] | - id-utils | [] [] [] | - indent | [] [] [] [] [] | - jpilot | () [] [] [] | - jwhois | [] [] | - kbd | [] [] | - ld | [] [] | - libc | [] [] [] [] [] [] [] | - lilypond | [] [] | - lynx | [] [] [] [] | - m4 | [] [] [] [] [] | - make | [] [] [] [] | - mysecretdiary | [] [] | - nano | [] () [] [] [] [] | - nano_1_0 | [] () [] [] [] [] | - opcodes | [] [] [] | - parted | [] [] [] [] [] | - ptx | [] [] [] [] [] | - python | | - recode | [] [] [] [] [] [] | - sed | [] [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] [] [] | - sketch | () [] () | - soundtracker | [] [] [] | - sp | [] | - tar | [] [] [] [] [] [] | - texinfo | [] [] [] [] [] | - textutils | [] [] [] [] [] | - util-linux | [] [] [] [] [] [] | - vorbis-tools | | - wastesedge | | - wdiff | [] [] [] [] [] [] | - wget | [] [] [] [] [] [] [] [] [] | - +-------------------------------------+ - bg ca cs da de el en eo es et fi fr - 2 14 11 31 40 10 1 8 41 16 1 50 + Ready PO files be bg ca cs da de el en eo es et fi fr + +----------------------------------------+ + a2ps | [] [] [] [] | + ap-utils | | + bash | [] [] [] [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + clisp | | + clisp | [] [] [] [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | () | + diffutils | [] [] [] [] [] [] | + enscript | [] [] | + error | [] [] [] | + fetchmail | [] () [] [] [] () | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + gas | [] [] | + gawk | [] [] [] | + gcal | [] [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gnupg | [] [] [] [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () () () | + grep | [] [] [] [] [] [] [] [] | + gretl | [] | + gthumb | () () () | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] | + jpilot | () [] [] [] | + jwhois | [] [] | + kbd | [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] [] [] | + libiconv | [] [] [] [] | + lifelines | () () | + lilypond | [] [] | + lingoteach | [] [] | + lingoteach_lessons| () () | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] | + make | [] [] [] [] | + man-db | [] () () [] () () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] [] | + nano_1_0 | [] () [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + recode | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + sketch | () [] () | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] [] | + textutils | [] [] [] [] [] | + util-linux | [] [] [] [] [] [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] [] [] | + +----------------------------------------+ + be bg ca cs da de el en eo es et fi fr + 0 2 19 10 30 44 9 1 12 44 17 6 53 gl he hr hu id it ja ko lv nb nl nn +-------------------------------------+ a2ps | () () [] | - bash | | + ap-utils | | + bash | [] | bfd | [] | binutils | [] | - bison | [] [] | + bison | [] [] [] [] | + clisp | | clisp | [] | - cpio | [] [] [] | - diffutils | [] [] [] [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | | + diffutils | [] [] [] [] [] | enscript | [] [] | error | [] | fetchmail | [] | fileutils | [] [] [] | - findutils | [] [] [] [] [] [] [] | + findutils | [] [] [] [] [] [] [] [] | flex | [] | gas | | gawk | [] | gcal | | - gcc | | + gcc | [] | gettext | [] [] | gnupg | [] [] [] [] | - gprof | | - gpsdrive | () () | - grep | [] [] [] [] [] [] | + gprof | [] | + gpsdrive | [] () () | + grep | [] [] [] [] [] [] [] | gretl | | + gthumb | () () | hello | [] [] [] [] [] [] [] [] [] [] [] [] | - id-utils | [] | - indent | [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | jpilot | () () | - jwhois | [] | + jwhois | [] [] | kbd | | ld | | libc | [] [] [] [] | - lilypond | [] [] | - lynx | [] [] [] | + libiconv | [] [] [] | + lifelines | | + lilypond | [] | + lingoteach | [] | + lingoteach_lessons| | + lynx | [] [] [] [] | m4 | [] [] [] [] | make | [] [] [] [] [] [] | - mysecretdiary | | - nano | [] [] [] () [] [] [] | - nano_1_0 | [] [] [] () [] [] | - opcodes | [] | + man-db | () () | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] [] | + opcodes | [] [] | parted | [] [] [] | - ptx | [] [] [] [] | + ptx | [] [] [] [] [] | python | | recode | [] [] [] | - sed | [] [] [] [] [] [] [] | - sh-utils | [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] | sharutils | [] [] [] | sketch | () | - soundtracker | [] | + soundtracker | [] [] | sp | | - tar | [] [] [] [] [] | + tar | [] [] [] [] [] [] | texinfo | [] [] [] | - textutils | [] [] [] | + textutils | [] [] [] [] | util-linux | () [] | - vorbis-tools | | + vorbis-tools | [] | wastesedge | | - wdiff | [] [] | + wdiff | [] [] [] | wget | [] [] [] [] [] [] | +-------------------------------------+ gl he hr hu id it ja ko lv nb nl nn - 23 9 8 4 12 12 25 9 1 8 20 4 + 23 9 12 19 16 13 26 9 1 7 19 3 - no pl pt pt_BR ru sk sl sv tr uk zh_TW - +----------------------------------------+ - a2ps | () () () [] [] [] [] () | 9 - bash | | 4 - bfd | [] [] | 5 - binutils | [] | 4 - bison | [] [] [] | 9 - clisp | | 5 - cpio | [] [] [] [] | 11 - diffutils | [] [] [] [] [] [] | 16 - enscript | [] [] [] | 7 - error | [] [] [] | 6 - fetchmail | () () [] | 6 - fileutils | [] [] [] [] [] | 13 - findutils | [] [] [] [] [] [] [] | 19 - flex | [] [] [] | 9 - gas | [] | 3 - gawk | [] [] | 6 - gcal | [] [] | 4 - gcc | [] | 3 - gettext | [] [] [] [] [] [] | 13 - gnupg | [] [] [] | 13 - gprof | [] [] | 4 - gpsdrive | () | 0 - grep | [] [] [] [] | 17 - gretl | | 0 - hello | [] [] [] [] [] [] [] | 27 - id-utils | [] [] | 6 - indent | [] [] [] [] | 12 - jpilot | () () [] | 4 - jwhois | () () [] [] | 5 - kbd | [] [] | 4 - ld | [] [] | 4 - libc | [] [] [] [] [] [] | 17 - lilypond | [] | 5 - lynx | [] [] [] | 10 - m4 | [] [] [] | 12 - make | [] [] [] [] | 14 - mysecretdiary | [] [] | 4 - nano | () [] [] [] [] | 15 - nano_1_0 | () [] [] [] [] | 14 - opcodes | [] [] | 6 - parted | [] [] [] | 11 - ptx | [] [] [] [] [] [] | 15 - python | | 0 - recode | [] [] [] [] | 13 - sed | [] [] [] [] [] [] | 21 - sh-utils | [] [] [] [] [] [] [] [] [] | 22 - sharutils | [] [] [] [] | 13 - sketch | [] () | 3 - soundtracker | [] | 5 - sp | | 1 - tar | [] [] [] [] [] [] [] | 18 - texinfo | [] [] | 10 - textutils | [] [] [] [] [] | 13 - util-linux | [] [] [] | 10 - vorbis-tools | [] | 1 - wastesedge | | 0 - wdiff | [] [] [] [] | 12 - wget | [] [] [] [] [] [] [] [] | 23 - +----------------------------------------+ - 35 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW - 58 domains 5 16 2 14 27 11 11 41 36 4 9 536 + no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + +----------------------------------------------+ + a2ps | () () () [] [] [] [] [] | 10 + ap-utils | () | 0 + bash | [] | 6 + bfd | [] [] | 5 + binutils | [] [] | 5 + bison | [] [] [] [] | 12 + clisp | | 0 + clisp | | 5 + clisplow | | 0 + cpio | [] [] [] [] | 12 + darkstat | [] [] () () | 2 + diffutils | [] [] [] [] [] [] | 17 + enscript | [] [] [] [] | 8 + error | [] [] [] | 7 + fetchmail | () () [] | 6 + fileutils | [] [] [] [] [] [] | 14 + findutils | [] [] [] [] [] [] [] | 21 + flex | [] [] [] | 9 + gas | [] | 3 + gawk | [] [] | 6 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 13 + gnupg | [] [] [] | 14 + gprof | [] [] | 5 + gpsdrive | [] [] | 3 + grep | [] [] [] [] [] | 20 + gretl | | 1 + gthumb | () () [] | 1 + hello | [] [] [] [] [] [] [] | 28 + id-utils | [] [] [] [] | 9 + indent | [] [] [] [] [] | 14 + jpilot | () () [] [] | 5 + jwhois | [] () () [] [] | 7 + kbd | [] [] | 5 + ld | [] [] | 4 + libc | [] [] [] [] [] [] | 18 + libiconv | [] [] [] [] [] | 12 + lifelines | [] | 1 + lilypond | [] | 4 + lingoteach | [] [] | 5 + lingoteach_lessons| () | 0 + lynx | [] [] [] [] | 13 + m4 | [] [] [] [] | 13 + make | [] [] [] [] [] | 15 + man-db | | 3 + mysecretdiary | [] [] [] | 7 + nano | [] [] [] [] | 13 + nano_1_0 | [] [] [] [] | 14 + opcodes | [] [] [] | 8 + parted | [] [] [] [] | 12 + ptx | [] [] [] [] [] [] [] | 19 + python | | 0 + recode | [] [] [] [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 9 + sharutils | [] [] [] [] | 14 + sketch | [] () [] | 4 + soundtracker | [] | 6 + sp | | 1 + tar | [] [] [] [] [] [] [] | 19 + texinfo | [] [] | 10 + textutils | [] [] [] [] [] | 14 + util-linux | [] [] [] | 10 + vorbis-tools | [] | 3 + wastesedge | | 0 + wdiff | [] [] [] [] [] | 14 + wget | [] [] [] [] [] [] [] [] | 24 + +----------------------------------------------+ + 37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + 68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are @@ -379,7 +409,7 @@ lag between the mere existence a PO file and its wide availability in a distribution. - If April 2002 seems to be old, you may fetch a more recent copy of + If August 2002 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. @@ -396,7 +426,7 @@ library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle -to use of `gettext' the only thing missing are the translations. The +the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact diff -urN gawk-3.1.1/ChangeLog gawk-3.1.2/ChangeLog --- gawk-3.1.1/ChangeLog 2002-05-01 16:41:47.000000000 +0300 +++ gawk-3.1.2/ChangeLog 2003-03-19 14:10:56.000000000 +0200 @@ -1,3 +1,1178 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Wed Mar 19 14:08:11 2003 Arnold D. Robbins + + * awkgram.y: Production `program --> program error'. Add a return so + that we don't produce an infinite stream of error messages. + Thanks to Michael Mauch for pointing this out. + +Wed Mar 19 13:45:50 2003 Corinna Vinschen + + * regex.c [RE_ENBABLE_I18N]: remove definition; the one in + regex_internal.h is better and makes things work with Cygwin. + +Tue Mar 11 11:54:20 2003 Arnold D. Robbins + + * regex_internal.h: Don't include after was + included in regex.c, since it could redefine RE_DUP_MAX to a lower + value. + (bitset_set, bitset_clear, bitset_contain): Use 1UL instead of 1 in + left shift operations. + * regex.c: Include before + * regcomp.c (re_compile_fastmap_iter, init_word_char, parse_expression): + Use 1UL instead of 1 in left shift operations. + +Mon Mar 10 15:45:37 2003 Corinna Vinschen + + * configure.in: Update CYGWIN case to add /usr/lib/automode.o. + +Thu Mar 6 11:07:36 2003 Arnold D. Robbins + + Updated to automake 1.7.3. + + * config.guess, config.sub: Updated from prep. + * Makefile.am (AUTOMAKE_OPTIONS): Add dist-bzip2 to get .bz2 files. + +Tue Mar 4 10:40:46 2003 Arnold D. Robbins + + * version.in: Added goop for K&R compilers; forgot that I have to fix + this file which then is used to create version.c. + +Mon Mar 3 17:00:44 2003 Arnold D. Robbins + + * configure.in: New option --disable-lint. + * awk.h (do_lint, do_lint_old): Conditionally declare based on NO_LINT. + * eval.c (set_LINT): Ifdef out body if NO_LINT. + * main.c (do_lint, do_lint_old): Conditionally compile properly. + (main): Handle --lint argument code. + +Fri Feb 28 10:43:07 2003 Arnold D. Robbins + + * main.c (main): Add LC_TIME to the things that get set with + setlocale(). + * builtin.c (format_tree): Change test of `n0-- <= 0' to ==, avoids + VMS diagnostic. + +Thu Feb 27 17:48:29 2003 Pat Rankin + + * regexec.c (proceed_next_node): Cast re_string_get_buffer to char *. + (get_subexp): Likewise. + +Tue Feb 25 12:33:41 2003 Arnold D. Robbins + + * regex_internal.h, regex_internal.c, regcomp.c, regexec.c: + Make MB_CUR_MAX into thread local variable re_mb_cur_max. + + Unrelated, from Scott Deifik: + + * io.c (grow_iop_buffer): Add checks for overflow of new buffer size. + +Mon Feb 24 13:30:59 2003 Arnold D. Robbins + + * awk.h (gawk_mb_cur_max): Declared: + * main.c (gawk_mb_cur_max): Defined, init to 1. + (main): Initialize gawk_mb_cur_max. + * awkgram.y, builtin.c, eval.c, field.c, io.c, re.c (mb_cur_max): + Replaces all instances of MB_CUR_MAX, which is a function call (!) + in glibc. Big speed up, especially for -Fx case, where x is a + single character. + + Unrelated: + + * awkgram.y (rule): For non-existent action, use a Node_K_print_rec + node. + +Sun Feb 23 15:45:20 2003 Arnold D. Robbins + + Speed up plain `print' and `print $0': + + * awk.h (Node_K_print_rec): New node type. + (do_print_rec): Declare function. + * awkgram.y (simple_stmt): Create humongous test for plain `print' + or `print $0', and if so, use a Node_K_print_rec for it. Modify + test for lint message. + * builtin.c (redirect_to_fp): New function for common code to get fp + and rp for do_print{,f,_rec} functions. + (do_print): Use redirect_to_fp(). + (do_printf): Use redirect_to_fp(). + (do_print_rec): New function to just print $0 from field_arr[0] + directly; will rebuild the record first if necessary. + * eval.c (nodetypes): Add Node_K_print_rec. + (interpret): Add Node_K_print_rec case. + * profile.c (pprint): Add Node_K_print_rec case. + (pp_print_stmt): If null lnode, print "$0" else print the lnode. + + Unrelated: + + * regex_internal.h: Add ENABLE_NLS to the condition for using + gettext so that --disable-nls really disables it. + +Sat Feb 23 22:46:00 2003 Arnold D. Robbins + + * io.c (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record): + Modify buffer-filling algorithm to always read one or more multiples + of the blocksize (iop->readsize). + (grow_iop_buffer): Make sure there's room for the current partially + read record and one disk block buffer. + +Thu Feb 20 22:02:00 2003 Arnold D. Robbins + + * re.c (research): Fix typo in cast of precision value to int. + * regex.h, regex.c, re_internal.h, re_internal.c, regcomp.c, regexec.c: + synced to GLIBC source, maintaining K&R portability changes, and bug + fixes, although losing ability to compile each file separately. + * Makefile.am (SOURCES): Moved placement of regex source files from here ... + (EXTRA_DIST): ... to here. + +Tue Feb 18 14:17:33 2003 Arnold D. Robbins + + * re.c (research): Cast precision value to int. + * builtin.c (format_tree): For toofew, cast field width value to int. + * io.c (rsre_get_a_record): Initialize restart and reend. Add a variable + to make sure they're set before used at end of function. + (iopflags2str): Removed decl at top and made not static so that GCC + stops complaining that it's defined but not used. Bleah. + +Mon Feb 17 11:02:34 2003 Arnold D. Robbins + + * config.guess, config.sub: Updated from prep. + +Sun Feb 16 15:47:15 2003 Scott Deifik + + * awk.h (format_tree, make_str_node): Changed decls to match how + they are called. + * builtin.c (format_tree, sub_common): Same. + * node.c (make_str_node): Same. + +Wed Feb 5 14:18:01 2003 Arnold D. Robbins + + * awk.h: Removed duplicate decl of set_prof_file(). Removed + undef of const for non-ANSI C; config.h should handle it. + * msg.c (set_loc): Use srcfile and srcline in regular code to shut up + stupid SGI compiler. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Tue Feb 4 13:40:41 2003 Martin C. Brown + + * intl/libgnuintl.h: Preprocessor fixes for MacOS X. + * regex.h: Ditto. + +Tue Feb 4 13:39:37 2003 Arnold D. Robbins + + * awkgram.y (builtin_func): New string for use in rationalizing + function parsing and installation code. + +Sun Feb 2 16:00:55 2003 Arnold D. Robbins + + Cache function body code pointer so that only have to find it the + first time a function is called. This potential for optimization + brought to my attention by Stepan Kasal. + + * awk.h [funcbody]: New macro. + * awkgram.y (FUNC_CALL): Set $$->funcbody to NULL. + * eval.c (func_call): Changed to take top-level Node_func_call as the + single parameter. Do the lookup and caching. + (r_tree_eval): Change how func_call() is called in switch. + * profile.c (pp_func_call): Similar changes. + (tree_eval): Ditto. + +Sun Feb 2 15:32:42 2003 Stepan Kasal + + ADR: More grammar rationalization/repair from Stepan. + + * awkgram.y (common_exp, simp_exp): the rule from getline (without + pipe) has been moved from common_exp to simp_exp. + + The redirection of print statements reworked. The idea comes from + mawk-1.3.3; much thanks to Michael Brennan! + + * awkgram.y (IO_OUT, IO_IN): new tokens. + (APPEND_OP, TWOWAYIO): swallowed by the above ones. + (in_print, in_parens): new static variables, to trace whether + IO_OUT is expected. + (yylex): emit the new tokens, update in_parens on '(' and ')'. + (exp): the print command(s) reworked. + (oputput_redir): reworked. + (print_expression_list): new non-terminal. + (rexp, rexpression_list opt_rexpression_list): nuked. + (exp, simp_exp): ``cmd|getline'' rule changed to + ``cmd IO_IN getline'' and moved from exp to simp_exp. + + Unrelated: + + * awkgram.y (variable): Don't return Node_func, issue a fatal + error instead. + * eval.c (r_tree_eval, r_get_lhs): Omit special checks for Node_func, + nodes of this type cannot get into the program tree. + * profile.c (tree_eval, pp_lhs): Likewise. + +Thu Jan 30 17:42:05 2003 Stepan Kasal + + ADR: Applied lots of patches from Stepan. + + * array.c (do_delete_loop): Call after_assign for the loop index. + * field.c (do_split): The third argument to split(), sep, has to be + evaluated and the result dupnoded before assoc_clear is called, + similarily as src. And we needn't to evaluate the third argument + if it's CONSTant regex and the first parameter is null string. + * awk.h (dupnode): Changed to macro, function renamed to r_dupnode. + * node.c (dupnode, r_dupnode): Rename. + * awkgram.y (parms_shadow): Return bool value, ... + (shadow_funcs): ... which will enable us to end the program if + lintfunc is fatal. + (program): Cleanup of the rules defining the ``program'' non-terminal. + (start, program, rule): no value associated, + expression_value is now treated similarily as begin_block and end_block. + (pattern, rule): bison actions for non-terminal `pattern' now + add a new rule to the appropriate Node_rule_list, action for + non-terminal `rule' now only adds the associated code block + to the rnode of Node_rule_node. + (io_allowed): renamed to !begin_or_end_rule. + (append_pattern): New function, adds new Node_rule_node to a rule_list. + (mkrangenode): Deleted, this tiny function was called only once. + (function_body): non-terminal replaced by `action'. + (statements, action, statement): `statements' can now be empty; + both callers had to accomodate to this. + (statements): Don't call isnoeffect($2->type) if + $2 happens to be NULL. + +Mon Jan 27 14:12:19 2003 Arnold D. Robbins + + * io.c (iop_close): Based on report by Stepan Kasal and because of + his changes, don't call reset_record() when saving a copy of contents + of $0. + * awkgram.y: Improved function parsing error messages for case where + user uses a builtin name as a function name. Based on error report + by Stepan Kasal. + * ext.c (make_builtin): Set FUNC flag for new function. Based on error + report by Stepan Kasal. + +Mon Jan 27 14:06:20 2003 Stepan Kasal + + * field.c (reset_record): No longer call set_record(), the code is + moved to the function body. Do not set MAYBE_NUM. + (set_record): Call reset_record() to perform the common tasks. + The prototype has changed, change awk.h and all callers. + +Mon Jan 27 10:50:03 2003 Arnold D. Robbins + + * awk.h (NODE): `proc' renamed to `builtin,' to fix a conflict + on some systems. Replaced on all spots where it was used. + +Sun Jan 26 11:52:01 2003 Arnold D. Robbins + + * awk.h [NUMSUBPATS]: New macro. + * builtin.c (do_match): Use it in loop that fills in subpattern info. + * eval.c (r_tree_eval): for Node_assign, don't call free_temp(), + as assign_val() contains dupnode(), which would clear the TEMP + flag. From Stepan Kasal . + * config.sub: Updated from prep. + +Sun Jan 19 22:34:01 2003 Arnold D. Robbins + + * awk.h (do_asorti): Add declaration. + * awkgram.y (tokentab): Add asorti() function to table. + * array.c (ASORT_TYPE): New enumerated type for VALUE or INDEX array + sorting. + (assoc_sort_inplace): New second arg of type ASORT_TYPE. Additional code + to rearrange array so rest of merge-sorting works; basically values are + tossed and index moved into value spot. + (asort_actual): Renamed from do_asort(). Takes new ASORT_TYPE argument. + (do_asort): Calls asort_actual(tree, VALUE). + (do_asorti): Calls asort_actual(tree, INDEX). + + * main.c (load_procinfo): Free groupset array when done with it. + +Thu Jan 16 18:30:50 2003 Arnold D. Robbins + + * builtin.c (do_match): Revised to provide start and length + indices in array 3rd parameter. + * config.guess, config.sub: Updated from prep. + +Thu Jan 2 11:09:12 2003 Arnold D. Robbins + + Updated to bison 1.875. + +Tue Dec 31 17:14:45 2002 Arnold D. Robbins + + Updated things to automake 1.7.2 and autoconf 2.57. + +Tue Dec 31 16:54:44 2002 Arnold D. Robbins + + * awk.h [IOP_CLOSED]: New flag. + * io.c (iop_close): Set IOP_CLOSED flag. + (inrec): Check for IOP_CLOSED; if set return EOF. + (rs1_get_a_record, rsnull_get_a_record): Check for EOF before + refilling buffers. + (rsre_get_a_record): Ditto. Also, set RT before updating pointers in IOP. + * Makefile.am (efence): New target to compile with Electric Fence. + +2002-12-23 Kaveh R. Ghazi + + * awk.h (catchsig): Delete prototype. + * main.c (catchsig): Make static and remove excess argument. + (main): Delete unnecessary casts. + * io.c (rs1_get_a_record, rsnull_get_a_record): Mark parameter + with ATTRIBUTE_UNUSED. + +Mon Dec 23 11:54:07 2002 Arnold D. Robbins + + * regex_internal.h, regex_internal.c, regcomp.c, regexec.c, version.c: + Fixed to compile, once again, under K&R compilers. + * io.c (grow_iop_buffer): Fix calculation of new size to + first subtract 2, double, then add 2 back in. + +Fri Dec 20 11:48:42 2002 Arnold D. Robbins + + get_a_record split into three routines. + + * awk.h (IOBUF): Structure reworked for new code. + * io.c (get_a_record): Now a pointer to different functions. + (rs1_get_a_record, rsnull_get_a_record, rsre_get_a_record): New functions. + (iop_alloc, iop_close): Reworked for new structure. + (do_getline, inrec): Modifiend for new EOF condition. + (iopflags2str): New routine. + +Fri Dec 20 11:05:50 2002 Isamu Hasegawa + + * regex.c, regex_internal.c, regex_internal.h: Changes to allow separate + compilation of the reg*c files. + * regcomp.c: Fix bug in using translation tables with [[:upper:]] etc. + * Makefile.am: Move regex files into sources from EXTRA_DIST. (ADR) + +Mon Dec 9 14:20:42 2002 Stepan Kasal + + * main.c (main): When processing option '-f' don't ignore spaces + if optarg points at the beginning of the current argument + (like ``gawk -f " " file''). + +2002-11-30 Kaveh R. Ghazi + + * awkgram.y (stopme): Mark parameter with ATTRIBUTE_UNUSED. + (yyerror): Add ATTRIBUTE_PRINTF_1. + * builtin.c (do_systime, do_rand): Likewise. + * field.c (set_field, re_parse_field, def_parse_field, + posix_def_parse_field, null_parse_field, sc_parse_field, + fw_parse_field): Likewise. + * io.c (pidopen, useropen): Likewise. + * main.c (catchsig): Likewise. + * profile.c (init_profiling): Likewise. + * awk.h (err): Add ATTRIBUTE_PRINTF. + * msg.c (err): Delete redundant prototype. Fix format specifier. + +Wed Nov 27 06:04:20 2002 Pat Rankin + + * ext.c [#if !DYNAMIC] (do_ext): Cast string value for error node. + +Sun Nov 24 18:23:29 2002 Arnold D. Robbins + + From Paul Eggert, with some edits by me. + + * builtin.c (do_substr): Consistently use floating point + values for lint messages, so they should be printed pretty + much as the user saw them. Check for overflow before + converting floating point to integer. Do the right thing with + NaNs. + + Check for index out-of-range before checking for length + out-of-range, to avoid some nasty effects if address + arithmetic overflows (e.g., indx + length < index). + + Allow zero-length substrings when checking for lint if + do_lint == LINT_INVALID. + +Sun Nov 24 18:21:06 2002 Arnold D. Robbins + + * awk.h (LINT_ALL, LINT_INVALID): New constants. + * main.c (main): Allow --lint=invalid which restricts warning to + things that aren't valid. + * eval.c (set_LINT): Update setting logic. + +Wed Nov 20 13:14:58 2002 Arnold D. Robbins + + * awk.h (lintfunc): Improve ifdef for attribute to only + work for GCC 3.2 and later. + * io.c (PIPES_SIMULATED): Don't define if on AIX, which + does define TANDEM in one of its header files. Ugh. + +Tue Nov 19 15:33:55 2002 Arnold D. Robbins + + * builtin.c (do_substr): Use %lu in warnings instead of %d. + +Mon Nov 18 14:42:53 2002 Arnold D. Robbins + + * config.guess: Synced from ftp.gnu.org. + * config.sub: Ditto. + +Sun Nov 17 21:32:49 2002 Arnold D. Robbins + + Updated things to automake 1.7.1. + +Sun Nov 3 14:33:30 2002 Arnold D. Robbins + + * eval.c (r_get_lhs): For variables, always clear UNINITIALIZED, + since the variable is about to be assigned to. From Stepan Kasal. + +Fri Nov 1 11:19:01 2002 Arnold D. Robbins + + * awk.h (lintfunc): Can only supply attributes for a function + pointer if GCC >= 3. Added ifdefs. Bah, humbug. + +2002-10-30 Kaveh R. Ghazi + + * array.c (array_init, concat_exp, assoc_find, do_delete): + Const-ify. + * awk.h (redirect, set_record, pp_func, pp_string_fp, format_val, + parse_escape, make_regexp, research, reisstring, remaybelong): + Likewise. + * awkgram.y (dumpintlstr, dumpintlstr2, func_use, dup_parms, + var_comp, finfo, fcompare, func_use, dumpintlstr, dumpintlstr2): + Likewise. + * builtin.c (stdfile, do_fflush, do_index, category_table): + Likewise. + * eval.c (push_forloop, push_args, PUSH_BINDING, RESTORE_BINDING, + cmp_nodes, op_assign, loop_info, fcall, fmt_ok, set_LINT, + comp_func): Likewise. + * ext.c (do_ext): Likewise. + * field.c (set_record): Likewise. + * io.c (gawk_popen, two_way_open, binmode, redirect, getredirect, + fatal): Likewise. + * node.c (values, format_val, make_str_node, parse_escape): Likewise. + * profile.c (pp_string, pp_match_op, pp_func, pp_string, + pp_string_fp): Likewise. + * re.c (make_regexp, research, reisstring, remaybelong): Likewise. + +2002-10-30 Kaveh R. Ghazi + + * awk.h (__attribute__, ATTRIBUTE_UNUSED, ATTRIBUTE_NORETURN, + ATTRIBUTE_PRINTF, ATTRIBUTE_PRINTF_1, __extension__): Define. + (emalloc, erealloc): Fix format specifier warnings. + (do_nextfile):Mark with ATTRIBUTE_NORETURN. + (getredirect): Const-ify. + (msg, error, warning, r_fatal, lintfunc): Mark with + ATTRIBUTE_PRINTF_1. + (r_fatal): Mark with ATTRIBUTE_NORETURN. + * builtin.c (format_tree): Fix format specifier warning. + * eval.c (interpret): Likewise. + * main.c (usage, copyleft, catchsig, nostalgia, version): Mark + with ATTRIBUTE_NORETURN. + * profile.c (dump_and_exit): Likewise. + +2002-10-29 Kaveh R. Ghazi + + * array.c (array_init): Use ISDIGIT, not isdigit. + * awk.h (m_tree_eval, force_number, force_string): Use + __extension__ in statement expressions. + * main.c (lintfunc): Fix !__SDTC__ case. + * regex_internal.c (calc_state_hash): Fix inline declaration. + * regexec.c (proceed_next_node): Cast assignment to correct type. + +2002-10-29 Kaveh R. Ghazi + + * awk.h (exp_node, Func_ptr): Add prototype arguments. + * awkgram.y (yystype, token, getfname, nextc, pushback, + allow_newline, yylex): Likewise. + * io.c (wait_any): Likewise. + * profile.c (indent_in, indent_out): Likewise. + * random.h (random): Likewise. + +2002-10-29 Kaveh R. Ghazi + + * array.c (grow_table): Const-ify. + * awk.h (RE_TRANSLATE_TYPE): Define. + (flagtab, casetable): Const-ify. + (getfname, shadow_funcs, redflags2str): Prototype. + (flags2str, genflags2str, nodetype2str, redflags2str, set_loc, + msg, error, warning, r_fatal): Const-ify. + * awkgram.y (tokentab, snode): Likewise. + * builtin.c (format_tree, do_strftime, + localecategory_from_argument): Likewise. + * eval.c (casetable, nodetypes, nodetype2str, flags2str, + genflags2str): Likewise. + * io.c (redflags2str, socketopen): Likewise. + * main.c (varfile, version_string, lintfunc, optab, copyleft, + varinit, init_vars): Likewise. + * msg.c (srcfile, msg, warning, error, set_loc, r_fatal): + Likewise. + * profile.c (pp_op_assign, pp_match_op, pp_redir): Likewise. + * random.c (sccsid): Likewise. + * version.c, version.in (version_string): Likewise. + +Tue Oct 29 10:50:52 2002 Arnold D. Robbins + + * configure.in: Update version in AC_INIT and AM_INIT_AUTOMAKE + * fixvers: Make grep for pattern a little smarter. + +Mon Oct 28 16:35:39 2002 Arnold D. Robbins + + * awk.h (hash): Now a function pointer. + * array.c (gst_hash_string, scramble): New functions. + (awk_hash): Renamed from hash. + (hash): Now a function pointer. + (array_init): Change hash function based on environment for + experimentation. + +Mon Oct 28 13:21:20 2002 Arnold D. Robbins + + Applied lots of patches from Stepan Kasal, tweaked as needed + for current code base. + + * node.c (dupnode): When n->stref overfows, flag the node as PERM. + Same for n->ahname_ref. + (unref): Remove the check for n->stref == LONG_MAX and + n->ahname_ref == LONG_MAX. + * awk.h (make_string): The third argument to make_str_node changed + from FALSE to 0, it's not Boolean. + (free_temp): Evaluate the argument only once, so that we + can call free_temp(tree_eval(n)) for achieving side effects. + (load_environ, load_procinfo): Changed return type to NODE *. + * main.c (load_environ): The ENVIRON_node should be created with type + Node_var_array and lnode set to NULL. Return pointer to the created node + and create an empty hash even on TANDEM. + (load_procinfo): Same mods for PROCINFO_node. + (init_args): ARGV_node should also have lnode set to NULL. + * eval.c (r_tree_eval): case Node_assign moved just above the other + assignment cases. + (op_assign): ++ and -- cases merged with += and -=, respectively. + (push_args): Evaluate all args, even in cases where more args are + supplied then required. + (interpret): In case Node_K_forarray, flag the variable + num_elems also as volatile, so that it survives longjmp() and + can be trusted when linting code. + (r_get_lhs): Case Node_param_list was unreachable (unless + something breaks really badly), remove it; + (r_tree_eval): case Node_var_array removed from the last switch, + it was caught in the first switch above. + * profile.c (tree_eval): Again, case Node_var_array was caught above. + * awkgram.y (variable): Code simplified, making use of the above + changes. + * field.c (sc_parse_field): IGNORECASE only applies to regex based + field-splitting, so remove code that pays attention to it. + (do_split): Don't use parse_field if RS_is_null. + (set_FS): Beware of FS == "\\" even if RS_is_null. + + Code changes to make things work better: + * field.c (set_FS): Don't use cmp_nodes() to compare old and new + value of FS, that uses IGNORECASE, which is a bad idea. Improve + logic for choosing sc_parse_field. Ensure that when RS_is_null + but using a single character, that we do pay attention to + case when doing regex splitting. + * io.c (set_RS): Don't use cmp_nodes() to compare old and new + value of RS, that uses IGNORECASE, which is a bad idea. + +Mon Oct 28 09:43:14 2002 Arnold D. Robbins + + * recomp.c (parse_expression): Change return statement into + two so it'll compile for SGI cc. + + * awk.h (STR, CUR): Changed to STRCUR and NUMCUR respectively, + to avoid conflict with STR on some System V systems. Changed + in all source files. + +Thu Oct 24 16:14:34 2002 Arnold D. Robbins + + * array.c (AVG_CHAIN_MAX): Now a variable, to allow easy experimentation. + (array_init): Pulls a new value from env var AVG_CHAIN_MAX if it + exists and sets the variable. + * awk.h: Add declaration for array_init(). + * main.c (main): Call array_init(). + +Tue Oct 22 11:23:56 2002 Arnold D. Robbins + + * bisonfix.sed: Updated for current bison. Death to alloca! + +2002-10-21 Isamu Hasegawa + + * builtin.c (tolower, toupper): Add casts to char* to fix some + compiler warnings. + * eval.c (cmp_nodes): Ditto. + * regcomp.c (peek_token_bracket): Skip the byte already read. + +Wed Oct 16 15:02:09 2002 Arnold D. Robbins + + * io.c (set_RS): Make sure to always call set_FS(). + +2002-10-11 Isamu Hasegawa + + * regcomp.c (re_compile_fastmap_iter): Remove the handling + OP_CONTEXT_NODE. + (regfree): Likewise. + (create_initial_state): Likewise. + (analyze): Remove the substitutions which became useless. + (calc_first): Likewise. + (calc_epsdest): Use edests of OP_BACK_REF in case that it has + epsilon destination. + (duplicate_node_closure): New function. + (duplicate_node): Remove the handling OP_CONTEXT_NODE. + (calc_inveclosure): Likewise. + (calc_eclosure): Likewise. + (calc_eclosure_iter): Invoke duplicate_node_closure instead of + direct invocation of duplicate_node. + (parse): Don't use comma operator in the return to avoid compiler + warning. + (parse_reg_exp): Likewise. + (parse_branch): Likewise. + (parse_expression): Likewise. + (parse_sub_exp): Likewise. + (parse_dup_op): Likewise. + * regex_internal.c (re_dfa_add_node): Remove the substitutions + which became useless. + (create_ci_newstate): Remove the handling OP_CONTEXT_NODE. + (create_cd_newstate): Likewise. + * posix/regex_internal.h (re_token_type_t): Remove the obsolete type. + (re_token_t): Likewise. + (re_dfa_t): Likewise. + (re_node_set_remove): New macro. + * regexec.c (check_matching): Remove the handling + OP_CONTEXT_NODE. + (check_halt_node_context): Likewise. + (proceed_next_node): Likewise. + (pop_fail_stack): Fix the memory leak. + (set_regs): Likewise. + (free_fail_stack_return): New function. + (sift_states_backward): Fix the memory leak. Remove the handling + OP_CONTEXT_NODE. + (update_cur_sifted_state): Append some if clause to avoid redundant + call. + (sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a + back reference. + (check_dst_limits): Remove the handling OP_CONTEXT_NODE. + (check_subexp_limits): Likewise. + (search_subexp): Likewise. + (sift_states_bkref): Likewise. + (transit_state_mb): Likewise. + (transit_state_bkref_loop): Likewise. + (transit_state_bkref_loop): Likewise. + (group_nodes_into_DFAstates): Likewise. + (check_node_accept): Likewise. + (sift_ctx_init): Add initializing. + +Tue Oct 15 14:18:53 2002 Arnold D. Robbins + + * eval.c (set_IGNORECASE): Call set_RS() instead of + set_FS_if_not_FIELDWIDTHS(). The former calls the latter + for us, and also makes IGNORECASE affect RS like it's supposed to. + * field.c (FS_re_yes_case, FS_re_no_case): New variables. + (set_FS): Smarten up routine to not recompile FS_regexp if all + that's changed is IGNORECASE or if switching back to FS from + FIELDWIDTHS. Significant speed-up for cases where IGNORECASE + is assigned to for every record. + * io.c (RS_re_yes_case, RS_re_no_case): New variables. + (set_RS): Similar changes as to set_FS(). In particular, + IGNORECASE changing now affects record splitting too. + * re.c (refree): Set rp->pat.tranaslate to NULL. It comes + from casetable and shouldn't be freed. (Strictly necessary + only for old regex, but a good idea anyway). + Also, call regfree(& rp->pat) instead of manually free()ing + things, since there's dynamically allocated stuff hiding in + the buffer. Avoids a memory leak. + +Mon Oct 14 12:02:39 2002 Arnold D. Robbins + + Major space reduction in array management. Overhead reduced + to two NODE's per element from three. + + * awk.h (ahash): Union is gone. + (hash.ref): new union member. + (ahnext): new definition into hash union. + (ahvalue): new definition into hash union. + (ahname_str): new member, points into hash union. + (ahname_len): new member, points into hash union. + (ahname_ref): new member, points into hash union. + * array.c: Replaces uses of ahname member with string and + length. Set the reference count correctly to 1 on new nodes. + * eval.c (interpret): Case for Node_K_arrayfor. dupnode() the + array indices, and set loop variable to new value made via + make_string(). + * node.c (unref, dupnode): Node_ahash nodes are now also + reference counted, a la strings. Similar code is used to + increment/decrement the counts, and/or copy nodes as + needed. + + Unrelated: + * awk.h (forsub): Removed. Not used. + +Sun Oct 13 16:58:27 2002 Stepan Kasal + + * profile.c (pprint): #undef the temporary defines at the end + of the case. + * eval.c (interpret): Likewise. + (assign_val): we can unref() before doing dupnode(). + Also, move the check for NF < 0 from here ... + * field.c (set_NF): ... to here. + * main.c (varinit): no need to call set_NF(). + * awkgram.y (statements): don't be so generous when concatenating + `statements' with a `statement'. + + +2002-10-13 Isamu Hasegawa + + * regcomp.c: Synced with development sources. + * regex_internal.c: Synced with development sources. + * regex_internal.h: Synced with development sources. + * regexec.c: Synced with development sources. + +Sun Oct 13 21:35:35 2002 Arnold D. Robbins + + * awk.h (NODE): reflags is now unsigned long for: + (exec_count): defined to be sub.nodep.reflags. Using `number' + broke pgawk. + * profile.c (Node_K_delete_loop): print out as a for loop + with a comment that it's internally the same as `delete array'. + * eval.c (Node_K_delete_loop): Increment the exec_count. Ooops. + * configure.in (AM_GNU_GETTEXT_VERSION): New macro call. + * custom.h: Updated description of the file at the top. + +Thu Oct 10 16:39:51 2002 Arnold D. Robbins + + * awk.h (vname, exec_count): Now macros into different + parts of the NODE structure that can be safely used for them. + Saves 16 bytes per NODE. + * eval.c: Changed use of `vname' to `varname' to avoid new + macro. + * main.c (lintfunc): Made ifdefed decls match awk.h. + * eval.c (comp_func): Use memcmp instead of strcmp. + * configure.in (AC_CONFIG_HEADER): Physically append custom.h + to config.h to avoid subdir compiliation problems. + +Sun Oct 6 17:36:15 2002 Arnold D. Robbins + + Updated to automake 1.7 and bison 1.50. + + * INSTALL: Replaced with current version from automake 1.7. + * config.guess: Replaced with current version from automake 1.7. + * config.sub: Replaced with current version from automake 1.7. + * depcomp: Replaced with current version from automake 1.7. + * doc/texinfo.tex: Replaced with current version from automake 1.7. + * install-sh: Replaced with current version from automake 1.7. + * missing: Replaced with current version from automake 1.7. + * mkinstalldirs: Replaced with current version from automake 1.7. + * ylwrap: Replaced with current version from automake 1.7. + + * configure.in (DYNAMIC): Updated AC_DEFINE(DYNAMIC) to + three-argument form for autoheader. + * acinclude.m4: Removed includes of jm-mktime.m4 and + largefile.m4, which are now standard parts of Autoconf. + + * Makefile.in: Regenerated. + * aclocal.m4: Regenerated. + * awkgram.c: Regenerated. + * awklib/Makefile.in: Regenerated. + * configure: Regenerated. + * doc/Makefile.in: Regenerated. + * test/Makefile.in: Regenerated. + +Sun Sep 29 16:47:49 2002 Arnold D. Robbins + + * custom.h (__WIN32__): Added from gnuwin32 project, via + Stepan Kasal. + + * awkgram.y: For tawk compatibility, added `delete(array)'. + To remain undocumented, since it's WAY non-standard. + +Sun Sep 22 22:23:50 2002 Arnold D. Robbins + + * awk.h (re_cnt): Removed, not needed since no dfa code. + * awkgram.y (regexp, a_regexp): Removed use of re_cnt. + * re.c (re_update): Ditto. + +Thu Sep 19 10:55:37 2002 Arnold D. Robbins + + * io.c (binmode): Create function if defined(WIN32) also. + + Updated to gettext 0.11.5, autoconf 2.54 and automake 1.6.3. + + * aclocal.m4: Regenerated. + * m4/codeset.m4: Updated. + * m4/gettext.m4: Updated. + * m4/glibc21.m4: Updated. + * m4/iconv.m4: Updated. + * m4/lcmessage.m4: Updated. + * m4/lib-ld.m4: Updated. + * m4/lib-link.m4: Updated. + * m4/lib-prefix.m4: Updated. + * m4/progtest.m4: Updated. + * po/Makefile.in.in: Updated. + * po/Rules-quot: Updated. + * po/boldquot.sed: Updated. + * po/en@boldquot.header: Updated. + * po/en@quot.header: Updated. + * po/insert-header.sin: Updated. + * po/quot.sed: Updated. + * po/remove-potcdate.sin: Updated. + +Tue Sep 17 23:46:01 2002 Arnold D. Robbins + + * configure.in: Moved override of INSTALL to just after + AC_INIT so that it takes effect. Necessary for Autoconf 2.5x. + +Mon Sep 16 16:40:57 2002 Stepan Kasal + + * awkgram.y (want_assign): Removed. + (SLASH_BEFORE_EQUAL, ASSIGN): New terminals; ``/='' is now + formed from these two. + (a_slash): New non-terminal, representing either '/' or + SLASH_BEFORE_EQUAL. + (assign_operator): New non-terminal, replaces ASSIGNOP. + (REGEXP): yylex now eats the terminating '/' before + returning REGEXP token. + (exp): The check for C-like comments moved from here + (regexp): ... to here. + (common_exp): New non-terminal; contains common parts of exp + and rexp. (a_relop, relop_or_less): New non-terminals. + (rexp): some rules updated to be analogous to exp. + (output_redir): Can contain only common_exp, not exp in general. + +Mon Sep 16 22:51:51 2002 Arnold D. Robbins + + * io.c (two_way_open): Move label use_pipes outsidef of ifdef, + just in case. + +Thu Sep 12 15:11:28 2002 Arnold D. Robbins + + * awkgram.y (getfname): Return NULL if not found, remove + fatal error. Could be an extension function. + (dump_funcs): Walk symbol table counting functions before + mallocing table, since there could be extension functions, + func_count could be too small. + * profile.c (pp_builtin): Handle NULL return from getfname(). + Print it as "extension_function()" if so. + +Tue Sep 10 17:33:48 2002 Arnold D. Robbins + + Minor code simplification. + + * awk.h (in_array): Change return type to NODE*. + (assoc_exists): Remove declaration. + * array.c (in_array): Change return type to NODE *. + Return value is pointer to element value or NULL. + (assoc_exists): Removed function. + * eval.c (r_tree_eval): Case Node_in_array, change value + to test return of in_array() against NULL. + * io.c (pty_vs_pipes): Change test to make a tmp_string() + of the index and call in_array(). Add free_temp() of + subscript and free() of full_index (oops). + +2002-09-10 Isamu Hasegawa + + * posix/regcomp.c: Wrap #include wchar.h and wctype.h in #if. + (build_range_exp): Add castings to strlen invocations. + (build_collating_symbol): Restore the type of characters from "char" + to "unsigned char", and supplement castings. + (build_collating_symbol): Likewise. + (build_equiv_class): Likewise. + (build_charclass): Likewise. + (seek_collating_symbol_entry): Likewise. + (parse_bracket_exp): Likewise. + (build_word_op): Supplement a casting. + * posix/regex_internal.c: Wrap #include wchar.h and wctype.h in #if. + (re_string_allocate): Fix castings. + (re_string_construct): Likewise. + (re_string_construct_common): Likewise. + (re_string_realloc_buffers): Likewise. + (build_wcs_buffer): Likewise. + (build_wcs_upper_buffer): Likewise. + (re_string_skip_chars): Likewise. + (re_string_reconstruct): Likewise. + * posix/regex_internal.h: Restore the type of characters in + re_string_t and bracket_elem_t from "char" to "unsigned char". + (re_string_elem_size_at): Fix castings. + * posix/regexec.c: Wrap #include wchar.h and wctype.h in #if. + (transit_state_bkref_loop): Restore the type of characters from + "char" to "unsigned char", and append a cast to "char*" pointer in + array subscript. + (check_node_accept_bytes): Likewise. + (find_collation_sequence_value): Likewise. + +Thu Sep 5 13:15:09 2002 Arnold D. Robbins + + * re.c (remaybelong): New routine. + (reisstring): Simplified the code a bit. + * awk.h (remaybelong): Declaration added. + * io.c (get_a_record): Change fourth grungy special case to + use remaybelong() instead of strchr() on last character. + +Wed Sep 4 13:20:26 2002 Arnold D. Robbins + + * io.c (do_input): Recode guts of main loop to be easier + to trace with a debugger. + (get_a_record): Fourth grungy special case for RE-based + record splitting added. See explanatory comments there + and test/rebuf.awk. + +2002-09-03 Isamu Hasegawa + + * posix/regcomp.c (regcomp): Append "__restrict" modifier to avoid + warnings of some compilers. + (build_collating_symbol): Change the type of characters from + "unsigned char" to "char", and append a cast to "char*" pointer in + array subscript. + (build_collating_symbol): Likewise. + (build_equiv_class): Likewise. + (build_charclass): Likewise. + (re_compile_pattern): Remove incorrect cast. + (re_compile_fastmap_iter): Change the type of characters from + "unsigned char" to "char", and append a cast to "char*" pointer + in array subscript. + (parse_bracket_exp): Likewise. + * posix/regex_internal.c (re_string_construct_common): Likewise. + (re_string_allocate): Likewise. + (re_string_construct): Likewise. + (re_string_realloc_buffers): Likewise. + (build_wcs_buffer): Likewise. + (re_string_reconstruct): Likewise. + * posix/regex_internal.h: Change the type of characters in + re_string_t and bracket_elem_t from "unsigned char" to "char". + * posix/regexec.c (regexec): Append "__restrict" modifier to avoid + warnings of some compilers. + (transit_state_bkref_loop): Change the type of characters from + "unsigned char" to "char", and append a cast to "char*" pointer in + array subscript. + (check_node_accept_bytes): Likewise. + (find_collation_sequence_value): Likewise. + +Wed Aug 21 15:40:36 2002 Corinna Vinschen + + * configure.in: Define --without-libintl-prefix and + --without-libiconv-prefix for Cygwin by default. + * Makefile.am: Call fixvers from $(srcdir). + * awk.h: Don't define O_BINARY on Cygwin. + +Wed Aug 21 15:31:57 2002 Andreas Buening + + * configure.in (AC_OBJEXT, AC_EXEEXT): Added. Removed OS/2 goo. + * Makefile.am (check-local): Add $(EXEEXT) suffixes, remove OS/2 goo. + * regcomp.c, regex_internal.c, regexec.c: Conditionalize include of + and on RE_ENABLE_I18N. + +Wed Aug 21 14:43:57 2002 Arnold D. Robbins + + * gettext.h (ENABLE_NLS): Add include of locale.h so that things + compile even without optimization. Sheesh. + * io.c (two_way_open, pty_vs_pipes): Conditionalize pty code on + HAVE_TERMIOS_H. + +Thu Aug 8 22:16:10 2002 Arnold D. Robbins + + * main.c (main): Force LC_NUMERIC locale to "C", esp. for + M$ systems. Ugh. + +Wed Aug 7 13:42:01 2002 Arnold D. Robbins + + * io.c (get_a_record): Improve test for newlines at beginning of + record but with nothing following it. See test/nulrsend. + +Mon Aug 5 10:12:39 2002 Arnold D. Robbins + + Add option to use ptys instead of pipes for |&. + Basic plumbing originally from Paolo Bonzini . + + * awk.h (RED_PTY): New flag. + (assoc_exists): Add declaration. + * array.c (in_array): Use FALSE not zero for return value. + (assoc_exists): New routine to find and return value for an index + in an array. + * configure.in: test for termios.h and stropts.h, and grantpt function. + * io.c: include termios.h and stropts.h if available. + (redflags2str): Add RED_PTY to table. + (redirect): Add RED_PTY to flags turned off when searching. + (close_redir): close write channel for two-way pipes + that use ptys by sending an EOF. + (two_way_open): If pty_vs_pipe(), use pty's to open two-way pipes as + they are line-buffered by default --> alleviates deadlock problems. + If fails, fall back to using pipes. + (pty_vs_pipe): New function. + * main.c (arg_assign): Clean up English in some of the error messages. + +Sun Aug 4 00:37:38 2002 Stepan Kasal + + * re.c (make_regexp): don't pass the error message returned by + re_compile_pattern() to gettext(); it's already gettextized. + (make_regexp): minor reformat of code. + +Wed Jul 31 23:50:31 2002 Arnold D. Robbins + + Removed dfa code from gawk since not really needed with new regex. + + * Makefile.am: Removed dfa.h and dfa.c. + * awk.h (struct Regexp): Removed `dfareg' and `dfa' members. + (make_regexp): Last parameter in function went away, changed decl. + (avoid_dfa): Removed declaration. + * awkgram.y: Fixed call to make_regexp(). + * eval.c (match_op): Simplified: removed call to avoid_dfa() and + `kludge_need_start' variable. Instead, pass FALSE as last parameter + of research(). + * field.c (set_FS): Fixed call to make_regexp(). + * io.c (get_a_record, set_RS): Fixed calls to make_regexp(). + * re.c (make_regexp): Removed last paramter (`dfa') from function. + Simplified the code. + (research): Simplified the code, removed calls to dfa stuff. + (dfaerror): Removed function. + (re_update): Fixed call to make_regexp(). + (avoid_dfa): Removed function. + +Thu Jul 25 21:55:45 2002 Arnold D. Robbins + + * regcomp.c, regex_internal.c, regex_internal.h, regexec.c: Bug + fixes from Isamu Hasegawa and Stepan Kasal + applied. + +Sat Jul 6 23:28:37 2002 Arnold D. Robbins + + * awkgram.y (yyerror): Change text of unexpected newline message to + include end of string. + +Mon Jun 17 17:58:55 2002 Arnold D. Robbins + + * field.c (do_split): Per Michal Jaegermann, move free_temp(fs) + above label `out'. + +Tue Jun 11 23:26:09 2002 Paul Eggert + + Update to autoconf 2.53 and automake 1.6.1. + + * acconfig.h: Removed. + * m4/isc-posix.m4: Removed. + * m4/jm-mktime.m4: Removed. + * m4/largefile.m4: Removed. + * m4/ssize_t.m4: Removed. + * ansi2knr.c: updated. + * depcomp: updated. + * install-sh: updated. + * missing: updated. + * mkinstalldirs: updated. + * ylwrap: updated. + + * configure.in: Improved quoting. + * acinclude.m4: Use `m4_sinclude', not antiquated `sinclude'. + +Tue Jun 11 23:08:40 2002 Arnold D. Robbins + + * configure.in: Add `getgrent' to list of functions checked + so that awklib/grcat is compiled correctly. + +Tue Jun 11 22:18:42 2002 Stepan Kasal + + Improve argument parsing and -v assignment. + + * awk.h (struct src): Add additional enum values. + (arg_assign): Return type and arg list changes. + * io.c (nextfile): Add extra arg in call to `arg_assign'. + * main.c (pre_assign): Nuked. + (allocfiles): New variable. + (srcfiles_add, preassigns_add): New macros. + (main): Logic cleaned up. + (add_src): New function. + + Use `size_t' for optimal_bufsize function. + + * awkgram.y (yylex): `len' is now size_t. + * pc/gawkmisc.pc (optimal_bufsize): Change return type to size_t. + * posix/gawkmisc.c (optimal_bufsize): Change return type to size_t. + * unsupported/atari/gawkmisc.atr (optimal_bufsize): Change return type + to size_t. + * unsupported/tandem/tmisc.c (optimal_bufsize): Change return type to size_t. + * vms/gawkmisc.vms (optimal_bufsize): Change return type to size_t. + * README_d/README.hpux: New file. + +Fri May 24 12:23:01 2002 Arnold D. Robbins + + * profile.c (init_profiling): Remove default initialization + of `prof_fp' to stderr. Per Stepan Kasal . + +Wed May 15 15:39:17 2002 Arnold D. Robbins + + Work through builtin operations to make sure that + anything that might have side effects gets dealt with. + + * array.c (do_delete): Evaluate subscript first before + checking if something is or isn't an array. + * builtin.c (sub_common): Evaluate replacement text, and + free it if no match of regex in source text. + +Wed May 15 15:30:34 2002 Arnold D. Robbins + + Switch to new version of regex from IBM Japan. + + * regcomp.c: New file. + * regex.c: Replaced with new version. + * regex.h: Replaced with new version. + * regex_internal.c: New file. + * regex_internal.h: New file. + * regexec.c: New file. + * Makefile.am (EXTRA_SOURCES): New files added. + +Tue May 14 17:04:05 2002 Arnold D. Robbins + + * awk.h (): Move check and include into gettext.h. + * gettext.h (): Add check and include per patch from + Bruno Haible. + + * field.c (do_split): When checking for split of null string, + evaluate seperator if it's not FS, since could have side effects. + At end, free_temp(fs), not free_temp(sep). + Both of these thanks to Stepan Kasal . + +Mon May 13 00:41:31 2002 Arnold D. Robbins + + * custom.h (ultrix): Add define GETGROUPS_NOT_STANDARD. + * main.c (init_groupset): For GETGROUPS_NOT_STANDARD, use old way + to set `ngroups'. + +2002-05-10 Andreas Schwab + + * dfa.c (parse_bracket_exp_mb): Fix warning. + +Thu May 9 22:28:32 2002 Arnold D. Robbins + + * builtin.c (sub_common): Fix logic for match of null strings to + get correct semantics. See test/gsubtst2.*. + * field.c (do_split): Minor code cleanup; the third arg to split() + is set to be FS by the grammar, so don't need to check it for NULL. + Thanks to Stepan Kasal . + * awk.h (locale.h): Move include before that of "gettext.h" for systems + that define functions that gettext.h would use when NLS is disabled. + Per bug report from Ayamura Kikuchi . + +Tue May 7 17:31:01 2002 Arnold D. Robbins + + Miscellanious patches courtesy of Stepan Kasal . + + * field.c, main.c: Tidy up some comments. + * field.c (set_FIELDWIDTHS): Init fw_alloc to 4 so it isn't + immediately realloced. + * main.c (load_procinfo): Check value of FS/FIELDWIDTHS for + value of PROCINFO["FS"]. + * awk.h (set_FS_if_not_FIELDWIDTHS): Removed decl. + * field.c (set_FS_if_not_FIELDWIDTHS): Removed function. + * eval.c (set_IGNORECASE): Use inline code checking `using_fieldwidths()'. + * io.c (set_IGNORECASE): Ditto. + +Sun May 5 14:28:34 2002 Arnold D. Robbins + + Fix a memory leak in array for loops if the body contains a + `next' or `nextfile' statement. The changes maintain a stack + of active for loops that is pushed and popped for each loop, + and popped entirely for `next', `nextfile', etc. + + * eval.c (forloops_active, pop_forloop, pop_all_forloops, push_forloop): + new functions. + (interpret): Case Node_K_arrayfor, call push and pop functions. + Case Node_rule_list: pop loops and pop fcalls after longjmp. + Cases Node_K_next, Node_K_nextfile, Node_K_break and + Node_K_continue, removed check before longjmp. + Case Node_K_exit: add loop check. + (loop_stack, nloops, nloops_active): New variables that implement + the stack. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/FUTURES gawk-3.1.2/FUTURES --- gawk-3.1.1/FUTURES 2002-04-15 09:38:15.000000000 +0300 +++ gawk-3.1.2/FUTURES 2002-10-06 22:46:30.000000000 +0300 @@ -30,6 +30,8 @@ Additional manual features: DONE: Document NLS support + DONE: Use a new or improved dfa and/or regex library. + For 3.2 ======= Move the loadable modules interface to libtool. @@ -58,7 +60,6 @@ For 3.3 ======= - Use a new or improved dfa and/or regex library. ? Have strftime() pay attention to the value of ENVIRON["TZ"] diff -urN gawk-3.1.1/INSTALL gawk-3.1.2/INSTALL --- gawk-3.1.1/INSTALL 1995-12-27 18:49:47.000000000 +0200 +++ gawk-3.1.2/INSTALL 2003-03-06 11:11:50.000000000 +0200 @@ -1,3 +1,9 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + Basic Installation ================== @@ -8,20 +14,27 @@ those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. The simplest way to compile this package is: @@ -55,14 +68,16 @@ ===================== Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== @@ -75,11 +90,11 @@ the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. Installation Names ================== @@ -122,22 +137,32 @@ Specifying the System Type ========================== - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + CPU-COMPANY-SYSTEM -See the file `config.sub' for the possible values of each field. If +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't -need to know the host type. +need to know the machine type. - If you are building compiler tools for cross-compiling, you can also + If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. Sharing Defaults ================ @@ -150,32 +175,55 @@ `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. -Operation Controls +Defining Variables ================== + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + `configure' recognizes the following options to control how it operates. -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - `--help' +`-h' Print a summary of the options to `configure', and exit. +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + `--quiet' `--silent' `-q' - Do not print messages saying which checks are being made. + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. diff -urN gawk-3.1.1/Makefile.am gawk-3.1.2/Makefile.am --- gawk-3.1.1/Makefile.am 2002-04-28 17:27:54.000000000 +0300 +++ gawk-3.1.2/Makefile.am 2003-03-06 11:31:38.000000000 +0200 @@ -1,7 +1,7 @@ # # Makefile.am --- automake input file for gawk # -# Copyright (C) 2000-2002 the Free Software Foundation, Inc. +# Copyright (C) 2000-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -23,8 +23,8 @@ ## process this file with automake to produce Makefile.in -# Automatic de-ANSI-fication if needed -AUTOMAKE_OPTIONS = ansi2knr +# Automatic de-ANSI-fication if needed, make .bz2 files also. +AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 # This undocumented variable insures that aclocal runs # correctly after changing configure.in @@ -56,6 +56,10 @@ missing_d \ pc \ posix \ + regcomp.c \ + regex_internal.c \ + regex_internal.h \ + regexec.c \ unsupported \ vms \ ylwrap @@ -82,8 +86,6 @@ awkgram.y \ builtin.c \ custom.h \ - dfa.c \ - dfa.h \ ext.c \ field.c \ gawkmisc.c \ @@ -112,9 +114,6 @@ # Get extra libs as needed LDADD = @LIBINTL@ @SOCKET_LIBS@ -# Special stuff for OS/2, remove after switch to autoconf 2.5x -PATH_SEPARATOR = @PATH_SEPARATOR@ - # Set autoconf Makefile.in variables correctly datadir = @datadir@ awkdatadir = @datadir@/awk @@ -136,23 +135,23 @@ install-exec-hook: (fullname=gawk-`./gawk --version | sed 1q | awk '{print $$3}'` ; \ cd $(DESTDIR)$(bindir); \ - $(LN) gawk $$fullname ; \ - $(LN) pgawk p$$fullname ; \ - if [ ! -f awk ]; \ - then $(LN_S) gawk awk; \ + $(LN) gawk $$fullname 2>/dev/null ; \ + $(LN) pgawk p$$fullname 2>/dev/null ; \ + if [ ! -f awk$(EXEEXT) ]; \ + then $(LN_S) gawk$(EXEEXT) awk$(EXEEXT); \ fi; exit 0) # Undo the above when uninstalling uninstall-links: (cd $(DESTDIR)$(bindir); \ - if [ -f awk ] && cmp awk gawk > /dev/null; then rm -f awk; fi ; \ + if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) gawk$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \ fullname=gawk-`./gawk --version | sed 1q | ./gawk '{print $$3}'` ; \ rm -f $$fullname p$$fullname; exit 0) uninstall-recursive: uninstall-links # force there to be a gawk executable before running tests -check-local: gawk pgawk +check-local: gawk$(EXEEXT) pgawk$(EXEEXT) # A little extra clean up when making distributions. # FIXME: most of this rule should go away upon switching to libtool. @@ -166,11 +165,15 @@ if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \ else :; fi -# these force version and patchlevel to be up to date based +# These force version and patchlevel to be up to date based # on what's in configure.in. No-one else but me should have # to use them. So there. patchlev.h: configure.in - ./fixvers -p + $(srcdir)/fixvers -p version.c: configure.in version.in - ./fixvers -v + $(srcdir)/fixvers -v + +# This is for my development & testing. +efence: gawk + $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LIBS) -lefence diff -urN gawk-3.1.1/NEWS gawk-3.1.2/NEWS --- gawk-3.1.1/NEWS 2002-04-29 14:52:29.000000000 +0300 +++ gawk-3.1.2/NEWS 2003-03-13 10:16:34.000000000 +0200 @@ -1,3 +1,119 @@ +Changes from 3.1.1 to 3.1.2 +--------------------------- + +1. Loops of the form: + + for (iggy in foo) + next + + no longer leak memory. + +2. gawk -v FIELDWIDTHS="..." now sets PROCINFO["FS"] correctly. + +3. All builtin operations and functions should now fully evaluate their + arguments so that side effects take place correctly. + +4. Fixed a logic bug in gsub/gensub for matches to null strings that occurred + later in the string after a nonnull match. + +5. getgroups code now works on Ultrix again. + +6. Completely new version of the full GNU regex engine now in place. + +7. Argument parsing and variable assignment has been cleaned up. + +8. An I/O bug on HP-UX has been documented and worked around. See + README_d/README.hpux. + +9. awklib/grcat should now compile correctly. + +10. Updated to automake 1.7.3, autoconf 2.57 and gettext 0.11.5 ; thanks to + Paul Eggert for the initial automake and autoconf work. + +11. As a result of #6, removed the use of the dfa code from GNU grep. + +12. It is now possible to use ptys for |& two-way pipes instead of + pipes. The basic plumbing for this was provided by Paolo Bonzini. + To make this happen: + + command = "unix command etc" + PROCINFO[command, "pty"] = 1 + + print ... |& command + command |& getline stuff + + In other words, set the element in PROCINFO *before* opening the + two-way pipe, and then gawk will use ptys instead of pipes. + + On systems without ptys or where all the ptys are in use, gawk + will fall back to using plain pipes. + +13. Fixed a regex matching across buffer boundaries bug, with a + heuristic. See io.c:rsre_get_a_record(). + +14. Profiling no longer dumps core if there are extension functions in place. + +15. Grammar and scanner cleaned up, courtesy of Stepen Kasal, to hopefully + once and for all fix the `/=' operator vs. `/=.../' regex ambiguity. + Lots of other grammar simplifications applied, as well. + +16. BINMODE should work now on more Windows ports. + +17. Updated to bison 1.875. Includes fix to bisonfix.sed script. + +18. The NODE structure is now 20% (8 bytes) smaller (on x86, anyway), which + should help conserve memory. + +19. Builds not in the source directory should work again. + +20. Arrays now use 2 NODE's per element instead of three. Combined with + #18, (on the x86) this reduces the overhead from 120 bytes per element + to just 64 bytes: almost a 50% improvement. + +21. Programs that make heavy use of changing IGNORECASE should now be + much faster, particularly if using a regular expression for FS or RS. + IGNORECASE now correctly affects RS regex record splitting, as well. + +22. IGNORECASE no longer affects single-character field splitting (FS = "c"), + or single-character record splitting (RS = "c"). + + This cleans up some weird behavior, and makes gawk better match the + documentation, which says it only affects regex-based field splitting + and record splitting. + + The documentation on this was improved, too. + +23. The framework in test/ has been simplified, making it much easier to + add new tests while keeping the size of Makefile.am reasonable. Thanks + for this to Stepan Kasal. + +24. --lint=invalid causes lint warnings only about stuff that's actually + invalid. This needs additional work. + +25. More translations. + +26. The get_a_record() routine has been revamped (currently by splitting it + into three variants). This should improve long-term maintainability. + +27. match() now adds more entries to 3rd array arg: + match("the big dog", /([a-z]+) ([a-z]+) ([a-z]+)/, data) + fills in variables: + data[1, "start"], data[1, "length"], and so on. + +28. New asorti() function with same interface as asort(), but sorts indices + instead of values. + +29. Documentation updated to FDL 1.2. + +30. New `configure' option --disable-lint at compile time disables lint + checking. With GCC dead-code-elimination, cuts almost 200K off the + executable size on GNU/Linux x86. Presumably speeds up runtime. + + Using this will cause some of the tests in the test suite to fail. + This option may be removed at a later date. + +31. Various minor cleanups, see the ChangeLog for details. + Changes from 3.1.0 to 3.1.1 --------------------------- diff -urN gawk-3.1.1/README gawk-3.1.2/README --- gawk-3.1.1/README 2002-04-16 13:54:14.000000000 +0300 +++ gawk-3.1.2/README 2002-07-25 07:28:10.000000000 +0300 @@ -100,4 +100,4 @@ VMS: Pat Rankin - rankin@eql.caltech.edu + rankin@pactechdata.com diff -urN gawk-3.1.1/README_d/README.ia64 gawk-3.1.2/README_d/README.ia64 --- gawk-3.1.1/README_d/README.ia64 2002-04-16 13:55:42.000000000 +0300 +++ gawk-3.1.2/README_d/README.ia64 2003-03-11 13:21:04.000000000 +0200 @@ -1,3 +1,11 @@ +Tue Mar 11 13:19:45 IST 2003 +============================ + +On real Itanium systems, builds with GCC are fine. If you're using the +Intel compiler `ecc', you need: + + CC=ecc ./configure && make all check install CFLAGS='-g -Drestrict=' + Tue Apr 16 13:55:15 IDT 2002 ============================ The current version of the IA-64 environment builds gawk without any problems. diff -urN gawk-3.1.1/README_d/README.pc gawk-3.1.2/README_d/README.pc --- gawk-3.1.1/README_d/README.pc 2002-01-16 15:16:35.000000000 +0200 +++ gawk-3.1.2/README_d/README.pc 2003-02-23 16:15:44.000000000 +0200 @@ -6,7 +6,8 @@ DOS, and Win32 with rsxnt), and Jan-Jaap van der Heijden and Mumit Khan (Mingw32; Win32). Microsoft Visual C/C++ can be used to build a Win32 version for Windows 9x/NT, and MSC can be used to build 16-bit versions -for DOS and OS/2. +for DOS and OS/2. (As of 3.1.2, the MSC version doesn't work, but the +maintainer for it is working on fixing it.) The cygwin environment (http://www.cygwin.com) may also be used to compile and run gawk under Windows. For cygwin, building and diff -urN gawk-3.1.1/README_d/README.solaris gawk-3.1.2/README_d/README.solaris --- gawk-3.1.1/README_d/README.solaris 2001-09-09 12:01:57.000000000 +0300 +++ gawk-3.1.2/README_d/README.solaris 2003-02-09 10:36:51.000000000 +0200 @@ -118,3 +118,21 @@ Columbus, Ohio 43210-1174 1-614-292-5310 (Office/Answering Device) The United States of America 1-614-292-1479 (Math Dept Fax) +Solaris Problem #3: +=================== +Sun Feb 9 10:35:51 IST 2003 + +Certain versions of Sun C give compilation errors under Solaris 5.5, 5.6 and +possibly later. Here's what I was told: + +> We have this version of cc here: +> cc -V +> cc: Sun WorkShop 6 update 1 C 5.2 2000/09/11 +> +> Probably, the others use different combinations of OS and CC. +> A quick fix was this (we use csh-syntax here): +> +> setenv CC "/opt/SUNWspro/bin/cc -Xc" +> ./configure +> make check + diff -urN gawk-3.1.1/aclocal.m4 gawk-3.1.2/aclocal.m4 --- gawk-3.1.1/aclocal.m4 2002-04-29 17:36:45.000000000 +0300 +++ gawk-3.1.2/aclocal.m4 2003-03-16 12:25:33.000000000 +0200 @@ -1,6 +1,6 @@ -# aclocal.m4 generated automatically by aclocal 1.5 +# generated automatically by aclocal 1.7.3 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11,20 +11,37 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -sinclude(arch.m4)dnl -sinclude(gettext.m4)dnl -sinclude(jm-mktime.m4)dnl -sinclude(largefile.m4)dnl -sinclude(lcmessage.m4)dnl -sinclude(progtest.m4)dnl -sinclude(socket.m4)dnl -sinclude(strtod.m4)dnl - -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. +m4_sinclude(arch.m4)dnl +m4_sinclude(gettext.m4)dnl +m4_sinclude(lcmessage.m4)dnl +m4_sinclude(progtest.m4)dnl +m4_sinclude(socket.m4)dnl +m4_sinclude(strtod.m4)dnl -# serial 5 +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -33,62 +50,62 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... -# We require 2.13 because we rely on SHELL being computed by configure. -AC_PREREQ([2.13]) - -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. -# The purpose of this macro is to provide the user with a means to -# check macros which are provided without letting her know how the -# information is coded. -# If this macro is not defined by Autoconf, define it here. -ifdef([AC_PROVIDE_IFELSE], - [], - [define([AC_PROVIDE_IFELSE], - [ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +AC_PREREQ([2.54]) +# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow +# the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) -# ---------------------------------------------- +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AC_PROG_INSTALL])dnl +[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured -if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" && +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first]) + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi -# Define the identity of the package. -PACKAGE=$1 -AC_SUBST(PACKAGE)dnl -VERSION=$2 -AC_SUBST(VERSION)dnl -ifelse([$3],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -ifdef([m4_pattern_allow], - [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl -# Autoconf 2.50 always computes EXEEXT. However we need to be -# compatible with 2.13, for now. So we always define EXEEXT, but we -# don't compute it. -AC_SUBST(EXEEXT) -# Similar for OBJEXT -- only we only use OBJEXT if the user actually -# requests that it be used. This is a bit dumb. -: ${OBJEXT=o} -AC_SUBST(OBJEXT) +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal) +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) @@ -98,22 +115,135 @@ # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl -AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_PROVIDE_IFELSE([AC_PROG_][CC], +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_][CC], - defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_][CXX], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_][CXX], - defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) ]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# Copyright 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.7.3])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + # # Check to make sure that the build environment is sane. # +# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # serial 3 # AM_SANITY_CHECK @@ -157,8 +287,27 @@ fi AC_MSG_RESULT(yes)]) +# -*- Autoconf -*- -# serial 2 + +# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -180,13 +329,29 @@ am_missing_run="$MISSING --run " else am_missing_run= - am_backtick='`' - AC_MSG_WARN([${am_backtick}missing' script is too old or missing]) + AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -225,19 +390,59 @@ # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. +# Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50]) + AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path -am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd` +am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) +# AM_PROG_INSTALL_STRIP + +# Copyright 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -247,11 +452,68 @@ # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# serial 4 -*- Autoconf -*- +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) +# serial 5 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be @@ -263,9 +525,9 @@ # _AM_DEPENDENCIES(NAME) -# --------------------- +# ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX" or "OBJC". +# NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -280,7 +542,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'] + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -328,11 +590,17 @@ if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \ + >/dev/null 2>conftest.err && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - am_cv_$1_dependencies_compiler_type=$depmode - break + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi fi done @@ -342,8 +610,10 @@ am_cv_$1_dependencies_compiler_type=none fi ]) -$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type" -AC_SUBST([$1DEPMODE]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) @@ -352,16 +622,8 @@ # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], -[rm -f .deps 2>/dev/null -mkdir .deps 2>/dev/null -if test -d .deps; then - DEPDIR=.deps -else - # MS-DOS does not allow filenames that begin with a dot. - DEPDIR=_deps -fi -rmdir .deps 2>/dev/null -AC_SUBST(DEPDIR) +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) @@ -376,30 +638,48 @@ AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -pushdef([subst], defn([AC_SUBST])) -subst(AMDEPBACKSLASH) -popdef([subst]) +AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -# This macro should only be invoked once -- use via AC_REQUIRE. -# Usage: -# AM_OUTPUT_DEPENDENCY_COMMANDS +# Generate code to set up dependency tracking. -*- Autoconf -*- -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[ -AC_OUTPUT_COMMANDS([ -test x"$AMDEP_TRUE" != x"" || -for mf in $CONFIG_FILES; do - case "$mf" in - Makefile) dirpart=.;; - */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;; - *) continue;; - esac - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue +# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` @@ -423,14 +703,48 @@ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`echo "$file" | sed -e 's|/[^/]*$||'` - $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1 + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done -], [AMDEP_TRUE="$AMDEP_TRUE" -ac_aux_dir="$ac_aux_dir"])]) +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # AM_MAKE_INCLUDE() # ----------------- @@ -443,7 +757,7 @@ END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) -am__include='#' +am__include="#" am__quote= _am_result=none # First try GNU make style include. @@ -453,7 +767,7 @@ # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU @@ -463,7 +777,7 @@ echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include - am__quote='"' + am__quote="\"" _am_result=BSD fi fi @@ -473,23 +787,35 @@ rm -f confinc confmf ]) -# serial 3 +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 5 + +AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. -# -# FIXME: Once using 2.50, use this: -# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl AC_DEFUN([AM_CONDITIONAL], -[ifelse([$1], [TRUE], - [errprint(__file__:__line__: [$0: invalid condition: $1 -])dnl -m4exit(1)])dnl -ifelse([$1], [FALSE], - [errprint(__file__:__line__: [$0: invalid condition: $1 -])dnl -m4exit(1)])dnl +[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then @@ -498,74 +824,12 @@ else $1_TRUE='#' $1_FALSE= -fi]) - -# Like AC_CONFIG_HEADER, but automatically create stamp file. - -# serial 3 - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. We must strip everything past the first ":", -# and everything past the last "/". - -AC_PREREQ([2.12]) - -AC_DEFUN([AM_CONFIG_HEADER], -[ifdef([AC_FOREACH],dnl - [dnl init our file count if it isn't already - m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) - dnl prepare to store our destination file list for use in config.status - AC_FOREACH([_AM_File], [$1], - [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) - m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) - dnl and add it to the list of files AC keeps track of, along - dnl with our hook - AC_CONFIG_HEADERS(_AM_File, -dnl COMMANDS, [, INIT-CMDS] -[# update the timestamp -echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" -][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS - m4_popdef([_AM_Dest])])],dnl -[AC_CONFIG_HEADER([$1]) - AC_OUTPUT_COMMANDS( - ifelse(patsubst([$1], [[^ ]], []), - [], - [test -z "$CONFIG_HEADERS" || echo timestamp >dnl - patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl -[am_indx=1 -for am_file in $1; do - case " \$CONFIG_HEADERS " in - *" \$am_file "*) - am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` - if test -n "\$am_dir"; then - am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` - for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do - am_tmpdir=\$am_tmpdir\$am_subdir/ - if test ! -d \$am_tmpdir; then - mkdir \$am_tmpdir - fi - done - fi - echo timestamp > "\$am_dir"stamp-h\$am_indx - ;; - esac - am_indx=\`expr \$am_indx + 1\` -done]) -])]) # AM_CONFIG_HEADER - -# _AM_DIRNAME(PATH) -# ----------------- -# Like AS_DIRNAME, only do it during macro expansion -AC_DEFUN([_AM_DIRNAME], - [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, - m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1, - m4_if(m4_regexp([$1], [^/.*]), -1, - [.], - m4_patsubst([$1], [^\(/\).*], [\1])), - m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), - m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl -]) # _AM_DIRNAME +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) # isc-posix.m4 serial 2 (gettext-0.11.2) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. @@ -594,103 +858,10 @@ ] ) -#serial 19 - -dnl By default, many hosts won't let programs access large files; -dnl one must use special compiler options to get large-file access to work. -dnl For more details about this brain damage please see: -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html - -dnl Written by Paul Eggert . - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_TEST_INCLUDES -AC_DEFUN(AC_SYS_LARGEFILE_TEST_INCLUDES, - [[#include - /* Check that off_t can represent 2**63 - 1 correctly. - We can't simply "#define LARGE_OFF_T 9223372036854775807", - since some C++ compilers masquerading as C compilers - incorrectly reject 9223372036854775807. */ -# define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) - int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 - && LARGE_OFF_T % 2147483647 == 1) - ? 1 : -1]; - ]]) - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLUDES, FUNCTION-BODY) -AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE, - [AC_CACHE_CHECK([for $1 value needed for large files], $3, - [$3=no - AC_TRY_COMPILE([$5], - [$6], - , - [AC_TRY_COMPILE([#define $1 $2] -[$5] - , - [$6], - [$3=$2])])]) - if test "[$]$3" != no; then - AC_DEFINE_UNQUOTED([$1], [$]$3, [$4]) - fi]) - -AC_DEFUN(AC_SYS_LARGEFILE, - [AC_REQUIRE([AC_PROG_CC]) - AC_ARG_ENABLE(largefile, - [ --disable-largefile omit support for large files]) - if test "$enable_largefile" != no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files], - ac_cv_sys_largefile_CC, - [ac_cv_sys_largefile_CC=no - if test "$GCC" != yes; then - # IRIX 6.2 and later do not support large files by default, - # so use the C compiler's -n32 option if that helps. - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , , - [ac_save_CC="$CC" - CC="$CC -n32" - AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , - ac_cv_sys_largefile_CC=' -n32') - CC="$ac_save_CC"]) - fi]) - if test "$ac_cv_sys_largefile_CC" != no; then - CC="$CC$ac_cv_sys_largefile_CC" - fi - - AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, - ac_cv_sys_file_offset_bits, - [Number of bits in a file offset, on hosts where this is settable.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - AC_SYS_LARGEFILE_TEST_INCLUDES) - fi - ]) - -AC_DEFUN(AC_FUNC_FSEEKO, - [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - ac_cv_sys_largefile_source, - [Define to make fseeko visible on some hosts (e.g. glibc 2.2).], - [#include ], [return !fseeko;]) - # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug - # in glibc 2.1.3, but that breaks too many other things. - # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. - - AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko, - [ac_cv_func_fseeko=no - AC_TRY_LINK([#include ], - [return fseeko && fseeko (stdin, 0, 0);], - [ac_cv_func_fseeko=yes])]) - if test $ac_cv_func_fseeko != no; then - AC_DEFINE(HAVE_FSEEKO, 1, - [Define if fseeko (and presumably ftello) exists and is declared.]) - fi]) - dnl dnl arch.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 1996, 1998, 1999, 2000 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -714,9 +885,9 @@ AC_DEFUN(GAWK_AC_AIX_TWEAK, [ AC_MSG_CHECKING([for AIX compilation hacks]) AC_CACHE_VAL(gawk_cv_aix_hack, [ -if test -d /lpp/bos +if test -d /lpp then - CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1" + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" gawk_cv_aix_hack=yes else gawk_cv_aix_hack=no @@ -748,7 +919,24 @@ ])dnl -# serial 1 +# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # @defmac AC_PROG_CC_STDC # @maindex PROG_CC_STDC @@ -836,8 +1024,27 @@ esac ]) +AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC]) -# serial 1 + +# Copyright 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AM_PROG_CC_STDC]) @@ -858,7 +1065,9 @@ AC_SUBST(ANSI2KNR)dnl ]) -# gettext.m4 serial 14 (gettext-0.11.2) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) + +# gettext.m4 serial 17 (gettext-0.11.5) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -893,7 +1102,9 @@ dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl @@ -920,9 +1131,9 @@ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])]) +])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) @@ -935,6 +1146,21 @@ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, @@ -970,13 +1196,20 @@ dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. - define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1)) + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], @@ -1001,7 +1234,14 @@ LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" @@ -1015,7 +1255,14 @@ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" @@ -1310,7 +1557,7 @@ ;; esac done], - [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' @@ -1339,6 +1586,10 @@ AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) @@ -1348,7 +1599,9 @@ AM_ICONV AM_LANGINFO_CODESET - AM_LC_MESSAGES + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least @@ -1398,6 +1651,10 @@ AC_SUBST(MKINSTALLDIRS) ]) + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + # lib-prefix.m4 serial 1 (gettext-0.11) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU @@ -1547,7 +1804,7 @@ prefix="$acl_save_prefix" ]) -# lib-link.m4 serial 2 (gettext-0.11.2) +# lib-link.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -1665,6 +1922,10 @@ hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and @@ -1794,7 +2055,7 @@ dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. - if test "X$found_dir" = "X/usr/lib"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -1985,29 +2246,31 @@ ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" fi ;; -l*) @@ -2194,7 +2457,7 @@ AC_LIB_PROG_LD_GNU ]) -# iconv.m4 serial AM3 (gettext-0.11) +# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -2204,11 +2467,8 @@ dnl From Bruno Haible. -AC_DEFUN([AM_ICONV_LINK], +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) @@ -2216,6 +2476,16 @@ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use @@ -2265,7 +2535,7 @@ AC_DEFUN([AM_ICONV], [ - AC_REQUIRE([AM_ICONV_LINK]) + AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ @@ -2384,6 +2654,252 @@ ] ) +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) + +# uintmax_t.m4 serial 6 (gettext-0.11) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to `unsigned long' or `unsigned long long' +# if does not exist. + +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + fi +]) + +# inttypes_h.m4 serial 4 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# stdint_h.m4 serial 2 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) + +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) + +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) + # codeset.m4 serial AM1 (gettext-0.10.40) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU @@ -2408,7 +2924,7 @@ fi ]) -# lcmessage.m4 serial 2 (gettext-0.10.40) +# lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -2431,40 +2947,15 @@ # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi - fi]) - -#serial 1 - -dnl AC_PREREQ(2.14a) - -dnl This is a specialization of AC_CHECK_TYPE applied to `ssize_t' with -dnl the difference that it also includes unistd.h on systems that have it. -dnl On Fujitsu UXP/V systems ssize_t is defined in unistd.h. -AC_DEFUN(GAWK_AC_TYPE_SSIZE_T, - [ - AC_CHECK_HEADERS(unistd.h) - AC_CHECK_TYPE(ssize_t, int, - [ -#include -#if STDC_HEADERS -# include -# include -#endif -#if HAVE_UNISTD_H -# include -#endif - ] - ) - ] -) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) dnl dnl strtod.m4 --- autoconf input file for gawk @@ -2522,192 +3013,14 @@ gawk_ac_cv_func_strtod_c89=yes, gawk_ac_cv_func_strtod_c89=no, gawk_ac_cv_func_strtod_c89=no)]) if test $gawk_ac_cv_func_strtod_c89 = no; then - AC_DEFINE(STRTOD_NOT_C89) + AC_DEFINE(STRTOD_NOT_C89, 1, [strtod doesn't have C89 semantics]) fi ])# GAWK_FUNC_STRTOD_C89 -#serial 7 - -dnl From Jim Meyering. -dnl A wrapper around AC_FUNC_MKTIME. - -AC_DEFUN(jm_FUNC_MKTIME, -[AC_REQUIRE([AC_FUNC_MKTIME])dnl - - dnl mktime.c uses localtime_r if it exists. Check for it. - AC_CHECK_FUNCS(localtime_r) - - if test $ac_cv_func_working_mktime = no; then - AC_DEFINE_UNQUOTED(mktime, rpl_mktime, - [Define to rpl_mktime if the replacement function should be used.]) - fi -]) - -# AC_FUNC_MKTIME -# -------------- -# Stolen from CVS Autoconf. Should be removed once you use Autoconf 2.15. -AC_DEFUN(AC_FUNC_MKTIME, -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CHECK_HEADERS(sys/time.h unistd.h) -AC_CHECK_FUNCS(alarm) -AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, -[AC_TRY_RUN( -[/* Test program from Paul Eggert (eggert@twinsun.com) - and Tony Leneis (tony@plaza.ds.adp.com). */ -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#if HAVE_UNISTD_H -# include -#endif - -#if !HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; - -/* Values we'll use to set the TZ environment variable. */ -static const char *const tz_strings[] = { - (const char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Fail if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static void -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test) */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - if (mktime (&tm) == (time_t)-1) - exit (1); -} - -static void -mktime_test (now) - time_t now; -{ - struct tm *lt; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); - now = time_t_max - now; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); -} - -static void -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - if (tm.tm_mon != 2 || tm.tm_mday != 31) - exit (1); -} - -static void -bigtime_test (j) - int j; -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - exit (1); - } -} - -int -main () -{ - time_t t, delta; - int i, j; - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) - continue; - time_t_max--; - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - mktime_test (t); - mktime_test ((time_t) 60 * 60); - mktime_test ((time_t) 60 * 60 * 24); - - for (j = 1; 0 < j; j *= 2) - bigtime_test (j); - bigtime_test (j - 1); - } - irix_6_4_bug (); - spring_forward_gap (); - exit (0); -}], -ac_cv_func_working_mktime=yes, ac_cv_func_working_mktime=no, -ac_cv_func_working_mktime=no)]) -if test $ac_cv_func_working_mktime = no; then - LIBOBJS="$LIBOBJS mktime.${ac_objext}" -fi -])# AC_FUNC_MKTIME dnl dnl socket.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 96, 98, 99, 2000 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -2785,7 +3098,7 @@ esac AC_MSG_RESULT([${gawk_lib_loc}]) - AC_DEFINE(HAVE_SOCKETS) + AC_DEFINE(HAVE_SOCKETS, 1, [we have sockets on this system]) fi AC_SUBST(SOCKET_LIBS)dnl ])dnl diff -urN gawk-3.1.1/ansi2knr.c gawk-3.1.2/ansi2knr.c --- gawk-3.1.1/ansi2knr.c 2000-11-07 18:15:29.000000000 +0200 +++ gawk-3.1.2/ansi2knr.c 2003-03-06 11:11:50.000000000 +0200 @@ -1,6 +1,6 @@ -/* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */ +/* Copyright (C) 1989, 2000 Aladdin Enterprises. All rights reserved. */ -/*$Id: ansi2knr.c $*/ +/*$Id: ansi2knr.c,v 1.3 2000/04/13 03:41:48 lpd Exp $*/ /* Convert ANSI C function definitions to K&R ("traditional C") syntax */ /* @@ -37,21 +37,21 @@ * There are no error messages. * * ansi2knr recognizes function definitions by seeing a non-keyword - * identifier at the left margin, followed by a left parenthesis, - * with a right parenthesis as the last character on the line, - * and with a left brace as the first token on the following line - * (ignoring possible intervening comments), except that a line + * identifier at the left margin, followed by a left parenthesis, with a + * right parenthesis as the last character on the line, and with a left + * brace as the first token on the following line (ignoring possible + * intervening comments and/or preprocessor directives), except that a line * consisting of only * identifier1(identifier2) * will not be considered a function definition unless identifier2 is * the word "void", and a line consisting of * identifier1(identifier2, <>) * will not be considered a function definition. - * ansi2knr will recognize a multi-line header provided - * that no intervening line ends with a left or right brace or a semicolon. - * These algorithms ignore whitespace and comments, except that - * the function name must be the first thing on the line. - * The following constructs will confuse it: + * ansi2knr will recognize a multi-line header provided that no intervening + * line ends with a left or right brace or a semicolon. These algorithms + * ignore whitespace, comments, and preprocessor directives, except that + * the function name must be the first thing on the line. The following + * constructs will confuse it: * - Any other construct that starts at the left margin and * follows the above syntax (such as a macro or function call). * - Some macros that tinker with the syntax of function headers. @@ -61,6 +61,27 @@ * The original and principal author of ansi2knr is L. Peter Deutsch * . Other authors are noted in the change history * that follows (in reverse chronological order): + + lpd 2000-04-12 backs out Eggert's changes because of bugs: + - concatlits didn't declare the type of its bufend argument; + - concatlits didn't't recognize when it was inside a comment; + - scanstring could scan backward past the beginning of the string; when + - the check for \ + newline in scanstring was unnecessary. + + 2000-03-05 Paul Eggert + + Add support for concatenated string literals. + * ansi2knr.c (concatlits): New decl. + (main): Invoke concatlits to concatenate string literals. + (scanstring): Handle backslash-newline correctly. Work with + character constants. Fix bug when scanning backwards through + backslash-quote. Check for unterminated strings. + (convert1): Parse character constants, too. + (appendline, concatlits): New functions. + * ansi2knr.1: Document this. + + lpd 1999-08-17 added code to allow preprocessor directives + wherever comments are allowed lpd 1999-04-12 added minor fixes from Pavel Roskin for clean compilation with gcc -W -Wall @@ -196,6 +217,8 @@ #define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') /* Forward references */ +char *ppdirforward(); +char *ppdirbackward(); char *skipspace(); char *scanstring(); int writeblanks(); @@ -298,7 +321,7 @@ goto wl; if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) goto wl; - switch ( *skipspace(more, 1) ) + switch ( *skipspace(ppdirforward(more), 1) ) { case '{': /* Definitely a function header. */ @@ -349,32 +372,70 @@ return 0; } -/* Skip over whitespace and comments, in either direction. */ +/* + * Skip forward or backward over one or more preprocessor directives. + */ +char * +ppdirforward(p) + char *p; +{ + for (; *p == '#'; ++p) { + for (; *p != '\r' && *p != '\n'; ++p) + if (*p == 0) + return p; + if (*p == '\r' && p[1] == '\n') + ++p; + } + return p; +} +char * +ppdirbackward(p, limit) + char *p; + char *limit; +{ + char *np = p; + + for (;; p = --np) { + if (*np == '\n' && np[-1] == '\r') + --np; + for (; np > limit && np[-1] != '\r' && np[-1] != '\n'; --np) + if (np[-1] == 0) + return np; + if (*np != '#') + return p; + } +} + +/* + * Skip over whitespace, comments, and preprocessor directives, + * in either direction. + */ char * skipspace(p, dir) - register char *p; - register int dir; /* 1 for forward, -1 for backward */ -{ for ( ; ; ) - { while ( is_space(*p) ) - p += dir; - if ( !(*p == '/' && p[dir] == '*') ) - break; - p += dir; p += dir; - while ( !(*p == '*' && p[dir] == '/') ) - { if ( *p == 0 ) - return p; /* multi-line comment?? */ - p += dir; - } - p += dir; p += dir; - } - return p; + char *p; + int dir; /* 1 for forward, -1 for backward */ +{ + for ( ; ; ) { + while ( is_space(*p) ) + p += dir; + if ( !(*p == '/' && p[dir] == '*') ) + break; + p += dir; p += dir; + while ( !(*p == '*' && p[dir] == '/') ) { + if ( *p == 0 ) + return p; /* multi-line comment?? */ + p += dir; + } + p += dir; p += dir; + } + return p; } /* Scan over a quoted string, in either direction. */ char * scanstring(p, dir) - register char *p; - register int dir; + char *p; + int dir; { for (p += dir; ; p += dir) if (*p == '"' && p[-dir] != '\\') @@ -412,14 +473,14 @@ int test1(buf) char *buf; -{ register char *p = buf; +{ char *p = buf; char *bend; char *endfn; int contin; if ( !isidfirstchar(*p) ) return 0; /* no name at left margin */ - bend = skipspace(buf + strlen(buf) - 1, -1); + bend = skipspace(ppdirbackward(buf + strlen(buf) - 1, buf), -1); switch ( *bend ) { case ';': contin = 0 /*2*/; break; @@ -498,7 +559,7 @@ int header; /* Boolean */ int convert_varargs; /* Boolean */ { char *endfn; - register char *p; + char *p; /* * The breaks table contains pointers to the beginning and end * of each argument. diff -urN gawk-3.1.1/array.c gawk-3.1.2/array.c --- gawk-3.1.1/array.c 2002-04-16 14:40:06.000000000 +0300 +++ gawk-3.1.2/array.c 2003-02-18 15:57:44.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -33,15 +33,43 @@ * The decision is made to grow the array if the average chain length is * ``too big''. This is defined as the total number of entries in the table * divided by the size of the array being greater than some constant. + * + * 11/2002: We make the constant a variable, so that it can be tweaked + * via environment variable. */ -#define AVG_CHAIN_MAX 10 /* don't want to linear search more than this */ +static int AVG_CHAIN_MAX = 2; /* 11/2002: Modern machines are bigger, cut this down from 10. */ #include "awk.h" static NODE *assoc_find P((NODE *symbol, NODE *subs, int hash1)); static void grow_table P((NODE *symbol)); +static unsigned long gst_hash_string P((const char *str, size_t len, unsigned long hsize)); +static unsigned long scramble P((unsigned long x)); +static unsigned long awk_hash P((const char *s, size_t len, unsigned long hsize)); + +unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize)) = awk_hash; + +/* array_init --- possibly temporary function for experimentation purposes */ + +void +array_init() +{ + const char *val; + int newval; + + if ((val = getenv("AVG_CHAIN_MAX")) != NULL && ISDIGIT(*val)) { + for (newval = 0; *val && ISDIGIT(*val); val++) + newval = (newval * 10) + *val - '0'; + + AVG_CHAIN_MAX = newval; + } + + if ((val = getenv("AWK_HASH")) != NULL && strcmp(val, "gst") == 0) + hash = gst_hash_string; +} + /* concat_exp --- concatenate expression list into a single string */ NODE * @@ -53,7 +81,7 @@ size_t len; int offset; size_t subseplen; - char *subsep; + const char *subsep; if (tree->type != Node_expression_list) return force_string(tree_eval(tree)); @@ -101,9 +129,8 @@ for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) { next = bucket->ahnext; - unref(bucket->ahname); unref(bucket->ahvalue); - freenode(bucket); + unref(bucket); /* unref() will free the ahname_str */ } symbol->var_array[i] = NULL; } @@ -115,8 +142,8 @@ /* hash --- calculate the hash function of the string in subs */ -unsigned int -hash(register const char *s, register size_t len, unsigned long hsize) +static unsigned long +awk_hash(register const char *s, register size_t len, unsigned long hsize) { register unsigned long h = 0; @@ -206,7 +233,9 @@ assoc_find(NODE *symbol, register NODE *subs, int hash1) { register NODE *bucket; - NODE *s1, *s2; + const char *s1_str; + size_t s1_len; + NODE *s2; for (bucket = symbol->var_array[hash1]; bucket != NULL; bucket = bucket->ahnext) { @@ -214,26 +243,28 @@ * This used to use cmp_nodes() here. That's wrong. * Array indexes are strings; compare as such, always! */ - s1 = bucket->ahname; - s1 = force_string(s1); + s1_str = bucket->ahname_str; + s1_len = bucket->ahname_len; s2 = subs; - if (s1->stlen == s2->stlen) { - if (s1->stlen == 0 /* "" is a valid index */ - || STREQN(s1->stptr, s2->stptr, s1->stlen)) + if (s1_len == s2->stlen) { + if (s1_len == 0 /* "" is a valid index */ + || STREQN(s1_str, s2->stptr, s1_len)) return bucket; } } return NULL; } -/* in_array --- test whether the array element symbol[subs] exists or not */ +/* in_array --- test whether the array element symbol[subs] exists or not, + * return pointer to value if it does. + */ -int +NODE * in_array(NODE *symbol, NODE *subs) { register int hash1; - int ret; + NODE *ret; if (symbol->type == Node_param_list) symbol = stack_ptr[symbol->param_cnt]; @@ -247,12 +278,15 @@ subs = concat_exp(subs); /* concat_exp returns a string node */ if (symbol->var_array == NULL) { free_temp(subs); - return 0; + return NULL; } hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size); - ret = (assoc_find(symbol, subs, hash1) != NULL); + ret = assoc_find(symbol, subs, hash1); free_temp(subs); - return ret; + if (ret) + return ret->ahvalue; + else + return NULL; } /* @@ -331,18 +365,15 @@ * One day: Use an atom table to track array indices, * and avoid the extra memory overhead. */ - if (subs->flags & TEMP) - bucket->ahname = dupnode(subs); - else - bucket->ahname = copynode(subs); + bucket->flags |= MALLOC; + bucket->ahname_ref = 1; + emalloc(bucket->ahname_str, char *, subs->stlen + 2, "assoc_lookup"); + bucket->ahname_len = subs->stlen; - free_temp(subs); + memcpy(bucket->ahname_str, subs->stptr, subs->stlen); + bucket->ahname_str[bucket->ahname_len] = '\0'; - /* array subscripts are strings */ - bucket->ahname->flags &= ~(NUMBER|NUM); - bucket->ahname->flags |= (STRING|STR); - /* ensure that this string value never changes */ - bucket->ahname->stfmt = -1; + free_temp(subs); bucket->ahvalue = Nnull_string; bucket->ahnext = symbol->var_array[hash1]; @@ -352,6 +383,11 @@ /* do_delete --- perform `delete array[s]' */ +/* + * `symbol' is array + * `tree' is subscript + */ + void do_delete(NODE *symbol, NODE *tree) { @@ -359,16 +395,39 @@ register NODE *bucket, *last; NODE *subs; + /* + * Evaluate subscript first, always, in case there are + * side effects. + */ + if (tree != NULL) + subs = concat_exp(tree); /* concat_exp returns string node */ + else + subs = NULL; + if (symbol->type == Node_param_list) { symbol = stack_ptr[symbol->param_cnt]; - if (symbol->type == Node_var) + if (symbol->type == Node_var) { + if (subs != NULL) { + if (do_lint) + lintwarn(_("delete: index `%s' not in array `%s'"), + subs->stptr, symbol->vname); + free_temp(subs); + } return; + } } if (symbol->type == Node_array_ref) symbol = symbol->orig_array; if (symbol->type == Node_var_array) { - if (symbol->var_array == NULL) + if (symbol->var_array == NULL) { + if (subs != NULL) { + if (do_lint) + lintwarn(_("delete: index `%s' not in array `%s'"), + subs->stptr, symbol->vname); + free_temp(subs); + } return; + } } else fatal(_("delete: illegal use of variable `%s' as array"), symbol->vname); @@ -378,7 +437,6 @@ return; } - subs = concat_exp(tree); /* concat_exp returns string node */ hash1 = hash(subs->stptr, subs->stlen, (unsigned long) symbol->array_size); last = NULL; @@ -388,15 +446,17 @@ * This used to use cmp_nodes() here. That's wrong. * Array indexes are strings; compare as such, always! */ - NODE *s1, *s2; + const char *s1_str; + size_t s1_len; + NODE *s2; - s1 = bucket->ahname; - s1 = force_string(s1); + s1_str = bucket->ahname_str; + s1_len = bucket->ahname_len; s2 = subs; - if (s1->stlen == s2->stlen) { - if (s1->stlen == 0 /* "" is a valid index */ - || STREQN(s1->stptr, s2->stptr, s1->stlen)) + if (s1_len == s2->stlen) { + if (s1_len == 0 /* "" is a valid index */ + || STREQN(s1_str, s2->stptr, s1_len)) break; } } @@ -413,9 +473,8 @@ last->ahnext = bucket->ahnext; else symbol->var_array[hash1] = bucket->ahnext; - unref(bucket->ahname); unref(bucket->ahvalue); - freenode(bucket); + unref(bucket); /* unref() will free the ahname_str */ symbol->table_size--; if (symbol->table_size <= 0) { memset(symbol->var_array, '\0', @@ -461,7 +520,10 @@ if (symbol->var_array[i] != NULL) { lhs = get_lhs(tree->lnode, & after_assign, FALSE); unref(*lhs); - *lhs = dupnode(symbol->var_array[i]->ahname); + *lhs = make_string(symbol->var_array[i]->ahname_str, + symbol->var_array[i]->ahname_len); + if (after_assign) + (*after_assign)(); break; } } @@ -488,7 +550,7 @@ * very large (> 8K), we just double more or less, instead of * just jumping from 8K to 64K. */ - static long sizes[] = { 13, 127, 1021, 8191, 16381, 32749, 65497, + static const long sizes[] = { 13, 127, 1021, 8191, 16381, 32749, 65497, #if ! defined(MSDOS) && ! defined(OS2) && ! defined(atarist) 131101, 262147, 524309, 1048583, 2097169, 4194319, 8388617, 16777259, 33554467, @@ -529,8 +591,8 @@ for (chain = old[i]; chain != NULL; chain = next) { next = chain->ahnext; - hash1 = hash(chain->ahname->stptr, - chain->ahname->stlen, newsize); + hash1 = hash(chain->ahname_str, + chain->ahname_len, newsize); /* remove from old list, add to new */ chain->ahnext = new[hash1]; @@ -553,7 +615,7 @@ static void pr_node(NODE *n) { - if ((n->flags & (NUM|NUMBER)) != 0) + if ((n->flags & (NUMCUR|NUMBER)) != 0) printf("%g", n->numbr); else printf("%.*s", (int) n->stlen, n->stptr); @@ -583,14 +645,11 @@ for (i = 0; i < symbol->array_size; i++) { for (bucket = symbol->var_array[i]; bucket != NULL; bucket = bucket->ahnext) { - printf("%s: I: [(%p, %ld, %s) len %d <%.*s>] V: [", + printf("%s: I: [len %d <%.*s>] V: [", symbol->vname, - bucket->ahname, - bucket->ahname->stref, - flags2str(bucket->ahname->flags), - (int) bucket->ahname->stlen, - (int) bucket->ahname->stlen, - bucket->ahname->stptr); + (int) bucket->ahname_len, + (int) bucket->ahname_len, + bucket->ahname_str); pr_node(bucket->ahvalue); printf("]\n"); } @@ -663,12 +722,19 @@ /* get a node for the linked list */ getnode(bucket); bucket->type = Node_ahash; + bucket->flags |= MALLOC; + bucket->ahname_ref = 1; /* * copy the corresponding name and * value from the original input list */ - bucket->ahname = dupnode(chain->ahname); + emalloc(bucket->ahname_str, char *, chain->ahname_len + 2, "dup_table"); + bucket->ahname_len = chain->ahname_len; + + memcpy(bucket->ahname_str, chain->ahname_str, chain->ahname_len); + bucket->ahname_str[bucket->ahname_len] = '\0'; + bucket->ahvalue = dupnode(chain->ahvalue); /* @@ -694,9 +760,14 @@ { NODE *ans, *cur; + /* + * The use of cmp_nodes() here means that IGNORECASE influences the + * comparison. This is OK, but it may be surprising. This comment + * serves to remind us that we know about this and that it's OK. + */ if (cmp_nodes(left->ahvalue, right->ahvalue) <= 0) { ans = cur = left; - left = left->ahnext; + left = left->ahnext; } else { ans = cur = right; right = right->ahnext; @@ -758,19 +829,24 @@ assoc_from_list(NODE *symbol, NODE *list) { NODE *next; - int i = 0; + unsigned long i = 0; register int hash1; + char buf[100]; for (; list != NULL; list = next) { next = list->ahnext; /* make an int out of i++ */ i++; - list->ahname = make_number((AWKNUM) i); - (void) force_string(list->ahname); + sprintf(buf, "%lu", i); + assert(list->ahname_str == NULL); + assert(list->ahname_ref == 1); + emalloc(list->ahname_str, char *, strlen(buf) + 2, "assoc_from_list"); + list->ahname_len = strlen(buf); + strcpy(list->ahname_str, buf); /* find the bucket where it belongs */ - hash1 = hash(list->ahname->stptr, list->ahname->stlen, + hash1 = hash(list->ahname_str, list->ahname_len, symbol->array_size); /* link the node into the chain at that bucket */ @@ -784,8 +860,10 @@ * the sorted values back into symbol[], indexed by integers starting with 1. */ +typedef enum asort_how { VALUE, INDEX } ASORT_TYPE; + static NODE * -assoc_sort_inplace(NODE *symbol) +assoc_sort_inplace(NODE *symbol, ASORT_TYPE how) { int i, num; NODE *bucket, *next, *list; @@ -796,17 +874,70 @@ return tmp_number((AWKNUM) 0); /* build a linked list out of all the entries in the table */ - list = NULL; - num = 0; - for (i = 0; i < symbol->array_size; i++) { - for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) { - next = bucket->ahnext; - unref(bucket->ahname); - bucket->ahnext = list; - list = bucket; - num++; + if (how == VALUE) { + list = NULL; + num = 0; + for (i = 0; i < symbol->array_size; i++) { + for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) { + next = bucket->ahnext; + if (bucket->ahname_ref == 1) { + free(bucket->ahname_str); + bucket->ahname_str = NULL; + bucket->ahname_len = 0; + } else { + NODE *r; + + getnode(r); + *r = *bucket; + unref(bucket); + bucket = r; + bucket->flags |= MALLOC; + bucket->ahname_ref = 1; + bucket->ahname_str = NULL; + bucket->ahname_len = 0; + } + bucket->ahnext = list; + list = bucket; + num++; + } + symbol->var_array[i] = NULL; + } + } else { /* how == INDEX */ + list = NULL; + num = 0; + for (i = 0; i < symbol->array_size; i++) { + for (bucket = symbol->var_array[i]; bucket != NULL; bucket = next) { + next = bucket->ahnext; + + /* toss old value */ + unref(bucket->ahvalue); + + /* move index into value */ + if (bucket->ahname_ref == 1) { + bucket->ahvalue = make_str_node(bucket->ahname_str, + bucket->ahname_len, ALREADY_MALLOCED); + bucket->ahname_str = NULL; + bucket->ahname_len = 0; + } else { + NODE *r; + + bucket->ahvalue = make_string(bucket->ahname_str, bucket->ahname_len); + getnode(r); + *r = *bucket; + unref(bucket); + bucket = r; + bucket->flags |= MALLOC; + bucket->ahname_ref = 1; + bucket->ahname_str = NULL; + bucket->ahname_len = 0; + } + + bucket->ahnext = list; + list = bucket; + num++; + } + symbol->var_array[i] = NULL; } - symbol->var_array[i] = NULL; } /* @@ -826,10 +957,10 @@ return tmp_number((AWKNUM) num); } -/* do_asort --- do the actual work to sort the input array */ +/* asort_actual --- do the actual work to sort the input array */ -NODE * -do_asort(NODE *tree) +static NODE * +asort_actual(NODE *tree, ASORT_TYPE how) { NODE *src, *dest; @@ -856,5 +987,83 @@ dup_table(src, dest); } - return dest != NULL ? assoc_sort_inplace(dest) : assoc_sort_inplace(src); + return dest != NULL ? assoc_sort_inplace(dest, how) : assoc_sort_inplace(src, how); +} + +/* do_asort --- sort array by value */ + +NODE * +do_asort(NODE *tree) +{ + return asort_actual(tree, VALUE); +} + +/* do_asorti --- sort array by index */ + +NODE * +do_asorti(NODE *tree) +{ + return asort_actual(tree, INDEX); +} + +/* +From bonzini@gnu.org Mon Oct 28 16:05:26 2002 +Date: Mon, 28 Oct 2002 13:33:03 +0100 +From: Paolo Bonzini +To: arnold@skeeve.com +Subject: Hash function +Message-ID: <20021028123303.GA6832@biancaneve> + +Here is the hash function I'm using in GNU Smalltalk. The scrambling is +needed if you use powers of two as the table sizes. If you use primes it +is not needed. + +To use double-hashing with power-of-two size, you should use the +_gst_hash_string(str, len) as the primary hash and +scramble(_gst_hash_string (str, len)) | 1 as the secondary hash. + +Paolo + +*/ +/* + * ADR: Slightly modified to work w/in the context of gawk. + */ + +static unsigned long +gst_hash_string(const char *str, size_t len, unsigned long hsize) +{ + unsigned long hashVal = 1497032417; /* arbitrary value */ + unsigned long ret; + + while (len--) { + hashVal += *str++; + hashVal += (hashVal << 10); + hashVal ^= (hashVal >> 6); + } + + ret = scramble(hashVal); + if (ret >= hsize) + ret %= hsize; + + return ret; +} + +static unsigned long +scramble(unsigned long x) +{ + if (sizeof(long) == 4) { + int y = ~x; + + x += (y << 10) | (y >> 22); + x += (x << 6) | (x >> 26); + x -= (x << 16) | (x >> 16); + } else { + x ^= (~x) >> 31; + x += (x << 21) | (x >> 11); + x += (x << 5) | (x >> 27); + x += (x << 27) | (x >> 5); + x += (x << 31); + } + + return x; } diff -urN gawk-3.1.1/awk.h gawk-3.1.2/awk.h --- gawk-3.1.1/awk.h 2002-04-16 14:40:18.000000000 +0300 +++ gawk-3.1.2/awk.h 2003-03-03 14:30:23.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -59,9 +59,6 @@ #endif /* LOCALEDIR */ #endif -#ifdef HAVE_LOCALE_H -#include -#endif /* HAVE_LOCALE_H */ #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ #include #else @@ -130,7 +127,6 @@ #define P(s) () #define MALLOC_ARG_T unsigned #define volatile -#define const #endif /* not __STDC__ */ #ifndef VMS @@ -176,7 +172,7 @@ #include #endif /* atarist || VMS */ -#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(O_BINARY) /*duh*/ +#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(__CYGWIN__) && ! defined(O_BINARY) /*duh*/ #define O_BINARY 0 #endif @@ -206,7 +202,6 @@ /* use this as lintwarn("...") this is a hack but it gives us the right semantics */ #define lintwarn (*(set_loc(__FILE__, __LINE__),lintfunc)) -extern void set_prof_file P((const char *filename)); #ifdef VMS #include "vms/redirect.h" @@ -216,20 +211,19 @@ #include "unsupported/atari/redirect.h" #endif +#define RE_TRANSLATE_TYPE const char * #define GNU_REGEX #ifdef GNU_REGEX #include "regex.h" -#include "dfa.h" typedef struct Regexp { struct re_pattern_buffer pat; struct re_registers regs; - struct dfa dfareg; - int dfa; } Regexp; #define RESTART(rp,s) (rp)->regs.start[0] #define REEND(rp,s) (rp)->regs.end[0] #define SUBPATSTART(rp,s,n) (rp)->regs.start[n] #define SUBPATEND(rp,s,n) (rp)->regs.end[n] +#define NUMSUBPATS(rp,s) (rp)->regs.num_regs #endif /* GNU_REGEX */ /* Stuff for losing systems. */ @@ -238,6 +232,30 @@ #define strtod gawk_strtod #endif +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +# define __attribute__(x) +#endif + +#ifndef ATTRIBUTE_UNUSED +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#endif /* ATTRIBUTE_UNUSED */ + +#ifndef ATTRIBUTE_NORETURN +#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +#endif /* ATTRIBUTE_NORETURN */ + +#ifndef ATTRIBUTE_PRINTF +#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) +#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) +#endif /* ATTRIBUTE_PRINTF */ + +/* We use __extension__ in some places to suppress -pedantic warnings + about GCC extensions. This feature didn't work properly before + gcc 2.8. */ +#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +#define __extension__ +#endif + /* ------------------ Constants, Structures, Typedefs ------------------ */ #ifndef AWKNUM @@ -250,6 +268,9 @@ #define FALSE 0 #endif +#define LINT_INVALID 1 /* only warn about invalid */ +#define LINT_ALL 2 /* warn about all things */ + /* Figure out what '\a' really is. */ #ifdef __STDC__ #define BELL '\a' /* sure makes life easy, don't it? */ @@ -330,6 +351,7 @@ Node_K_break, /* no subs */ Node_K_continue, /* no subs */ Node_K_print, /* lnode is exp_list, rnode is redirect */ + Node_K_print_rec, /* lnode is NULL, rnode is redirect */ Node_K_printf, /* lnode is exp_list, rnode is redirect */ Node_K_next, /* no subs */ Node_K_exit, /* subnode is return value, or NULL */ @@ -354,7 +376,7 @@ Node_var_array, /* array is ptr to elements, asize num of eles */ Node_val, /* node is a value - type in flags */ - /* Builtins subnode is explist to work on, proc is func to call */ + /* Builtins subnode is explist to work on, builtin is func to call */ Node_builtin, /* @@ -379,6 +401,7 @@ Node_hashnode, /* an identifier in the symbol table */ Node_ahash, /* an array element */ Node_array_ref, /* array passed by ref as parameter */ + Node_BINMODE, /* variables recognized in the grammar */ Node_CONVFMT, Node_FIELDWIDTHS, @@ -410,7 +433,7 @@ } l; union { struct exp_node *rptr; - struct exp_node *(*pptr)(); + struct exp_node *(*pptr) P((struct exp_node *)); Regexp *preg; struct for_loop_header *hd; struct exp_node **av; @@ -423,7 +446,7 @@ } x; char *name; short number; - unsigned char reflags; + unsigned long reflags; # define CASE 1 # define CONST 2 # define FS_DFLT 4 @@ -442,19 +465,18 @@ char *name; size_t length; struct exp_node *value; + long ref; } hash; #define hnext sub.hash.next #define hname sub.hash.name #define hlength sub.hash.length #define hvalue sub.hash.value - struct { - struct exp_node *next; - struct exp_node *name; - struct exp_node *value; - } ahash; -#define ahnext sub.ahash.next -#define ahname sub.ahash.name -#define ahvalue sub.ahash.value + +#define ahnext sub.hash.next +#define ahname_str sub.hash.name +#define ahname_len sub.hash.length +#define ahvalue sub.hash.value +#define ahname_ref sub.hash.ref } sub; NODETYPE type; unsigned short flags; @@ -462,8 +484,8 @@ # define TEMP 2 /* should be free'd */ # define PERM 4 /* can't be free'd */ # define STRING 8 /* assigned as string */ -# define STR 16 /* string value is current */ -# define NUM 32 /* numeric value is current */ +# define STRCUR 16 /* string value is current */ +# define NUMCUR 32 /* numeric value is current */ # define NUMBER 64 /* assigned as number */ # define MAYBE_NUM 128 /* user input: if NUMERIC then * a NUMBER */ @@ -474,12 +496,11 @@ # define FIELD 2048 /* this is a field */ # define INTLSTR 4096 /* use localized version */ # define UNINITIALIZED 8192 /* value used before set */ - char *vname; -#ifndef NO_PROFILING - long exec_count; -#endif } NODE; +#define vname sub.nodep.name +#define exec_count sub.nodep.reflags + #define lnode sub.nodep.l.lptr #define nextp sub.nodep.l.lptr #define rnode sub.nodep.r.rptr @@ -490,16 +511,15 @@ #define parmlist sub.nodep.x.param_list #define subnode lnode -#define proc sub.nodep.r.pptr +#define builtin sub.nodep.r.pptr #define callresult sub.nodep.x.extra +#define funcbody sub.nodep.x.extra #define re_reg sub.nodep.r.preg #define re_flags sub.nodep.reflags #define re_text lnode #define re_exp sub.nodep.x.extra -#define re_cnt sub.nodep.number -#define forsub lnode #define forloop rnode->sub.nodep.r.hd #define stptr sub.val.sp @@ -528,24 +548,31 @@ NODE *incr; } FOR_LOOP_HEADER; -/* for faster input, bypass stdio */ typedef struct iobuf { - const char *name; - int fd; - char *buf; - char *off; - char *end; - size_t size; /* this will be determined by an fstat() call */ - int cnt; - long secsiz; + const char *name; /* filename */ + int fd; /* file descriptor */ + struct stat sbuf; /* stat buf */ + char *buf; /* start data buffer */ + char *off; /* start of current record in buffer */ + char *dataend; /* first byte in buffer to hold new data, + NULL if not read yet */ + char *end; /* end of buffer */ + size_t readsize; /* set from fstat call */ + size_t size; /* buffer size */ + ssize_t count; /* amount read last time */ + size_t total; /* total num chars read */ + size_t scanoff; /* where we were in the buffer when we had + to regrow/refill */ int flag; # define IOP_IS_TTY 1 # define IOP_IS_INTERNAL 2 # define IOP_NO_FREE 4 # define IOP_NOFREE_OBJ 8 +# define IOP_AT_EOF 16 +# define IOP_CLOSED 32 } IOBUF; -typedef void (*Func_ptr)(); +typedef void (*Func_ptr) P((void)); /* structure used to dynamically maintain a linked-list of open files/pipes */ struct redirect { @@ -559,8 +586,9 @@ # define RED_USED 64 /* closed temporarily to reuse fd */ # define RED_EOF 128 # define RED_TWOWAY 256 -# define RED_SOCKET 512 -# define RED_TCP 1024 +# define RED_PTY 512 +# define RED_SOCKET 1024 +# define RED_TCP 2048 char *value; FILE *fp; FILE *ifp; /* input fp, needed for PIPES_SIMULATED */ @@ -569,19 +597,23 @@ int status; struct redirect *prev; struct redirect *next; - char *mode; + const char *mode; }; -/* structure for our source, either a command line string or a source file */ +/* + * structure for our source, either a command line string or a source file. + * the same structure is used to remember variable pre-assignments. + */ struct src { - enum srctype { CMDLINE = 1, SOURCEFILE } stype; + enum srctype { CMDLINE = 1, SOURCEFILE, + PRE_ASSIGN, PRE_ASSIGN_FS } stype; char *val; }; /* for debugging purposes */ struct flagtab { int val; - char *name; + const char *name; }; /* longjmp return codes, must be nonzero */ @@ -640,8 +672,6 @@ extern int field0_valid; extern int do_traditional; extern int do_posix; -extern int do_lint; -extern int do_lint_old; extern int do_intervals; extern int do_intl; extern int do_non_decimal_data; @@ -650,6 +680,16 @@ extern int in_begin_rule; extern int in_end_rule; extern int whiny_users; +#ifdef NO_LINT +#define do_lint 0 +#define do_lint_old 0 +#else +extern int do_lint; +extern int do_lint_old; +#endif +#ifdef MBS_SUPPORT +extern int gawk_mb_cur_max; +#endif #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 extern GETGROUPS_T *groupset; @@ -662,7 +702,7 @@ extern char *defpath; extern char envsep; -extern char casetable[]; /* for case-independent regexp matching */ +extern const char casetable[]; /* for case-independent regexp matching */ /* ------------------------- Pseudo-functions ------------------------- */ @@ -685,6 +725,27 @@ #endif /* not PROFILING */ #endif /* not MPROF */ +#ifndef GAWKDEBUG +#define DUPNODE_MACRO 1 +/* + * Speed up the path leading to r_dupnode, as well as duplicating TEMP nodes, + * on expense of slowing down the access to PERM nodes (by two instructions). + * This is right since PERM nodes are realtively rare. + * + * The code also sets MALLOC flag for PERM nodes, which should not matter. + */ +#define DUPNODE_COMMON (_t->flags & (TEMP|PERM)) != 0 ? \ + (_t->flags &= ~TEMP, _t->flags |= MALLOC, _t) : \ + r_dupnode(_t) +#if __GNUC__ >= 2 +#define dupnode(n) ({NODE * _t = (n); DUPNODE_COMMON;}) +#else +#define dupnode(n) (_t = (n), DUPNODE_COMMON) +#endif +#else /* GAWKDEBUG */ +#define dupnode(n) r_dupnode(n) +#endif /* GAWKDEBUG */ + #ifdef MEMDEBUG #undef freenode #define get_lhs(p, a, r) r_get_lhs((p), (a), (r)) @@ -695,7 +756,7 @@ (&(p)->var_value): \ r_get_lhs((p), (a), (r))) #if __GNUC__ >= 2 -#define m_tree_eval(t, iscond) \ +#define m_tree_eval(t, iscond) __extension__ \ ({NODE * _t = (t); \ if (_t == NULL) \ _t = Nnull_string; \ @@ -731,11 +792,13 @@ #endif /* not MEMDEBUG */ #define tree_eval(t) m_tree_eval(t, FALSE) -#define make_number(x) mk_number((x), (unsigned int)(MALLOC|NUM|NUMBER)) -#define tmp_number(x) mk_number((x), (unsigned int)(MALLOC|TEMP|NUM|NUMBER)) +#define make_number(x) mk_number((x), (unsigned int)(MALLOC|NUMCUR|NUMBER)) +#define tmp_number(x) mk_number((x), (unsigned int)(MALLOC|TEMP|NUMCUR|NUMBER)) -#define free_temp(n) do { if ((n)->flags&TEMP) { unref(n); }} while (FALSE) -#define make_string(s, l) make_str_node((s), (size_t) (l), FALSE) +#define free_temp(n) do { NODE *_n = (n); if (_n->flags&TEMP) unref(_n);} \ + while (FALSE) + +#define make_string(s, l) make_str_node((s), (size_t) (l), 0) #define SCAN 1 #define ALREADY_MALLOCED 2 @@ -744,20 +807,20 @@ #ifdef HAVE_STRINGIZE #define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\ - (fatal(_("%s: %s: can't allocate %d bytes of memory (%s)"),\ - (str), #var, x, strerror(errno)),0)) + (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ + (str), #var, (long) (x), strerror(errno)),0)) #define erealloc(var,ty,x,str) (void)((var=(ty)realloc((char *)var,\ (MALLOC_ARG_T)(x))) ||\ - (fatal(_("%s: %s: can't allocate %d bytes of memory (%s)"),\ - (str), #var, x, strerror(errno)),0)) + (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ + (str), #var, (long) (x), strerror(errno)),0)) #else /* HAVE_STRINGIZE */ #define emalloc(var,ty,x,str) (void)((var=(ty)malloc((MALLOC_ARG_T)(x))) ||\ - (fatal(_("%s: %s: can't allocate %d bytes of memory (%s)"),\ - (str), "var", x, strerror(errno)),0)) + (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ + (str), "var", (long) (x), strerror(errno)),0)) #define erealloc(var,ty,x,str) (void)((var=(ty)realloc((char *)var,\ (MALLOC_ARG_T)(x))) ||\ - (fatal(_("%s: %s: can't allocate %d bytes of memory (%s)"),\ - (str), "var", x, strerror(errno)),0)) + (fatal(_("%s: %s: can't allocate %ld bytes of memory (%s)"),\ + (str), "var", (long) (x), strerror(errno)),0)) #endif /* HAVE_STRINGIZE */ #ifdef GAWKDEBUG @@ -768,26 +831,26 @@ extern AWKNUM force_number(); #endif #if __GNUC__ >= 2 -#define force_number(n) ({NODE *_tn = (n);\ - (_tn->flags & NUM) ?_tn->numbr : r_force_number(_tn);}) -#define force_string(s) ({NODE *_ts = (s);\ +#define force_number(n) __extension__ ({NODE *_tn = (n);\ + (_tn->flags & NUMCUR) ?_tn->numbr : r_force_number(_tn);}) +#define force_string(s) __extension__ ({NODE *_ts = (s);\ ((_ts->flags & INTLSTR) ? \ r_force_string(_ts) : \ - ((_ts->flags & STR) && \ + ((_ts->flags & STRCUR) && \ (_ts->stfmt == -1 || _ts->stfmt == CONVFMTidx)) ?\ _ts : r_force_string(_ts));}) #else #ifdef MSDOS extern double _msc51bug; #define force_number(n) (_msc51bug=(_t = (n),\ - (_t->flags & NUM) ? _t->numbr : r_force_number(_t))) + (_t->flags & NUMCUR) ? _t->numbr : r_force_number(_t))) #else /* not MSDOS */ #define force_number(n) (_t = (n),\ - (_t->flags & NUM) ? _t->numbr : r_force_number(_t)) + (_t->flags & NUMCUR) ? _t->numbr : r_force_number(_t)) #endif /* not MSDOS */ #define force_string(s) (_t = (s),(_t->flags & INTLSTR) ? \ r_force_string(_t) :\ - ((_t->flags & STR) && \ + ((_t->flags & STRCUR) && \ (_t->stfmt == -1 || \ _t->stfmt == CONVFMTidx))? \ _t : r_force_string(_t)) @@ -804,16 +867,18 @@ /* ------------- Function prototypes or defs (as appropriate) ------------- */ /* array.c */ +extern void array_init P((void)); extern NODE *concat_exp P((NODE *tree)); extern void assoc_clear P((NODE *symbol)); -extern unsigned int hash P((const char *s, size_t len, unsigned long hsize)); -extern int in_array P((NODE *symbol, NODE *subs)); +extern NODE *in_array P((NODE *symbol, NODE *subs)); extern NODE **assoc_lookup P((NODE *symbol, NODE *subs, int reference)); extern void do_delete P((NODE *symbol, NODE *tree)); extern void do_delete_loop P((NODE *symbol, NODE *tree)); extern NODE *assoc_dump P((NODE *symbol)); extern NODE *do_adump P((NODE *tree)); extern NODE *do_asort P((NODE *tree)); +extern NODE *do_asorti P((NODE *tree)); +extern unsigned long (*hash)P((const char *s, size_t len, unsigned long hsize)); /* awkgram.c */ extern char *tokexpand P((void)); extern NODE *node P((NODE *left, NODETYPE op, NODE *right)); @@ -824,9 +889,9 @@ extern void dump_funcs P((void)); extern void dump_vars P((const char *fname)); extern void release_all_vars P((void)); -extern const char *getfname P((NODE *(*)())); +extern const char *getfname P((NODE *(*)(NODE *))); extern NODE *stopme P((NODE *tree)); -extern void shadow_funcs(); +extern void shadow_funcs P((void)); /* builtin.c */ extern double double_to_int P((double d)); extern NODE *do_exp P((NODE *tree)); @@ -845,6 +910,7 @@ extern NODE *do_systime P((NODE *tree)); extern NODE *do_system P((NODE *tree)); extern void do_print P((NODE *tree)); +extern void do_print_rec P((NODE *tree)); extern NODE *do_tolower P((NODE *tree)); extern NODE *do_toupper P((NODE *tree)); extern NODE *do_atan2 P((NODE *tree)); @@ -856,7 +922,7 @@ extern NODE *do_gsub P((NODE *tree)); extern NODE *do_sub P((NODE *tree)); extern NODE *do_gensub P((NODE *tree)); -extern NODE *format_tree P((const char *, int, NODE *, int)); +extern NODE *format_tree P((const char *, size_t, NODE *, long)); extern NODE *do_lshift P((NODE *tree)); extern NODE *do_rshift P((NODE *tree)); extern NODE *do_and P((NODE *tree)); @@ -886,9 +952,10 @@ extern void set_LINT P((void)); extern void set_TEXTDOMAIN P((void)); extern void update_ERRNO P((void)); -extern char *flags2str P((int)); -extern char *genflags2str P((int flagval, struct flagtab *tab)); -extern char *nodetype2str P((NODETYPE type)); +extern const char *redflags2str P((int)); +extern const char *flags2str P((int)); +extern const char *genflags2str P((int flagval, const struct flagtab *tab)); +extern const char *nodetype2str P((NODETYPE type)); extern NODE *assign_val P((NODE **lhs_p, NODE *rhs)); #ifdef PROFILING extern void dump_fcall_stack P((FILE *fp)); @@ -902,13 +969,12 @@ #endif /* field.c */ extern void init_fields P((void)); -extern void set_record P((char *buf, int cnt, int freeold)); +extern void set_record P((const char *buf, int cnt)); extern void reset_record P((void)); extern void set_NF P((void)); extern NODE **get_field P((long num, Func_ptr *assign)); extern NODE *do_split P((NODE *tree)); extern void set_FS P((void)); -extern void set_FS_if_not_FIELDWIDTHS P((void)); extern void set_RS P((void)); extern void set_FIELDWIDTHS P((void)); extern int using_fieldwidths P((void)); @@ -922,7 +988,7 @@ extern int os_is_setuid P((void)); extern int os_setbinmode P((int fd, int mode)); extern void os_restore_mode P((int fd)); -extern int optimal_bufsize P((int fd, struct stat *sbuf)); +extern size_t optimal_bufsize P((int fd, struct stat *sbuf)); extern int ispath P((const char *file)); extern int isdirpunct P((int c)); /* io.c */ @@ -936,31 +1002,34 @@ extern int devopen P((const char *name, const char *mode)); extern int pathopen P((const char *file)); extern NODE *do_getline P((NODE *tree)); -extern void do_nextfile P((void)); -extern struct redirect *getredirect P((char *str, int len)); +extern void do_nextfile P((void)) ATTRIBUTE_NORETURN; +extern struct redirect *getredirect P((const char *str, int len)); /* main.c */ extern int main P((int argc, char **argv)); -extern void load_environ P((void)); -extern void load_procinfo P((void)); -extern char *arg_assign P((char *arg)); -extern RETSIGTYPE catchsig P((int sig, int code)); +extern NODE *load_environ P((void)); +extern NODE *load_procinfo P((void)); +extern int arg_assign P((char *arg, int initing)); /* msg.c */ -extern void err P((const char *s, const char *emsg, va_list argp)); +extern void err P((const char *s, const char *emsg, va_list argp)) ATTRIBUTE_PRINTF(2, 0); #if _MSC_VER == 510 extern void msg P((va_list va_alist, ...)); extern void error P((va_list va_alist, ...)); extern void warning P((va_list va_alist, ...)); -extern void set_loc P((char *file, int line)); +extern void set_loc P((const char *file, int line)); extern void r_fatal P((va_list va_alist, ...)); extern void (*lintfunc) P((va_list va_alist, ...)); #else #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ -extern void msg (char *mesg, ...); -extern void error (char *mesg, ...); -extern void warning (char *mesg, ...); -extern void set_loc (char *file, int line); -extern void r_fatal (char *mesg, ...); -extern void (*lintfunc) (char *mesg, ...); +extern void msg (const char *mesg, ...) ATTRIBUTE_PRINTF_1; +extern void error (const char *mesg, ...) ATTRIBUTE_PRINTF_1; +extern void warning (const char *mesg, ...) ATTRIBUTE_PRINTF_1; +extern void set_loc (const char *file, int line); +extern void r_fatal (const char *mesg, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) +extern void (*lintfunc) (const char *mesg, ...) ATTRIBUTE_PRINTF_1; +#else +extern void (*lintfunc) (const char *mesg, ...); +#endif #else extern void msg (); extern void error (); @@ -975,35 +1044,35 @@ extern void init_profiling_signals P((void)); extern void set_prof_file P((const char *filename)); extern void dump_prog P((NODE *begin, NODE *prog, NODE *end)); -extern void pp_func P((char *name, size_t namelen, NODE *f)); -extern void pp_string_fp P((FILE *fp, char *str, size_t namelen, +extern void pp_func P((const char *name, size_t namelen, NODE *f)); +extern void pp_string_fp P((FILE *fp, const char *str, size_t namelen, int delim, int breaklines)); /* node.c */ extern AWKNUM r_force_number P((NODE *n)); -extern NODE *format_val P((char *format, int index, NODE *s)); +extern NODE *format_val P((const char *format, int index, NODE *s)); extern NODE *r_force_string P((NODE *s)); -extern NODE *dupnode P((NODE *n)); +extern NODE *r_dupnode P((NODE *n)); extern NODE *copynode P((NODE *n)); extern NODE *mk_number P((AWKNUM x, unsigned int flags)); -extern NODE *make_str_node P((char *s, size_t len, int scan )); +extern NODE *make_str_node P((char *s, unsigned long len, int scan )); extern NODE *tmp_string P((char *s, size_t len )); extern NODE *more_nodes P((void)); #ifdef MEMDEBUG extern void freenode P((NODE *it)); #endif extern void unref P((NODE *tmp)); -extern int parse_escape P((char **string_ptr)); +extern int parse_escape P((const char **string_ptr)); /* re.c */ -extern Regexp *make_regexp P((char *s, size_t len, int ignorecase, int dfa)); -extern int research P((Regexp *rp, char *str, int start, +extern Regexp *make_regexp P((const char *s, size_t len, int ignorecase)); +extern int research P((Regexp *rp, const char *str, int start, size_t len, int need_start)); extern void refree P((Regexp *rp)); extern void reg_error P((const char *s)); extern Regexp *re_update P((NODE *t)); extern void resyntax P((int syntax)); extern void resetup P((void)); -extern int avoid_dfa P((NODE *re, char *str, size_t len)); /* temporary */ -extern int reisstring P((char *text, size_t len, Regexp *re, char *buf)); +extern int reisstring P((const char *text, size_t len, Regexp *re, const char *buf)); +extern int remaybelong P((const char *text, size_t len)); /* strncasecmp.c */ #ifndef BROKEN_STRNCASECMP @@ -1025,6 +1094,13 @@ #define INVALID_HANDLE (-1) #endif /* atarist */ +#ifdef HAVE_SYS_WAIT_H +#include +#endif +#ifndef WEXITSTATUS +#define WEXITSTATUS(stat_val) ((((unsigned) (stat_val)) >> 8) & 0xFF) +#endif + #ifndef STATIC #define STATIC static #endif diff -urN gawk-3.1.1/awkgram.y gawk-3.1.2/awkgram.y --- gawk-3.1.1/awkgram.y 2002-04-16 14:40:13.000000000 +0300 +++ gawk-3.1.2/awkgram.y 2003-03-19 14:06:57.000000000 +0200 @@ -1,9 +1,9 @@ /* - * awk.y --- yacc/bison parser + * awkgram.y --- yacc/bison parser */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -34,7 +34,7 @@ #define DONT_FREE FALSE #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ -static void yyerror(const char *m, ...) ; +static void yyerror(const char *m, ...) ATTRIBUTE_PRINTF_1; #else static void yyerror(); /* va_alist */ #endif @@ -42,9 +42,9 @@ static int yylex P((void)); static NODE *node_common P((NODETYPE op)); static NODE *snode P((NODE *subn, NODETYPE op, int sindex)); -static NODE *mkrangenode P((NODE *cpair)); static NODE *make_for_loop P((NODE *init, NODE *cond, NODE *incr)); static NODE *append_right P((NODE *list, NODE *new)); +static inline NODE *append_pattern P((NODE **list, NODE *patt)); static void func_install P((NODE *params, NODE *def)); static void pop_var P((NODE *np, int freeit)); static void pop_params P((NODE *params)); @@ -52,22 +52,23 @@ static NODE *mk_rexp P((NODE *exp)); static int dup_parms P((NODE *func)); static void param_sanity P((NODE *arglist)); -static void parms_shadow P((const char *fname, NODE *func)); +static int parms_shadow P((const char *fname, NODE *func)); static int isnoeffect P((NODETYPE t)); static int isassignable P((NODE *n)); -static void dumpintlstr P((char *str, size_t len)); -static void dumpintlstr2 P((char *str1, size_t len1, char *str2, size_t len2)); +static void dumpintlstr P((const char *str, size_t len)); +static void dumpintlstr2 P((const char *str1, size_t len1, const char *str2, size_t len2)); static void count_args P((NODE *n)); enum defref { FUNC_DEFINE, FUNC_USE }; -static void func_use P((char *name, enum defref how)); +static void func_use P((const char *name, enum defref how)); static void check_funcs P((void)); -static int want_assign; /* lexical scanning kludge */ static int want_regexp; /* lexical scanning kludge */ -static int can_return; /* lexical scanning kludge */ -static int io_allowed = TRUE; /* lexical scanning kludge */ +static int can_return; /* parsing kludge */ +static int begin_or_end_rule = FALSE; /* parsing kludge */ static int parsing_end_rule = FALSE; /* for warnings */ +static int in_print = FALSE; /* lexical scanning kludge for print */ +static int in_parens = 0; /* lexical scanning kludge for print */ static char *lexptr; /* pointer to next char during parsing */ static char *lexend; static char *lexptr_begin; /* keep track of where we were for error msgs */ @@ -92,6 +93,17 @@ extern int errcount; extern NODE *begin_block; extern NODE *end_block; + +/* + * This string cannot occur as a real awk identifier. + * Use it as a special token to make function parsing + * uniform, but if it's seen, don't install the function. + * e.g. + * function split(x) { return x } + * function x(a) { return a } + * should only produce one error message, and not core dump. + */ +static char builtin_func[] = "@builtin"; %} %union { @@ -100,29 +112,27 @@ NODE *nodeval; NODETYPE nodetypeval; char *sval; - NODE *(*ptrval)(); + NODE *(*ptrval) P((void)); } -%type function_prologue function_body -%type rexp exp start program rule simp_exp -%type non_post_simp_exp -%type pattern -%type action variable param_list -%type rexpression_list opt_rexpression_list -%type expression_list opt_expression_list -%type statements statement if_statement opt_param_list -%type simple_stmt opt_simple_stmt +%type function_prologue pattern action variable param_list +%type exp common_exp +%type simp_exp non_post_simp_exp +%type expression_list opt_expression_list print_expression_list +%type statements statement if_statement opt_param_list +%type simple_stmt opt_simple_stmt %type opt_exp opt_variable regexp %type input_redir output_redir %type print +%type assign_operator a_relop relop_or_less %type func_name %type lex_builtin %token FUNC_CALL NAME REGEXP %token ERROR %token YNUMBER YSTRING -%token RELOP APPEND_OP -%token ASSIGNOP MATCHOP NEWLINE CONCAT_OP +%token RELOP IO_OUT IO_IN +%token ASSIGNOP ASSIGN MATCHOP CONCAT_OP %token LEX_BEGIN LEX_END LEX_IF LEX_ELSE LEX_RETURN LEX_DELETE %token LEX_WHILE LEX_DO LEX_FOR LEX_BREAK LEX_CONTINUE %token LEX_PRINT LEX_PRINTF LEX_NEXT LEX_EXIT LEX_FUNCTION @@ -130,11 +140,12 @@ %token LEX_IN %token LEX_AND LEX_OR INCREMENT DECREMENT %token LEX_BUILTIN LEX_LENGTH +%token NEWLINE /* these are just yylval numbers */ /* Lowest to highest */ -%right ASSIGNOP +%right ASSIGNOP ASSIGN SLASH_BEFORE_EQUAL %right '?' ':' %left LEX_OR %left LEX_AND @@ -143,7 +154,7 @@ %left FUNC_CALL LEX_BUILTIN LEX_LENGTH %nonassoc ',' %nonassoc MATCHOP -%nonassoc RELOP '<' '>' '|' APPEND_OP TWOWAYIO +%nonassoc RELOP '<' '>' IO_IN IO_OUT %left CONCAT_OP %left YSTRING YNUMBER %left '+' '-' @@ -158,110 +169,92 @@ start : opt_nls program opt_nls { - expression_value = $2; check_funcs(); } ; program - : rule - { - if ($1 != NULL) - $$ = $1; - else - $$ = NULL; - yyerrok; - } + : /* empty */ | program rule - /* add the rule to the tail of list */ - { - if ($2 == NULL) - $$ = $1; - else if ($1 == NULL) - $$ = $2; - else { - if ($1->type != Node_rule_list) - $1 = node($1, Node_rule_list, - (NODE*) NULL); - $$ = append_right($1, - node($2, Node_rule_list, (NODE *) NULL)); - } - yyerrok; - } - | error { $$ = NULL; } - | program error { $$ = NULL; } - | /* empty */ { $$ = NULL; } + { + begin_or_end_rule = parsing_end_rule = FALSE; + yyerrok; + } + | program error + { + begin_or_end_rule = parsing_end_rule = FALSE; + yyerrok; + /* + * If errors, give up, don't produce an infinite + * stream of syntax error message. + */ + return; + } ; rule - : LEX_BEGIN { io_allowed = FALSE; } - action + : pattern action { - if (begin_block != NULL) { - if (begin_block->type != Node_rule_list) - begin_block = node(begin_block, Node_rule_list, - (NODE *) NULL); - (void) append_right(begin_block, node( - node((NODE *) NULL, Node_rule_node, $3), - Node_rule_list, (NODE *) NULL) ); - } else - begin_block = node((NODE *) NULL, Node_rule_node, $3); - $$ = NULL; - io_allowed = TRUE; - yyerrok; + $1->rnode = $2; } - | LEX_END { io_allowed = FALSE; parsing_end_rule = TRUE; } - action + | pattern statement_term { - if (end_block != NULL) { - if (end_block->type != Node_rule_list) - end_block = node(end_block, Node_rule_list, - (NODE *) NULL); - (void) append_right (end_block, node( - node((NODE *) NULL, Node_rule_node, $3), - Node_rule_list, (NODE *) NULL)); - } else - end_block = node((NODE *) NULL, Node_rule_node, $3); - $$ = NULL; - io_allowed = TRUE; - parsing_end_rule = FALSE; - yyerrok; + if ($1->lnode != NULL) { + /* pattern rule with non-empty pattern */ + $1->rnode = node(NULL, Node_K_print_rec, NULL); + } else { + /* an error */ + if (begin_or_end_rule) + warning(_("%s blocks must have an action part"), + (parsing_end_rule ? "END" : "BEGIN")); + else + warning(_("each rule must have a pattern or an action part")); + errcount++; + } } - | LEX_BEGIN statement_term + | function_prologue action { - warning(_("BEGIN blocks must have an action part")); - errcount++; + can_return = FALSE; + if ($1) + func_install($1, $2); yyerrok; } - | LEX_END statement_term + ; + +pattern + : /* empty */ { - warning(_("END blocks must have an action part")); - errcount++; - yyerrok; + $$ = append_pattern(&expression_value, (NODE *) NULL); } - | pattern action - { $$ = node($1, Node_rule_node, $2); yyerrok; } - | action - { $$ = node((NODE *) NULL, Node_rule_node, $1); yyerrok; } - | pattern statement_term - { - $$ = node($1, - Node_rule_node, - node(node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL), - Node_K_print, - (NODE *) NULL)); - yyerrok; - } - | function_prologue function_body - { - func_install($1, $2); - $$ = NULL; - yyerrok; - } + | exp + { + $$ = append_pattern(&expression_value, $1); + } + | exp ',' exp + { + NODE *r; + + getnode(r); + r->type = Node_line_range; + r->condpair = node($1, Node_cond_pair, $3); + r->triggered = FALSE; + $$ = append_pattern(&expression_value, r); + } + | LEX_BEGIN + { + begin_or_end_rule = TRUE; + $$ = append_pattern(&begin_block, (NODE *) NULL); + } + | LEX_END + { + begin_or_end_rule = parsing_end_rule = TRUE; + $$ = append_pattern(&end_block, (NODE *) NULL); + } + ; + +action + : l_brace statements r_brace opt_semi opt_nls + { $$ = $2; } ; func_name @@ -274,6 +267,7 @@ yyerror(_("`%s' is a built-in function, it cannot be redefined"), tokstart); errcount++; + $$ = builtin_func; /* yyerrok; */ } ; @@ -302,77 +296,61 @@ } ; -function_body - : l_brace statements r_brace opt_semi opt_nls - { - $$ = $2; - can_return = FALSE; - } - | l_brace r_brace opt_semi opt_nls - { - $$ = node((NODE *) NULL, Node_K_return, (NODE *) NULL); - can_return = FALSE; - } - ; - - -pattern - : exp - { $$ = $1; } - | exp ',' exp - { $$ = mkrangenode(node($1, Node_cond_pair, $3)); } - ; - regexp /* * In this rule, want_regexp tells yylex that the next thing * is a regexp so it should read up to the closing slash. */ - : '/' + : a_slash { ++want_regexp; } - REGEXP '/' + REGEXP /* The terminating '/' is consumed by yylex(). */ { NODE *n; - size_t len; + size_t len = strlen($3); + if (do_lint && ($3)[0] == '*') { + /* possible C comment */ + if (($3)[len-1] == '*') + lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart); + } getnode(n); n->type = Node_regex; - len = strlen($3); n->re_exp = make_string($3, len); - n->re_reg = make_regexp($3, len, FALSE, TRUE); + n->re_reg = make_regexp($3, len, FALSE); n->re_text = NULL; n->re_flags = CONST; - n->re_cnt = 1; $$ = n; } ; -action - : l_brace statements r_brace opt_semi opt_nls - { $$ = $2; } - | l_brace r_brace opt_semi opt_nls - { $$ = NULL; } +a_slash + : '/' + | SLASH_BEFORE_EQUAL ; statements - : statement - { + : /* empty */ + { $$ = NULL; } + | statements statement + { + if ($2 == NULL) $$ = $1; - if (do_lint && isnoeffect($$->type)) + else { + if (do_lint && isnoeffect($2->type)) lintwarn(_("statement may have no effect")); + if ($1 == NULL) + $$ = $2; + else + $$ = append_right( + ($1->type == Node_statement_list ? $1 + : node($1, Node_statement_list, (NODE *) NULL)), + ($2->type == Node_statement_list ? $2 + : node($2, Node_statement_list, (NODE *) NULL))); } - | statements statement - { - if ($1 == NULL || $1->type != Node_statement_list) - $1 = node($1, Node_statement_list, (NODE *) NULL); - $$ = append_right($1, - node($2, Node_statement_list, (NODE *) NULL)); - yyerrok; - } - | error - { $$ = NULL; } + yyerrok; + } | statements error - { $$ = NULL; } + { $$ = NULL; } ; statement_term @@ -383,8 +361,6 @@ statement : semi opt_nls { $$ = NULL; } - | l_brace r_brace - { $$ = NULL; } | l_brace statements r_brace { $$ = $2; } | if_statement @@ -451,15 +427,14 @@ | LEX_NEXT statement_term { NODETYPE type; - if (! io_allowed) - yyerror(_("`next' used in BEGIN or END action")); + if (begin_or_end_rule) + yyerror(_("`%s' used in %s action"), "next", + (parsing_end_rule ? "END" : "BEGIN")); type = Node_K_next; $$ = node((NODE *) NULL, type, (NODE *) NULL); } | LEX_NEXTFILE statement_term { - if (do_lint) - lintwarn(_("`nextfile' is a gawk extension")); if (do_traditional) { /* * can't use yyerror, since may have overshot @@ -468,10 +443,13 @@ errcount++; error(_("`nextfile' is a gawk extension")); } - if (! io_allowed) { + if (do_lint) + lintwarn(_("`nextfile' is a gawk extension")); + if (begin_or_end_rule) { /* same thing */ errcount++; - error(_("`nextfile' used in BEGIN or END action")); + error(_("`%s' used in %s action"), "nextfile", + (parsing_end_rule ? "END" : "BEGIN")); } $$ = node((NODE *) NULL, Node_K_nextfile, (NODE *) NULL); } @@ -496,34 +474,37 @@ * We don't bother to document it though. So there. */ simple_stmt - : print '(' expression_list r_paren output_redir - { - $$ = node($3, $1, $5); - if ($$->type == Node_K_printf) - count_args($$); - } - | print opt_rexpression_list output_redir - { - if ($1 == Node_K_print && $2 == NULL) { - static int warned = FALSE; + : print { in_print = TRUE; in_parens = 0; } print_expression_list output_redir + { + /* + * Optimization: plain `print' has no expression list, so $3 is null. + * If $3 is an expression list with one element (rnode == null) + * and lnode is a field spec for field 0, we have `print $0'. + * For both, use Node_K_print_rec, which is faster for these two cases. + */ + if ($1 == Node_K_print && + ($3 == NULL + || ($3->type == Node_expression_list + && $3->rnode == NULL + && $3->lnode->type == Node_field_spec + && $3->lnode->lnode->type == Node_val + && $3->lnode->lnode->numbr == 0.0)) + ) { + static int warned = FALSE; - $2 = node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_expression_list, - (NODE *) NULL); + $$ = node(NULL, Node_K_print_rec, $4); - if (do_lint && ! io_allowed && ! warned) { - warned = TRUE; - lintwarn( + if (do_lint && $3 == NULL && begin_or_end_rule && ! warned) { + warned = TRUE; + lintwarn( _("plain `print' in BEGIN or END rule should probably be `print \"\"'")); - } } - - $$ = node($2, $1, $3); + } else { + $$ = node($3, $1, $4); if ($$->type == Node_K_printf) count_args($$); } + } | LEX_DELETE NAME '[' expression_list ']' { $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, $4); } | LEX_DELETE NAME @@ -540,6 +521,21 @@ } $$ = node(variable($2, CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL); } + | LEX_DELETE '(' NAME ')' + { + /* this is for tawk compatibility. maybe the warnings should always be done. */ + if (do_lint) + lintwarn(_("`delete(array)' is a non-portable tawk extension")); + if (do_traditional) { + /* + * can't use yyerror, since may have overshot + * the source line + */ + errcount++; + error(_("`delete(array)' is a non-portable tawk extension")); + } + $$ = node(variable($3, CAN_FREE, Node_var_array), Node_K_delete, (NODE *) NULL); + } | exp { $$ = $1; } ; @@ -553,9 +549,34 @@ print : LEX_PRINT - { $$ = $1; } | LEX_PRINTF - { $$ = $1; } + ; + + /* + * Note: ``print(x)'' is already parsed by the first rule, + * so there is no good in covering it by the second one too. + */ +print_expression_list + : opt_expression_list + | '(' exp comma expression_list r_paren + { $$ = node($2, Node_expression_list, $4); } + ; + +output_redir + : /* empty */ + { + in_print = FALSE; + in_parens = 0; + $$ = NULL; + } + | IO_OUT { in_print = FALSE; in_parens = 0; } common_exp + { + $$ = node($3, $1, (NODE *) NULL); + if ($1 == Node_redirect_twoway + && $3->type == Node_K_getline + && $3->rnode->type == Node_redirect_twoway) + yyerror(_("multistage two-way pipelines don't work")); + } ; if_statement @@ -572,7 +593,6 @@ nls : NEWLINE - { want_assign = FALSE; } | nls NEWLINE ; @@ -588,24 +608,6 @@ { $$ = node($2, Node_redirect_input, (NODE *) NULL); } ; -output_redir - : /* empty */ - { $$ = NULL; } - | '>' exp - { $$ = node($2, Node_redirect_output, (NODE *) NULL); } - | APPEND_OP exp - { $$ = node($2, Node_redirect_append, (NODE *) NULL); } - | '|' exp - { $$ = node($2, Node_redirect_pipe, (NODE *) NULL); } - | TWOWAYIO exp - { - if ($2->type == Node_K_getline - && $2->rnode->type == Node_redirect_twoway) - yyerror(_("multistage two-way pipelines don't work")); - $$ = node($2, Node_redirect_twoway, (NODE *) NULL); - } - ; - opt_param_list : /* empty */ { $$ = NULL; } @@ -634,32 +636,6 @@ { $$ = $1; } ; -opt_rexpression_list - : /* empty */ - { $$ = NULL; } - | rexpression_list - { $$ = $1; } - ; - -rexpression_list - : rexp - { $$ = node($1, Node_expression_list, (NODE *) NULL); } - | rexpression_list comma rexp - { - $$ = append_right($1, - node($3, Node_expression_list, (NODE *) NULL)); - yyerrok; - } - | error - { $$ = NULL; } - | rexpression_list error - { $$ = NULL; } - | rexpression_list error rexp - { $$ = NULL; } - | rexpression_list comma error - { $$ = NULL; } - ; - opt_expression_list : /* empty */ { $$ = NULL; } @@ -687,31 +663,11 @@ ; /* Expressions, not including the comma operator. */ -exp : variable ASSIGNOP - { want_assign = FALSE; } - exp +exp : variable assign_operator exp %prec ASSIGNOP { - if (do_lint && $4->type == Node_regex) + if (do_lint && $3->type == Node_regex) lintwarn(_("regular expression on right of assignment")); - $$ = node($1, $2, $4); - } - | '(' expression_list r_paren LEX_IN NAME - { $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2); } - | exp '|' LEX_GETLINE opt_variable - { - $$ = node($4, Node_K_getline, - node($1, Node_redirect_pipein, (NODE *) NULL)); - } - | exp TWOWAYIO LEX_GETLINE opt_variable - { - $$ = node($4, Node_K_getline, - node($1, Node_redirect_twoway, (NODE *) NULL)); - } - | LEX_GETLINE opt_variable input_redir - { - if (do_lint && ! io_allowed && parsing_end_rule && $3 == NULL) - lintwarn(_("non-redirected `getline' undefined inside END action")); - $$ = node($2, Node_K_getline, $3); + $$ = node($1, $2, $3); } | exp LEX_AND exp { $$ = node($1, Node_and, $3); } @@ -723,74 +679,57 @@ warning(_("regular expression on left of `~' or `!~' operator")); $$ = node($1, $2, mk_rexp($3)); } - | regexp - { - $$ = $1; - if (do_lint && tokstart[0] == '*') { - /* possible C comment */ - int n = strlen(tokstart) - 1; - if (tokstart[n] == '*') - lintwarn(_("regexp constant `/%s/' looks like a C comment, but is not"), tokstart); - } - } - | '!' regexp %prec UNARY - { - $$ = node(node(make_number(0.0), - Node_field_spec, - (NODE *) NULL), - Node_nomatch, - $2); - } | exp LEX_IN NAME { $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1); } - | exp RELOP exp + | exp a_relop exp %prec RELOP { if (do_lint && $3->type == Node_regex) lintwarn(_("regular expression on right of comparison")); $$ = node($1, $2, $3); } - | exp '<' exp - { $$ = node($1, Node_less, $3); } - | exp '>' exp - { $$ = node($1, Node_greater, $3); } | exp '?' exp ':' exp { $$ = node($1, Node_cond_exp, node($3, Node_if_branches, $5));} - | simp_exp + | common_exp { $$ = $1; } - | exp simp_exp %prec CONCAT_OP - { $$ = node($1, Node_concat, $2); } ; -rexp - : variable ASSIGNOP - { want_assign = FALSE; } - rexp - { $$ = node($1, $2, $4); } - | rexp LEX_AND rexp - { $$ = node($1, Node_and, $3); } - | rexp LEX_OR rexp - { $$ = node($1, Node_or, $3); } - | LEX_GETLINE opt_variable input_redir +assign_operator + : ASSIGN + { $$ = $1; } + | ASSIGNOP + { $$ = $1; } + | SLASH_BEFORE_EQUAL ASSIGN /* `/=' */ + { $$ = Node_assign_quotient; } + ; + +relop_or_less + : RELOP + { $$ = $1; } + | '<' + { $$ = Node_less; } + ; +a_relop + : relop_or_less + | '>' + { $$ = Node_greater; } + ; + +common_exp + : regexp + { $$ = $1; } + | '!' regexp %prec UNARY { - if (do_lint && ! io_allowed && $3 == NULL) - lintwarn(_("non-redirected `getline' undefined inside BEGIN or END action")); - $$ = node($2, Node_K_getline, $3); + $$ = node(node(make_number(0.0), + Node_field_spec, + (NODE *) NULL), + Node_nomatch, + $2); } - | regexp - { $$ = $1; } - | '!' regexp %prec UNARY - { $$ = node((NODE *) NULL, Node_nomatch, $2); } - | rexp MATCHOP rexp - { $$ = node($1, $2, mk_rexp($3)); } - | rexp LEX_IN NAME - { $$ = node(variable($3, CAN_FREE, Node_var_array), Node_in_array, $1); } - | rexp RELOP rexp - { $$ = node($1, $2, $3); } - | rexp '?' rexp ':' rexp - { $$ = node($1, Node_cond_exp, node($3, Node_if_branches, $5));} + | '(' expression_list r_paren LEX_IN NAME + { $$ = node(variable($5, CAN_FREE, Node_var_array), Node_in_array, $2); } | simp_exp { $$ = $1; } - | rexp simp_exp %prec CONCAT_OP + | common_exp simp_exp %prec CONCAT_OP { $$ = node($1, Node_concat, $2); } ; @@ -809,6 +748,17 @@ { $$ = node($1, Node_plus, $3); } | simp_exp '-' simp_exp { $$ = node($1, Node_minus, $3); } + | LEX_GETLINE opt_variable input_redir + { + if (do_lint && parsing_end_rule && $3 == NULL) + lintwarn(_("non-redirected `getline' undefined inside END action")); + $$ = node($2, Node_K_getline, $3); + } + | simp_exp IO_IN LEX_GETLINE opt_variable + { + $$ = node($4, Node_K_getline, + node($1, $2, (NODE *) NULL)); + } | variable INCREMENT { $$ = node($1, Node_postincrement, (NODE *) NULL); } | variable DECREMENT @@ -836,6 +786,7 @@ | FUNC_CALL '(' opt_expression_list r_paren { $$ = node($3, Node_func_call, make_string($1, strlen($1))); + $$->funcbody = NULL; func_use($1, FUNC_USE); param_sanity($3); free($1); @@ -852,7 +803,7 @@ | '-' simp_exp %prec UNARY { - if ($2->type == Node_val && ($2->flags & (STR|STRING)) == 0) { + if ($2->type == Node_val && ($2->flags & (STRCUR|STRING)) == 0) { $2->numbr = -(force_number($2)); $$ = $2; } else @@ -910,7 +861,7 @@ ; semi - : ';' { yyerrok; want_assign = FALSE; } + : ';' { yyerrok; } ; comma : ',' opt_nls { yyerrok; } @@ -930,13 +881,13 @@ # define NOT_POSIX 0x0200 /* feature not in POSIX */ # define GAWKX 0x0400 /* gawk extension */ # define RESX 0x0800 /* Bell Labs Research extension */ - NODE *(*ptr)(); /* function that implements this keyword */ + NODE *(*ptr) P((NODE *)); /* function that implements this keyword */ }; /* Tokentab is sorted ascii ascending order, so it can be binary searched. */ /* Function pointers come from declarations in awk.h. */ -static struct token tokentab[] = { +static const struct token tokentab[] = { {"BEGIN", Node_illegal, LEX_BEGIN, 0, 0}, {"END", Node_illegal, LEX_END, 0, 0}, #ifdef ARRAYDEBUG @@ -944,6 +895,7 @@ #endif {"and", Node_builtin, LEX_BUILTIN, GAWKX|A(2), do_and}, {"asort", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asort}, +{"asorti", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_asorti}, {"atan2", Node_builtin, LEX_BUILTIN, NOT_OLD|A(2), do_atan2}, {"bindtextdomain", Node_builtin, LEX_BUILTIN, GAWKX|A(1)|A(2), do_bindtextdomain}, {"break", Node_K_break, LEX_BREAK, 0, 0}, @@ -1020,7 +972,7 @@ /* getfname --- return name of a builtin function (for pretty printing) */ const char * -getfname(register NODE *(*fptr)()) +getfname(register NODE *(*fptr)(NODE *)) { register int i, j; @@ -1030,8 +982,7 @@ if (tokentab[i].ptr == fptr) return tokentab[i].operator; - fatal(_("fptr %x not in tokentab\n"), fptr); - return NULL; /* to stop warnings */ + return NULL; } /* yyerror --- print a syntax error message, show where */ @@ -1057,6 +1008,7 @@ char *buf; int count; static char end_of_file_line[] = "(END OF FILE)"; + char save; errcount++; /* Find the current line in the input file */ @@ -1065,7 +1017,7 @@ cp = lexeme; if (*cp == '\n') { cp--; - mesg = _("unexpected newline"); + mesg = _("unexpected newline or end of string"); } for (; cp != lexptr_begin && *cp != '\n'; --cp) continue; @@ -1081,8 +1033,19 @@ thisline = end_of_file_line; bp = thisline + strlen(thisline); } + + /* + * Saving and restoring *bp keeps valgrind happy, + * since the guts of glibc uses strlen, even though + * we're passing an explict precision. Sigh. + */ + save = *bp; + *bp = '\0'; + msg("%.*s", (int) (bp - thisline), thisline); + *bp = save; + #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ va_start(args, m); if (mesg == NULL) @@ -1124,7 +1087,7 @@ static int fd; int n; register char *scan; - static int len = 0; + static size_t len = 0; static int did_newline = FALSE; int newfile; struct stat sbuf; @@ -1294,9 +1257,9 @@ #ifdef MBS_SUPPORT static int -nextc() +nextc(void) { - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { /* Update the buffer index. */ cur_ring_idx = (cur_ring_idx == RING_BUFFER_SIZE - 1)? 0 : cur_ring_idx + 1; @@ -1362,7 +1325,7 @@ #if GAWKDEBUG int -nextc() +nextc(void) { int c; @@ -1389,9 +1352,9 @@ #ifdef MBS_SUPPORT static void -pushback() +pushback(void) { - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { cur_ring_idx = (cur_ring_idx == 0)? RING_BUFFER_SIZE - 1 : cur_ring_idx - 1; (lexptr && lexptr > lexptr_begin ? lexptr-- : lexptr); @@ -1408,7 +1371,7 @@ /* allow_newline --- allow newline after &&, ||, ? and : */ static void -allow_newline() +allow_newline(void) { int c; @@ -1434,7 +1397,7 @@ /* yylex --- Read the input and turn it into tokens. */ static int -yylex() +yylex(void) { register int c; int seen_e = FALSE; /* These are for numbers */ @@ -1495,7 +1458,7 @@ for (;;) { c = nextc(); #ifdef MBS_SUPPORT - if (MB_CUR_MAX == 1 || nextc_is_1stbyte) + if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) #endif switch (c) { case '[': @@ -1530,7 +1493,6 @@ if (in_brack > 0) break; - pushback(); tokadd('\0'); yylval.sval = tokstart; return lasttok = REGEXP; @@ -1555,7 +1517,7 @@ yylval.nodetypeval = Node_illegal; #ifdef MBS_SUPPORT - if (MB_CUR_MAX == 1 || nextc_is_1stbyte) + if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) #endif switch (c) { case EOF: @@ -1623,23 +1585,27 @@ } break; - case '$': - want_assign = TRUE; - return lasttok = '$'; - case ':': case '?': if (! do_posix) allow_newline(); return lasttok = c; + /* + * in_parens is undefined unless we are parsing a print + * statement (in_print), but why bother with a check? + */ case ')': + in_parens--; + return lasttok = c; + case '(': + in_parens++; + /* FALL THROUGH */ + case '$': case ';': case '{': case ',': - want_assign = FALSE; - /* fall through */ case '[': case ']': return lasttok = c; @@ -1681,13 +1647,11 @@ return lasttok = '*'; case '/': - if (want_assign) { - if (nextc() == '=') { - yylval.nodetypeval = Node_assign_quotient; - return lasttok = ASSIGNOP; - } + if (nextc() == '=') { pushback(); + return lasttok = SLASH_BEFORE_EQUAL; } + pushback(); return lasttok = '/'; case '%': @@ -1735,7 +1699,6 @@ } if (c == '~') { yylval.nodetypeval = Node_nomatch; - want_assign = FALSE; return lasttok = MATCHOP; } pushback(); @@ -1757,7 +1720,7 @@ } yylval.nodetypeval = Node_assign; pushback(); - return lasttok = ASSIGNOP; + return lasttok = ASSIGN; case '>': if ((c = nextc()) == '=') { @@ -1765,15 +1728,18 @@ return lasttok = RELOP; } else if (c == '>') { yylval.nodetypeval = Node_redirect_append; - return lasttok = APPEND_OP; + return lasttok = IO_OUT; } - yylval.nodetypeval = Node_greater; pushback(); + if (in_print && in_parens == 0) { + yylval.nodetypeval = Node_redirect_output; + return lasttok = IO_OUT; + } + yylval.nodetypeval = Node_greater; return lasttok = '>'; case '~': yylval.nodetypeval = Node_match; - want_assign = FALSE; return lasttok = MATCHOP; case '}': @@ -1799,7 +1765,7 @@ exit(1); } #ifdef MBS_SUPPORT - if (MB_CUR_MAX == 1 || nextc_is_1stbyte) + if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) #endif if (c == '\\') { c = nextc(); @@ -1947,7 +1913,6 @@ if ((c = nextc()) == '&') { yylval.nodetypeval = Node_and; allow_newline(); - want_assign = FALSE; return lasttok = LEX_AND; } pushback(); @@ -1957,15 +1922,19 @@ if ((c = nextc()) == '|') { yylval.nodetypeval = Node_or; allow_newline(); - want_assign = FALSE; return lasttok = LEX_OR; } else if (! do_traditional && c == '&') { yylval.nodetypeval = Node_redirect_twoway; - want_assign = FALSE; - return lasttok = TWOWAYIO; + return lasttok = (in_print && in_parens == 0 ? IO_OUT : IO_IN); } pushback(); - return lasttok = '|'; + if (in_print && in_parens == 0) { + yylval.nodetypeval = Node_redirect_pipe; + return lasttok = IO_OUT; + } else { + yylval.nodetypeval = Node_redirect_pipein; + return lasttok = IO_IN; + } } if (c != '_' && ! ISALPHA(c)) { @@ -2062,7 +2031,6 @@ else { static short goto_warned = FALSE; - want_assign = TRUE; #define SMART_ALECK 1 if (SMART_ALECK && do_lint && ! goto_warned && strcasecmp(tokkey, "goto") == 0) { @@ -2107,7 +2075,7 @@ return r; } -/* snode --- allocate a node with defined subnode and proc for builtin +/* snode --- allocate a node with defined subnode and builtin for builtin functions. Checks for arg. count and supplies defaults where possible. */ @@ -2134,14 +2102,14 @@ fatal(_("%d is invalid as number of arguments for %s"), nexp, tokentab[idx].operator); - r->proc = tokentab[idx].ptr; + r->builtin = tokentab[idx].ptr; /* special case processing for a few builtins */ - if (nexp == 0 && r->proc == do_length) { + if (nexp == 0 && r->builtin == do_length) { subn = node(node(make_number(0.0), Node_field_spec, (NODE *) NULL), Node_expression_list, (NODE *) NULL); - } else if (r->proc == do_match) { + } else if (r->builtin == do_match) { static short warned = FALSE; if (subn->rnode->lnode->type != Node_regex) @@ -2155,7 +2123,7 @@ if (do_traditional) fatal(_("match: third argument is a gawk extension")); } - } else if (r->proc == do_sub || r->proc == do_gsub) { + } else if (r->builtin == do_sub || r->builtin == do_gsub) { if (subn->lnode->type != Node_regex) subn->lnode = mk_rexp(subn->lnode); if (nexp == 2) @@ -2165,19 +2133,14 @@ Node_expression_list, (NODE *) NULL)); else if (subn->rnode->rnode->lnode->type == Node_val) { - if (do_lint) { - char *f; - - f = (r->proc == do_sub) ? "sub" : "gsub"; - lintwarn(_("%s: string literal as last arg of substitute has no effect"), f); - } + if (do_lint) + lintwarn(_("%s: string literal as last arg of substitute has no effect"), + (r->builtin == do_sub) ? "sub" : "gsub"); } else if (! isassignable(subn->rnode->rnode->lnode)) { - if (r->proc == do_sub) - yyerror(_("sub third parameter is not a changeable object")); - else - yyerror(_("gsub third parameter is not a changeable object")); + yyerror(_("%s third parameter is not a changeable object"), + (r->builtin == do_sub) ? "sub" : "gsub"); } - } else if (r->proc == do_gensub) { + } else if (r->builtin == do_gensub) { if (subn->lnode->type != Node_regex) subn->lnode = mk_rexp(subn->lnode); if (nexp == 3) @@ -2186,7 +2149,7 @@ (NODE *) NULL), Node_expression_list, (NODE *) NULL)); - } else if (r->proc == do_split) { + } else if (r->builtin == do_split) { if (nexp == 2) append_right(subn, node(FS_node, Node_expression_list, (NODE *) NULL)); @@ -2195,7 +2158,7 @@ subn->rnode->rnode->lnode = mk_rexp(n); if (nexp == 2) subn->rnode->rnode->lnode->re_flags |= FS_DFLT; - } else if (r->proc == do_close) { + } else if (r->builtin == do_close) { static short warned = FALSE; if ( nexp == 2) { @@ -2207,9 +2170,9 @@ fatal(_("close: second argument is a gawk extension")); } } else if (do_intl /* --gen-po */ - && r->proc == do_dcgettext /* dcgettext(...) */ + && r->builtin == do_dcgettext /* dcgettext(...) */ && subn->lnode->type == Node_val /* 1st arg is constant */ - && (subn->lnode->flags & STR) != 0) { /* it's a string constant */ + && (subn->lnode->flags & STRCUR) != 0) { /* it's a string constant */ /* ala xgettext, dcgettext("some string" ...) dumps the string */ NODE *str = subn->lnode; @@ -2219,11 +2182,11 @@ else dumpintlstr(str->stptr, str->stlen); } else if (do_intl /* --gen-po */ - && r->proc == do_dcngettext /* dcngettext(...) */ + && r->builtin == do_dcngettext /* dcngettext(...) */ && subn->lnode->type == Node_val /* 1st arg is constant */ - && (subn->lnode->flags & STR) != 0 /* it's a string constant */ + && (subn->lnode->flags & STRCUR) != 0 /* it's a string constant */ && subn->rnode->lnode->type == Node_val /* 2nd arg is constant too */ - && (subn->rnode->lnode->flags & STR) != 0) { /* it's a string constant */ + && (subn->rnode->lnode->flags & STRCUR) != 0) { /* it's a string constant */ /* ala xgettext, dcngettext("some string", "some plural" ...) dumps the string */ NODE *str1 = subn->lnode; NODE *str2 = subn->rnode->lnode; @@ -2235,33 +2198,13 @@ } r->subnode = subn; - if (r->proc == do_sprintf) { + if (r->builtin == do_sprintf) { count_args(r); r->lnode->printf_count = r->printf_count; /* hack */ } return r; } -/* - * mkrangenode: - * This allocates a Node_line_range node with defined condpair and - * zeroes the trigger word to avoid the temptation of assuming that calling - * 'node( foo, Node_line_range, 0)' will properly initialize 'triggered'. - * Otherwise like node(). - */ - -static NODE * -mkrangenode(NODE *cpair) -{ - register NODE *r; - - getnode(r); - r->type = Node_line_range; - r->condpair = cpair; - r->triggered = FALSE; - return r; -} - /* make_for_loop --- build a for loop */ static NODE * @@ -2286,7 +2229,7 @@ dup_parms(NODE *func) { register NODE *np; - char *fname, **names; + const char *fname, **names; int count, i, j, dups; NODE *params; @@ -2303,7 +2246,7 @@ if (params == NULL) /* error earlier */ return TRUE; - emalloc(names, char **, count * sizeof(char *), "dup_parms"); + emalloc(names, const char **, count * sizeof(char *), "dup_parms"); i = 0; for (np = params; np != NULL; np = np->rnode) { @@ -2332,18 +2275,19 @@ /* parms_shadow --- check if parameters shadow globals */ -static void +static int parms_shadow(const char *fname, NODE *func) { int count, i; + int ret = FALSE; if (fname == NULL || func == NULL) /* error earlier */ - return; + return FALSE; count = func->lnode->param_cnt; if (count == 0) /* no args, no problem */ - return; + return FALSE; /* * Use warning() and not lintwarn() so that can warn @@ -2354,8 +2298,11 @@ warning( _("function `%s': parameter `%s' shadows global variable"), fname, func->parmlist[i]); + ret = TRUE; } } + + return ret; } /* @@ -2407,12 +2354,12 @@ static int var_comp(const void *v1, const void *v2) { - NODE **npp1, **npp2; - NODE *n1, *n2; + const NODE *const *npp1, *const *npp2; + const NODE *n1, *n2; int minlen; - npp1 = (NODE **) v1; - npp2 = (NODE **) v2; + npp1 = (const NODE *const *) v1; + npp2 = (const NODE *const *) v2; n1 = *npp1; n2 = *npp2; @@ -2435,11 +2382,11 @@ fprintf(fp, ")\n"); } else if (n->flags & NUMBER) fprintf(fp, "number (%.17g)\n", n->numbr); - else if (n->flags & STR) { + else if (n->flags & STRCUR) { fprintf(fp, "string value ("); pp_string_fp(fp, n->stptr, n->stlen, '"', FALSE); fprintf(fp, ")\n"); - } else if (n->flags & NUM) + } else if (n->flags & NUMCUR) fprintf(fp, "number value (%.17g)\n", n->numbr); else fprintf(fp, "?? flags %s\n", flags2str(n->flags)); @@ -2527,7 +2474,7 @@ /* finfo --- for use in comparison and sorting of function names */ struct finfo { - char *name; + const char *name; size_t nlen; NODE *func; }; @@ -2537,11 +2484,11 @@ static int fcompare(const void *p1, const void *p2) { - struct finfo *f1, *f2; + const struct finfo *f1, *f2; int minlen; - f1 = (struct finfo *) p1; - f2 = (struct finfo *) p2; + f1 = (const struct finfo *) p1; + f2 = (const struct finfo *) p2; if (f1->nlen > f2->nlen) minlen = f2->nlen; @@ -2563,9 +2510,23 @@ if (func_count == 0) return; + /* + * Walk through symbol table countng functions. + * Could be more than func_count if there are + * extension functions. + */ + for (i = j = 0; i < HASHSIZE; i++) { + for (p = variables[i]; p != NULL; p = p->hnext) { + if (p->hvalue->type == Node_func) { + j++; + } + } + } + if (tab == NULL) - emalloc(tab, struct finfo *, func_count * sizeof(struct finfo), "dump_funcs"); + emalloc(tab, struct finfo *, j * sizeof(struct finfo), "dump_funcs"); + /* now walk again, copying info */ for (i = j = 0; i < HASHSIZE; i++) { for (p = variables[i]; p != NULL; p = p->hnext) { if (p->hvalue->type == Node_func) { @@ -2577,10 +2538,9 @@ } } - assert(j == func_count); /* Shazzam! */ - qsort(tab, func_count, sizeof(struct finfo), fcompare); + qsort(tab, j, sizeof(struct finfo), fcompare); for (i = 0; i < j; i++) pp_func(tab[i].name, tab[i].nlen, tab[i].func); @@ -2597,6 +2557,7 @@ NODE *p; struct finfo *tab; static int calls = 0; + int shadow = FALSE; if (func_count == 0) return; @@ -2623,9 +2584,13 @@ qsort(tab, func_count, sizeof(struct finfo), fcompare); for (i = 0; i < j; i++) - parms_shadow(tab[i].name, tab[i].func); + shadow |= parms_shadow(tab[i].name, tab[i].func); free(tab); + + /* End with fatal if the user requested it. */ + if (shadow && lintfunc != warning) + lintwarn(_("there were shadowed variables.")); } /* @@ -2656,6 +2621,27 @@ } /* + * append_pattern: + * A wrapper around append_right, used for rule lists. + */ +static inline NODE * +append_pattern(NODE **list, NODE *patt) +{ + NODE *n = node(patt, Node_rule_node, (NODE *) NULL); + + if (*list == NULL) + *list = n; + else { + NODE *n1 = node(n, Node_rule_list, (NODE *) NULL); + if ((*list)->type != Node_rule_list) + *list = node(*list, Node_rule_list, n1); + else + (void) append_right(*list, n1); + } + return n; +} + +/* * func_install: * check if name is already installed; if so, it had better have Null value, * in which case def is added as the value. Otherwise, install name with def @@ -2688,12 +2674,14 @@ r = lookup(params->param); if (r != NULL) { fatal(_("function name `%s' previously defined"), params->param); - } else { - thisfunc = node(params, Node_func, def); - (void) install(params->param, thisfunc); - } + } else if (params->param == builtin_func) /* not a valid function name */ + goto remove_params; + + /* install the function */ + thisfunc = node(params, Node_func, def); + (void) install(params->param, thisfunc); - /* figure out amount of space to allocate */ + /* figure out amount of space to allocate for variable names */ for (n = params->rnode; n != NULL; n = n->rnode) { pcount++; space += strlen(n->param) + 1; @@ -2714,13 +2702,14 @@ thisfunc->parmlist = NULL; } - /* remove params from symbol table */ - pop_params(params->rnode); - /* update lint table info */ func_use(params->param, FUNC_DEFINE); func_count++; /* used by profiling / pretty printer */ + +remove_params: + /* remove params from symbol table */ + pop_params(params->rnode); } /* pop_var --- remove a variable from the symbol table */ @@ -2788,7 +2777,7 @@ /* func_use --- track uses and definitions of functions */ static void -func_use(char *name, enum defref how) +func_use(const char *name, enum defref how) { struct fdesc *fp; int len; @@ -2881,20 +2870,26 @@ variable(char *name, int can_free, NODETYPE type) { register NODE *r; - static int env_loaded = FALSE; - static int procinfo_loaded = FALSE; - if (! env_loaded && STREQ(name, "ENVIRON")) { - load_environ(); - env_loaded = TRUE; - } - if (! do_traditional && ! procinfo_loaded && STREQ(name, "PROCINFO")) { - load_procinfo(); - procinfo_loaded = TRUE; - } - if ((r = lookup(name)) == NULL) - r = install(name, node(Nnull_string, type, (NODE *) NULL)); - else if (can_free) + if ((r = lookup(name)) != NULL) { + if (r->type == Node_func) + fatal(_("function `%s' called with space between name and `(',\n%s"), + r->vname, + _("or used as a variable or an array")); + } else { + /* not found */ + if (! do_traditional && STREQ(name, "PROCINFO")) + r = load_procinfo(); + else if (STREQ(name, "ENVIRON")) + r = load_environ(); + else { + /* + * This is the only case in which we may not free the string. + */ + return install(name, node(Nnull_string, type, (NODE *) NULL)); + } + } + if (can_free) free(name); return r; } @@ -2915,7 +2910,6 @@ n->re_text = NULL; n->re_reg = NULL; n->re_flags = 0; - n->re_cnt = 1; return n; } @@ -3010,7 +3004,7 @@ /* stopme --- for debugging */ NODE * -stopme(NODE *tree) +stopme(NODE *tree ATTRIBUTE_UNUSED) { return 0; } @@ -3018,7 +3012,7 @@ /* dumpintlstr --- write out an initial .po file entry for the string */ static void -dumpintlstr(char *str, size_t len) +dumpintlstr(const char *str, size_t len) { char *cp; @@ -3041,7 +3035,7 @@ /* dumpintlstr2 --- write out an initial .po file entry for the string and its plural */ static void -dumpintlstr2(char *str1, size_t len1, char *str2, size_t len2) +dumpintlstr2(const char *str1, size_t len1, const char *str2, size_t len2) { char *cp; @@ -3073,7 +3067,7 @@ NODE *save_tree; assert(tree->type == Node_K_printf - || (tree->type == Node_builtin && tree->proc == do_sprintf)); + || (tree->type == Node_builtin && tree->builtin == do_sprintf)); save_tree = tree; tree = tree->lnode; /* printf format string */ diff -urN gawk-3.1.1/awklib/ChangeLog gawk-3.1.2/awklib/ChangeLog --- gawk-3.1.1/awklib/ChangeLog 2002-05-01 16:41:52.000000000 +0300 +++ gawk-3.1.2/awklib/ChangeLog 2003-03-19 14:24:06.000000000 +0200 @@ -1,3 +1,21 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Thu Oct 10 13:24:09 2002 Arnold D. Robbins + + * Makefile.am (INCLUDES): Added to get .. for build dir + which will have config.h in it. + (grcat,pwcat): Use $(COMPILE) instead of $(CC) to get + $(INCLUDES) included. + +Tue Jun 11 23:43:36 2002 Arnold D. Robbins + + * Makefile.am (grcat): Add def for config.h and -I flag. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/awklib/Makefile.am gawk-3.1.2/awklib/Makefile.am --- gawk-3.1.1/awklib/Makefile.am 2002-04-17 15:20:19.000000000 +0300 +++ gawk-3.1.2/awklib/Makefile.am 2003-02-04 14:08:16.000000000 +0200 @@ -1,7 +1,7 @@ # # awklib/Makefile.am --- automake input file for gawk # -# Copyright (C) 1995-2002 the Free Software Foundation, Inc. +# Copyright (C) 1995-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -25,6 +25,10 @@ EXTRA_DIST = ChangeLog extract.awk eg stamp-eg +# This is so we get config.h. It'll be in the build directory, +# not the source directory. +INCLUDES = -I.. + datadir = @datadir@/awk libexecdir = @libexecdir@/awk @@ -58,10 +62,10 @@ @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c - $(CC) $(CFLAGS) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ + $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@ grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c - $(CC) $(CFLAGS) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ + $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@ igawk: $(srcdir)/eg/prog/igawk.sh cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@ diff -urN gawk-3.1.1/awklib/eg/lib/grcat.c gawk-3.1.2/awklib/eg/lib/grcat.c --- gawk-3.1.1/awklib/eg/lib/grcat.c 2002-04-22 14:27:33.000000000 +0300 +++ gawk-3.1.2/awklib/eg/lib/grcat.c 2003-03-19 13:55:32.000000000 +0200 @@ -12,9 +12,13 @@ #if HAVE_CONFIG_H #include #endif + +#if defined (STDC_HEADERS) +#include +#endif -#ifndef HAVE_GETPGRENT -int main() { exit(0); } +#ifndef HAVE_GETGRENT +int main() { return 0; } #else #include #include @@ -28,8 +32,8 @@ int i; while ((g = getgrent()) != NULL) { - printf("%s:%s:%d:", g->gr_name, g->gr_passwd, - g->gr_gid); + printf("%s:%s:%ld:", g->gr_name, g->gr_passwd, + (long) g->gr_gid); for (i = 0; g->gr_mem[i] != NULL; i++) { printf("%s", g->gr_mem[i]); if (g->gr_mem[i+1] != NULL) @@ -38,6 +42,6 @@ putchar('\n'); } endgrent(); - exit(0); + return 0; } -#endif /* HAVE_GETPGRENT */ +#endif /* HAVE_GETGRENT */ diff -urN gawk-3.1.1/awklib/eg/lib/pwcat.c gawk-3.1.2/awklib/eg/lib/pwcat.c --- gawk-3.1.1/awklib/eg/lib/pwcat.c 2002-04-22 14:27:33.000000000 +0300 +++ gawk-3.1.2/awklib/eg/lib/pwcat.c 2003-03-19 13:55:32.000000000 +0200 @@ -8,9 +8,17 @@ * Public Domain */ +#if HAVE_CONFIG_H +#include +#endif + #include #include +#if defined (STDC_HEADERS) +#include +#endif + int main(argc, argv) int argc; @@ -19,10 +27,10 @@ struct passwd *p; while ((p = getpwent()) != NULL) - printf("%s:%s:%d:%d:%s:%s:%s\n", - p->pw_name, p->pw_passwd, p->pw_uid, - p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); + printf("%s:%s:%ld:%ld:%s:%s:%s\n", + p->pw_name, p->pw_passwd, (long) p->pw_uid, + (long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); endpwent(); - exit(0); + return 0; } diff -urN gawk-3.1.1/awklib/eg/prog/igawk.sh gawk-3.1.2/awklib/eg/prog/igawk.sh --- gawk-3.1.1/awklib/eg/prog/igawk.sh 2002-04-22 14:27:33.000000000 +0300 +++ gawk-3.1.2/awklib/eg/prog/igawk.sh 2003-03-19 13:55:32.000000000 +0200 @@ -8,49 +8,56 @@ then set -x shift -else - # cleanup on exit, hangup, interrupt, quit, termination - trap 'rm -f /tmp/ig.[se].$$' 0 1 2 3 15 fi +# A literal newline, so that program text is formmatted correctly +n=' +' + +# Initialize variables to empty +program= +opts= + while [ $# -ne 0 ] # loop over arguments do case $1 in --) shift; break;; -W) shift - set -- -W"$@" + # The ${x?'message here'} construct prints a + # diagnostic if $x is the null string + set -- -W"${@?'missing operand'}" continue;; - -[vF]) opts="$opts $1 '$2'" + -[vF]) opts="$opts $1 '${2?'missing operand'}'" shift;; -[vF]*) opts="$opts '$1'" ;; - -f) echo @include "$2" >> /tmp/ig.s.$$ + -f) program="$program$n@include ${2?'missing operand'}" shift;; - -f*) f=`echo "$1" | sed 's/-f//'` - echo @include "$f" >> /tmp/ig.s.$$ ;; + -f*) f=`expr "$1" : '-f\(.*\)'` + program="$program$n@include $f";; - -?file=*) # -Wfile or --file - f=`echo "$1" | sed 's/-.file=//'` - echo @include "$f" >> /tmp/ig.s.$$ ;; + -[W-]file=*) + f=`expr "$1" : '-.file=\(.*\)'` + program="$program$n@include $f";; - -?file) # get arg, $2 - echo @include "$2" >> /tmp/ig.s.$$ + -[W-]file) + program="$program$n@include ${2?'missing operand'}" shift;; - -?source=*) # -Wsource or --source - t=`echo "$1" | sed 's/-.source=//'` - echo "$t" >> /tmp/ig.s.$$ ;; + -[W-]source=*) + t=`expr "$1" : '-.source=\(.*\)'` + program="$program$n$t";; - -?source) # get arg, $2 - echo "$2" >> /tmp/ig.s.$$ + -[W-]source) + program="$program$n${2?'missing operand'}" shift;; - -?version) - echo igawk: version 1.0 1>&2 + -[W-]version) + echo igawk: version 2.0 1>&2 gawk --version exit 0 ;; @@ -61,21 +68,14 @@ shift done -if [ ! -s /tmp/ig.s.$$ ] +if [ -z "$program" ] then - if [ -z "$1" ] - then - echo igawk: no program! 1>&2 - exit 1 - else - echo "$1" > /tmp/ig.s.$$ - shift - fi + program=${1?'missing program'} + shift fi -# at this point, /tmp/ig.s.$$ has the program -gawk -- ' -# process @include directives +# At this point, `program' has the program. +expand_prog=' function pathto(file, i, t, junk) { @@ -124,7 +124,10 @@ } close(input[stackptr]) } -}' /tmp/ig.s.$$ > /tmp/ig.e.$$ -eval gawk -f /tmp/ig.e.$$ $opts -- "$@" +}' # close quote ends `expand_prog' variable -exit $? +processed_program=`gawk -- "$expand_prog" /dev/stdin < #include "random.h" +#ifndef SIZE_MAX /* C99 constant, can't rely on it everywhere */ +#define SIZE_MAX ((size_t) -1) +#endif + /* can declare these, since we always use the random shipped with gawk */ extern char *initstate P((unsigned long seed, char *state, long n)); extern char *setstate P((char *state)); @@ -43,7 +47,7 @@ extern NODE **fields_arr; extern int output_is_tty; -static NODE *sub_common P((NODE *tree, int how_many, int backdigs)); +static NODE *sub_common P((NODE *tree, long how_many, int backdigs)); #ifdef _CRAY /* Work around a problem in conversion of doubles to exact integers. */ @@ -118,7 +122,7 @@ double d, res; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("exp: received non-numeric argument")); d = force_number(tmp); free_temp(tmp); @@ -138,7 +142,7 @@ */ static FILE * -stdfile(char *name, size_t len) +stdfile(const char *name, size_t len) { if (len == 11) { if (STREQN(name, "/dev/stderr", 11)) @@ -159,7 +163,7 @@ NODE *tmp; FILE *fp; int status = 0; - char *file; + const char *file; /* fflush() --- flush stdout */ if (tree == NULL) { @@ -275,13 +279,13 @@ do_index(NODE *tree) { NODE *s1, *s2; - register char *p1, *p2; + register const char *p1, *p2; register size_t l1, l2; long ret; #ifdef MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs1, mbs2; - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { memset(&mbs1, 0, sizeof(mbstate_t)); memset(&mbs2, 0, sizeof(mbstate_t)); } @@ -291,9 +295,9 @@ s1 = tree_eval(tree->lnode); s2 = tree_eval(tree->rnode->lnode); if (do_lint) { - if ((s1->flags & (STRING|STR)) == 0) + if ((s1->flags & (STRING|STRCUR)) == 0) lintwarn(_("index: received non-string first argument")); - if ((s2->flags & (STRING|STR)) == 0) + if ((s2->flags & (STRING|STRCUR)) == 0) lintwarn(_("index: received non-string second argument")); } force_string(s1); @@ -320,7 +324,7 @@ if (l2 > l1) break; #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { if (strncasecmpmbs(p1, mbs1, p2, mbs2, l2) == 0) { ret = 1 + s1->stlen - l1; break; @@ -357,7 +361,7 @@ break; } #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { mbclen = mbrlen(p1, l1, &mbs1); if ((mbclen == 1) || (mbclen == (size_t) -1) || (mbclen == (size_t) -2) || (mbclen == 0)) { @@ -403,7 +407,7 @@ double d; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("int: received non-numeric argument")); d = force_number(tmp); d = double_to_int(d); @@ -420,7 +424,7 @@ size_t len; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (STRING|STR)) == 0) + if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) lintwarn(_("length: received non-string argument")); len = force_string(tmp)->stlen; free_temp(tmp); @@ -436,7 +440,7 @@ double d, arg; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("log: received non-numeric argument")); arg = (double) force_number(tmp); if (arg < 0.0) @@ -459,9 +463,9 @@ NODE * format_tree( const char *fmt_string, - int n0, + size_t n0, register NODE *carg, - int num_args) + long num_args) { /* copy 'l' bytes from 's' to 'obufout' checking for space in the process */ /* difference of pointers should be of ptrdiff_t type, but let us be kind */ @@ -513,7 +517,7 @@ int toofew = FALSE; char *obuf, *obufout; size_t osiz, ofre; - char *chbuf; + const char *chbuf; const char *s0, *s1; int cs1; NODE *arg; @@ -530,15 +534,15 @@ char cpbuf[30]; /* if we have numbers bigger than 30 */ char *cend = &cpbuf[30];/* chars, we lose, but seems unlikely */ char *cp; - char *fill; + const char *fill; double tmpval; char signchar = FALSE; size_t len; int zero_flag = FALSE; - static char sp[] = " "; - static char zero_string[] = "0"; - static char lchbuf[] = "0123456789abcdef"; - static char Uchbuf[] = "0123456789ABCDEF"; + static const char sp[] = " "; + static const char zero_string[] = "0"; + static const char lchbuf[] = "0123456789abcdef"; + static const char Uchbuf[] = "0123456789ABCDEF"; #define INITIAL_OUT_SIZE 512 emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree"); @@ -643,7 +647,7 @@ s1++; retry: - if (n0-- <= 0) /* ran out early! */ + if (n0-- == 0) /* ran out early! */ break; switch (cs1 = *s1++) { @@ -654,6 +658,13 @@ goto retry; case '%': need_format = FALSE; + /* + * 29 Oct. 2002: + * The C99 standard pages 274 and 279 seem to imply that + * since there's no arg converted, the field width doesn't + * apply. The code already was that way, but this + * comment documents it, at least in the code. + */ bchunk_one("%"); s0 = s1; break; @@ -708,7 +719,7 @@ if (argnum <= 0) fatal(_("arg count with `$' must be > 0")); if (argnum >= num_args) - fatal(_("arg count %d greater than total number of supplied arguments"), argnum); + fatal(_("arg count %ld greater than total number of supplied arguments"), argnum); } else fatal(_("`$' not permitted after period in format")); goto retry; @@ -1065,7 +1076,7 @@ if (toofew) fatal("%s\n\t`%s'\n\t%*s%s", _("not enough arguments to satisfy format string"), - fmt_string, s1 - fmt_string - 1, "", + fmt_string, (int) (s1 - fmt_string - 1), "", _("^ ran out for this one")); } if (do_lint) { @@ -1106,6 +1117,29 @@ return r; } +/* + * redirect_to_fp --- return fp for redirection, NULL on failure + * or stdout if no redirection, used by all print routines + */ + +static inline FILE * +redirect_to_fp(NODE *tree, struct redirect **rpp) +{ + int errflg; /* not used, sigh */ + struct redirect *rp; + + if (tree == NULL) + return stdout; + + rp = redirect(tree, &errflg); + if (rp != NULL) { + *rpp = rp; + return rp->fp; + } + + return NULL; +} + /* do_printf --- perform printf, including redirection */ void @@ -1123,18 +1157,9 @@ fatal(_("printf: no arguments")); } - if (tree->rnode != NULL) { - int errflg; /* not used, sigh */ - - rp = redirect(tree->rnode, &errflg); - if (rp != NULL) { - fp = rp->fp; - if (fp == NULL) - return; - } else - return; - } else - fp = stdout; + fp = redirect_to_fp(tree->rnode, & rp); + if (fp == NULL) + return; tree->lnode->printf_count = tree->printf_count; tree = do_sprintf(tree->lnode); efwrite(tree->stptr, sizeof(char), tree->stlen, fp, "printf", rp, TRUE); @@ -1152,7 +1177,7 @@ double arg; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sqrt: received non-numeric argument")); arg = (double) force_number(tmp); free_temp(tmp); @@ -1187,48 +1212,66 @@ lintwarn(_("substr: non-integer start index %g will be truncated"), d_index); - indx = d_index - 1; /* awk indices are from 1, C's are from 0 */ + /* awk indices are from 1, C's are from 0 */ + if (d_index <= SIZE_MAX) + indx = d_index - 1; + else + indx = SIZE_MAX; if (tree->rnode->rnode == NULL) { /* third arg. missing */ /* use remainder of string */ length = t1->stlen - indx; + d_length = length; /* set here in case used in diagnostics, below */ } else { t3 = tree_eval(tree->rnode->rnode->lnode); d_length = force_number(t3); free_temp(t3); if (d_length <= 0.0) { - if (do_lint) + if (do_lint == LINT_ALL) lintwarn(_("substr: length %g is <= 0"), d_length); + else if (do_lint == LINT_INVALID && d_length < 0) + lintwarn(_("substr: length %g is < 0"), d_length); free_temp(t1); return Nnull_string; } - if (do_lint && double_to_int(d_length) != d_length) - lintwarn( - _("substr: non-integer length %g will be truncated"), - d_length); - length = d_length; + if (do_lint) { + if (double_to_int(d_length) != d_length) + lintwarn( + _("substr: non-integer length %g will be truncated"), + d_length); + + if (d_length > SIZE_MAX) + lintwarn( + _("substr: length %g too big for string indexing, truncating to %g"), + d_length, (double) SIZE_MAX); + } + if (d_length <= SIZE_MAX) + length = d_length; + else + length = SIZE_MAX; } if (t1->stlen == 0) { - if (do_lint) + /* substr("", 1, 0) produces a warning only if LINT_ALL */ + if (do_lint && (do_lint == LINT_ALL || ((indx | length) != 0))) lintwarn(_("substr: source string is zero length")); free_temp(t1); return Nnull_string; } - if ((indx + length) > t1->stlen) { - if (do_lint) - lintwarn( - _("substr: length %d at start index %d exceeds length of first argument (%d)"), - length, indx+1, t1->stlen); - length = t1->stlen - indx; - } if (indx >= t1->stlen) { if (do_lint) - lintwarn(_("substr: start index %d is past end of string"), - indx+1); + lintwarn(_("substr: start index %g is past end of string"), + d_index); free_temp(t1); return Nnull_string; } + if (length > t1->stlen - indx) { + if (do_lint) + lintwarn( + _("substr: length %g at start index %g exceeds length of first argument (%lu)"), + d_length, d_index, (unsigned long int) t1->stlen); + length = t1->stlen - indx; + } r = tmp_string(t1->stptr + indx, length); free_temp(t1); return r; @@ -1246,8 +1289,8 @@ size_t buflen, bufsize; char buf[BUFSIZ]; /* FIXME: One day make %d be %e, after C 99 is common. */ - static char def_format[] = "%a %b %d %H:%M:%S %Z %Y"; - char *format; + static const char def_format[] = "%a %b %d %H:%M:%S %Z %Y"; + const char *format; int formatlen; /* set defaults first */ @@ -1259,7 +1302,7 @@ if (tree != NULL) { /* have args */ if (tree->lnode != NULL) { NODE *tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (STRING|STR)) == 0) + if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) lintwarn(_("strftime: received non-string first argument")); t1 = force_string(tmp); format = t1->stptr; @@ -1274,7 +1317,7 @@ if (tree->rnode != NULL) { t2 = tree_eval(tree->rnode->lnode); - if (do_lint && (t2->flags & (NUM|NUMBER)) == 0) + if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("strftime: received non-numeric second argument")); fclock = (time_t) force_number(t2); free_temp(t2); @@ -1315,7 +1358,7 @@ /* do_systime --- get the time of day */ NODE * -do_systime(NODE *tree) +do_systime(NODE *tree ATTRIBUTE_UNUSED) { time_t lclock; @@ -1337,7 +1380,7 @@ char save; t1 = tree_eval(tree->lnode); - if (do_lint && (t1->flags & (STRING|STR)) == 0) + if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("mktime: received non-string argument")); t1 = force_string(t1); @@ -1382,7 +1425,7 @@ (void) flush_io(); /* so output is synchronous with gawk's */ tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (STRING|STR)) == 0) + if (do_lint && (tmp->flags & (STRING|STRCUR)) == 0) lintwarn(_("system: received non-string argument")); cmd = force_string(tmp)->stptr; @@ -1408,7 +1451,8 @@ os_restore_mode(fileno(stdin)); ret = system(cmd); - ret = (ret >> 8) & 0xff; + if (ret != -1) + ret = WEXITSTATUS(ret); if ((BINMODE & 1) != 0) os_setbinmode(fileno(stdin), O_BINARY); @@ -1432,18 +1476,9 @@ NODE *save; NODE *tval; - if (tree->rnode) { - int errflg; /* not used, sigh */ - - rp = redirect(tree->rnode, &errflg); - if (rp != NULL) { - fp = rp->fp; - if (fp == NULL) - return; - } else - return; - } else - fp = stdout; + fp = redirect_to_fp(tree->rnode, & rp); + if (fp == NULL) + return; /* * General idea is to evaluate all the expressions first and @@ -1493,6 +1528,32 @@ free(t); } +/* do_print_rec --- special case printing of $0, for speed */ + +void +do_print_rec(register NODE *tree) +{ + struct redirect *rp = NULL; + register FILE *fp; + register NODE *f0; + + fp = redirect_to_fp(tree->rnode, & rp); + if (fp == NULL) + return; + + if (! field0_valid) + (void) get_field(0L, NULL); /* rebuild record */ + + f0 = fields_arr[0]; + efwrite(f0->stptr, sizeof(char), f0->stlen, fp, "print", rp, FALSE); + + if (ORSlen > 0) + efwrite(ORS, sizeof(char), (size_t) ORSlen, fp, "print", rp, TRUE); + + if (rp != NULL && (rp->flag & RED_TWOWAY) != 0) + fflush(rp->fp); +} + /* do_tolower --- lower case a string */ NODE * @@ -1503,37 +1564,37 @@ #ifdef MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs, prev_mbs; - if (MB_CUR_MAX > 1) + if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); #endif t1 = tree_eval(tree->lnode); - if (do_lint && (t1->flags & (STRING|STR)) == 0) + if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("tolower: received non-string argument")); t1 = force_string(t1); t2 = tmp_string(t1->stptr, t1->stlen); for (cp = (unsigned char *)t2->stptr, cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++) #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { wchar_t wc; prev_mbs = mbs; - mbclen = (size_t) mbrtowc(&wc, cp, cp2 - cp, &mbs); + mbclen = (size_t) mbrtowc(&wc, (char *) cp, cp2 - cp, + &mbs); if ((mbclen != 1) && (mbclen != (size_t) -1) && (mbclen != (size_t) -2) && (mbclen != 0)) { /* a multibyte character. */ - if (iswupper(wc)) - { + if (iswupper(wc)) { wc = towlower(wc); - wcrtomb(cp, wc, &prev_mbs); + wcrtomb((char *) cp, wc, &prev_mbs); } /* Adjust the pointer. */ cp += mbclen - 1; - } else { + } else { /* Otherwise we treat it as a singlebyte character. */ if (ISUPPER(*cp)) *cp = tolower(*cp); - } + } } else #endif if (ISUPPER(*cp)) @@ -1552,37 +1613,37 @@ #ifdef MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs, prev_mbs; - if (MB_CUR_MAX > 1) + if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); #endif t1 = tree_eval(tree->lnode); - if (do_lint && (t1->flags & (STRING|STR)) == 0) + if (do_lint && (t1->flags & (STRING|STRCUR)) == 0) lintwarn(_("toupper: received non-string argument")); t1 = force_string(t1); t2 = tmp_string(t1->stptr, t1->stlen); for (cp = (unsigned char *)t2->stptr, cp2 = (unsigned char *)(t2->stptr + t2->stlen); cp < cp2; cp++) #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { wchar_t wc; prev_mbs = mbs; - mbclen = (size_t) mbrtowc(&wc, cp, cp2 - cp, &mbs); + mbclen = (size_t) mbrtowc(&wc, (char *) cp, cp2 - cp, + &mbs); if ((mbclen != 1) && (mbclen != (size_t) -1) && (mbclen != (size_t) -2) && (mbclen != 0)) { /* a multibyte character. */ - if (iswlower(wc)) - { + if (iswlower(wc)) { wc = towupper(wc); - wcrtomb(cp, wc, &prev_mbs); + wcrtomb((char *) cp, wc, &prev_mbs); } /* Adjust the pointer. */ cp += mbclen - 1; - } else { + } else { /* Otherwise we treat it as a singlebyte character. */ if (ISLOWER(*cp)) *cp = toupper(*cp); - } + } } else #endif if (ISLOWER(*cp)) @@ -1602,9 +1663,9 @@ t1 = tree_eval(tree->lnode); t2 = tree_eval(tree->rnode->lnode); if (do_lint) { - if ((t1->flags & (NUM|NUMBER)) == 0) + if ((t1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("atan2: received non-numeric first argument")); - if ((t2->flags & (NUM|NUMBER)) == 0) + if ((t2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("atan2: received non-numeric second argument")); } d1 = force_number(t1); @@ -1623,7 +1684,7 @@ double d; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("sin: received non-numeric argument")); d = sin((double) force_number(tmp)); free_temp(tmp); @@ -1639,7 +1700,7 @@ double d; tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("cos: received non-numeric argument")); d = cos((double) force_number(tmp)); free_temp(tmp); @@ -1653,7 +1714,7 @@ /* ARGSUSED */ NODE * -do_rand(NODE *tree) +do_rand(NODE *tree ATTRIBUTE_UNUSED) { if (firstrand) { (void) initstate((unsigned) 1, state, sizeof state); @@ -1683,7 +1744,7 @@ srandom((unsigned int) (save_seed = (long) time((time_t *) 0))); else { tmp = tree_eval(tree->lnode); - if (do_lint && (tmp->flags & (NUM|NUMBER)) == 0) + if (do_lint && (tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("srand: received non-numeric argument")); srandom((unsigned int) (save_seed = (long) force_number(tmp))); free_temp(tmp); @@ -1693,7 +1754,7 @@ /* do_match --- match a regexp, set RSTART and RLENGTH, * optional third arg is array filled with text of - * subpatterns enclosed in parens. + * subpatterns enclosed in parens and start and len info. */ NODE * @@ -1705,6 +1766,11 @@ Regexp *rp; regoff_t s; char *start; + char *buf = NULL; + char buff[100]; + size_t amt, oldamt = 0, ilen, slen; + char *subsepstr; + size_t subseplen; t1 = force_string(tree_eval(tree->lnode)); tree = tree->rnode; @@ -1730,14 +1796,50 @@ /* Build the array only if the caller wants the optional subpatterns */ if (dest != NULL) { - for (ii = 0; (s = SUBPATSTART(rp, t1->stptr, ii)) != -1; ii++) { + subsepstr = SUBSEP_node->var_value->stptr; + subseplen = SUBSEP_node->var_value->stlen; + + for (ii = 0; ii < NUMSUBPATS(rp, t1->stptr) + && (s = SUBPATSTART(rp, t1->stptr, ii)) != -1; ii++) { start = t1->stptr + s; len = SUBPATEND(rp, t1->stptr, ii) - s; it = make_string(start, len); - it->flags |= MAYBE_NUM; + /* + * assoc_lookup() does free_temp() on 2nd arg. + */ *assoc_lookup(dest, tmp_number((AWKNUM) (ii)), FALSE) = it; + + sprintf(buff, "%d", ii); + ilen = strlen(buff); + amt = ilen + subseplen + strlen("length") + 2; + + if (oldamt == 0) { + emalloc(buf, char *, amt, "do_match"); + } else if (amt > oldamt) { + erealloc(buf, char *, amt, "do_match"); + } + oldamt = amt; + memcpy(buf, buff, ilen); + memcpy(buf + ilen, subsepstr, subseplen); + memcpy(buf + ilen + subseplen, "start", 6); + + slen = ilen + subseplen + 5; + + it = make_number((AWKNUM) s + 1); + *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it; + + memcpy(buf, buff, ilen); + memcpy(buf + ilen, subsepstr, subseplen); + memcpy(buf + ilen + subseplen, "length", 7); + + slen = ilen + subseplen + 6; + + it = make_number((AWKNUM) len); + *assoc_lookup(dest, tmp_string(buf, slen), FALSE) = it; } + + free(buf); } } else { /* match failed */ rstart = 0; @@ -1817,7 +1919,7 @@ */ static NODE * -sub_common(NODE *tree, int how_many, int backdigs) +sub_common(NODE *tree, long how_many, int backdigs) { register char *scan; register char *bp, *cp; @@ -1849,13 +1951,14 @@ char *mb_indices; #endif - tmp = tree->lnode; + tmp = tree->lnode; /* regexp */ rp = re_update(tmp); - tree = tree->rnode; + tree = tree->rnode; /* replacement text */ s = tree->lnode; + s = force_string(tree_eval(s)); - tree = tree->rnode; + tree = tree->rnode; /* original string */ tmp = tree->lnode; t = force_string(tree_eval(tmp)); @@ -1863,6 +1966,7 @@ if (research(rp, t->stptr, 0, t->stlen, TRUE) == -1 || RESTART(rp, t->stptr) > t->stlen) { free_temp(t); + free_temp(s); return tmp_number((AWKNUM) 0.0); } @@ -1883,7 +1987,6 @@ textlen = t->stlen; buflen = textlen + 2; - s = force_string(tree_eval(s)); repl = s->stptr; replend = repl + s->stlen; repllen = replend - repl; @@ -1900,7 +2003,7 @@ * sub(/foo/, "", mystring) * for example. */ - if (MB_CUR_MAX > 1 && repllen > 0) { + if (gawk_mb_cur_max > 1 && repllen > 0) { emalloc(mb_indices, char *, repllen * sizeof(char), "sub_common"); index_multibyte_buffer(repl, mb_indices, repllen); } else @@ -1908,7 +2011,7 @@ #endif for (scan = repl; scan < replend; scan++) { #ifdef MBS_SUPPORT - if ((MB_CUR_MAX == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) + if ((gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) && (*scan == '&')) { #else if (*scan == '&') { @@ -1969,9 +2072,13 @@ /* * If the current match matched the null string, * and the last match didn't and did a replacement, - * then skip this one. + * and the match of the null string is at the front of + * the text (meaning right after end of the previous + * replacement), then skip this one. */ - if (lastmatchnonzero && matchstart == matchend) { + if (matchstart == matchend + && lastmatchnonzero + && matchstart == text) { lastmatchnonzero = FALSE; matches--; goto empty; @@ -1983,7 +2090,7 @@ */ for (scan = repl; scan < replend; scan++) #ifdef MBS_SUPPORT - if ((MB_CUR_MAX == 1 + if ((gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) && (*scan == '&')) #else @@ -1992,7 +2099,7 @@ for (cp = matchstart; cp < matchend; cp++) *bp++ = *cp; #ifdef MBS_SUPPORT - else if ((MB_CUR_MAX == 1 + else if ((gawk_mb_cur_max == 1 || (repllen > 0 && mb_indices[scan - repl] == 1)) && (*scan == '\\')) { #else @@ -2081,7 +2188,7 @@ } if (after_assign != NULL) (*after_assign)(); - t->flags &= ~(NUM|NUMBER); + t->flags &= ~(NUMCUR|NUMBER); } #ifdef MBS_SUPPORT if (mb_indices != NULL) @@ -2142,7 +2249,7 @@ n3.lnode = target; n2.rnode = & n3; - if ((t->flags & (STR|STRING)) != 0) { + if ((t->flags & (STRCUR|STRING)) != 0) { if (t->stlen > 0 && (t->stptr[0] == 'g' || t->stptr[0] == 'G')) how_many = -1; else @@ -2264,9 +2371,9 @@ shift = force_number(s2); if (do_lint) { - if ((s1->flags & (NUM|NUMBER)) == 0) + if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric first argument")); - if ((s2->flags & (NUM|NUMBER)) == 0) + if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("lshift: received non-numeric first argument")); if (val < 0 || shift < 0) lintwarn(_("lshift(%lf, %lf): negative values will give strange results"), val, shift); @@ -2301,9 +2408,9 @@ shift = force_number(s2); if (do_lint) { - if ((s1->flags & (NUM|NUMBER)) == 0) + if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric first argument")); - if ((s2->flags & (NUM|NUMBER)) == 0) + if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("rshift: received non-numeric first argument")); if (val < 0 || shift < 0) lintwarn(_("rshift(%lf, %lf): negative values will give strange results"), val, shift); @@ -2338,9 +2445,9 @@ right = force_number(s2); if (do_lint) { - if ((s1->flags & (NUM|NUMBER)) == 0) + if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric first argument")); - if ((s2->flags & (NUM|NUMBER)) == 0) + if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("and: received non-numeric first argument")); if (left < 0 || right < 0) lintwarn(_("and(%lf, %lf): negative values will give strange results"), left, right); @@ -2373,9 +2480,9 @@ right = force_number(s2); if (do_lint) { - if ((s1->flags & (NUM|NUMBER)) == 0) + if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric first argument")); - if ((s2->flags & (NUM|NUMBER)) == 0) + if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("or: received non-numeric first argument")); if (left < 0 || right < 0) lintwarn(_("or(%lf, %lf): negative values will give strange results"), left, right); @@ -2408,9 +2515,9 @@ right = force_number(s2); if (do_lint) { - if ((s1->flags & (NUM|NUMBER)) == 0) + if ((s1->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("xor: received non-numeric first argument")); - if ((s2->flags & (NUM|NUMBER)) == 0) + if ((s2->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("xor: received non-numeric first argument")); if (left < 0 || right < 0) lintwarn(_("xor(%lf, %lf): negative values will give strange results"), left, right); @@ -2442,7 +2549,7 @@ free_temp(tmp); if (do_lint) { - if ((tmp->flags & (NUM|NUMBER)) == 0) + if ((tmp->flags & (NUMCUR|NUMBER)) == 0) lintwarn(_("compl: received non-numeric argument")); if (d < 0) lintwarn(_("compl(%lf): negative value will give strange results"), d); @@ -2561,9 +2668,9 @@ static int localecategory_from_argument(NODE *tree) { - static struct category_table { + static const struct category_table { int val; - char *name; + const char *name; } cat_tab[] = { #ifdef LC_ALL { LC_ALL, "LC_ALL" }, diff -urN gawk-3.1.1/config.guess gawk-3.1.2/config.guess --- gawk-3.1.1/config.guess 2002-04-28 17:08:33.000000000 +0300 +++ gawk-3.1.2/config.guess 2003-03-06 11:11:50.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2002-03-20' +timestamp='2003-01-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -88,30 +88,41 @@ exit 1 fi +trap 'exit 1' 1 2 15 -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. -# CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c ; +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; - if test $? = 0 ; then + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; - rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac' +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -142,6 +153,7 @@ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; @@ -167,7 +179,18 @@ ;; esac # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. @@ -212,67 +235,54 @@ *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *:MicroBSD:*:*) + echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - eval $set_cc_for_build - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - esac - fi - rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) @@ -313,6 +323,10 @@ NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -419,15 +433,20 @@ exit (-1); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -500,8 +519,7 @@ exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -599,11 +617,21 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) @@ -637,8 +665,7 @@ exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -696,15 +723,15 @@ CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` @@ -721,7 +748,18 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -733,13 +771,16 @@ echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) - echo i386-pc-interix3 + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix + echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin @@ -782,8 +823,26 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - rm -f $dummy.c - test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu @@ -845,7 +904,7 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; @@ -878,7 +937,6 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; @@ -896,6 +954,23 @@ # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -917,22 +992,19 @@ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 - (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -956,9 +1028,15 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -975,9 +1053,6 @@ mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; @@ -1049,6 +1124,9 @@ SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; @@ -1056,7 +1134,11 @@ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1069,7 +1151,7 @@ *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1092,11 +1174,6 @@ fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; @@ -1115,12 +1192,6 @@ *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1241,8 +1312,7 @@ } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 -rm -f $dummy.c $dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. diff -urN gawk-3.1.1/config.sub gawk-3.1.2/config.sub --- gawk-3.1.1/config.sub 2002-04-28 17:10:06.000000000 +0300 +++ gawk-3.1.2/config.sub 2003-03-06 11:11:50.000000000 +0200 @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2002-04-26' +timestamp='2003-02-03' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -118,7 +118,7 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -229,24 +229,36 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ - | d10v | d30v | dsp16xx \ - | fr30 \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ + | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ - | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el | mips64vr4300 \ - | mips64vr4300el | mips64vr5000 | mips64vr5000el \ - | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ - | mipsisa32 | mipsisa64 \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ @@ -281,34 +293,49 @@ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armv*-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ - | d10v-* | d30v-* \ + | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | fx80-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ - | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ - | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ - | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ @@ -695,6 +722,10 @@ np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -728,13 +759,13 @@ pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; - pentiumpro | p6 | 6x86 | athlon) + pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) @@ -755,22 +786,22 @@ power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown - ;; + ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown - ;; + ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; @@ -801,6 +832,12 @@ basic_machine=a29k-amd os=-udi ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -866,7 +903,7 @@ sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; - sv1) + sv1) basic_machine=sv1-cray os=-unicos ;; @@ -874,10 +911,6 @@ basic_machine=i386-sequent os=-dynix ;; - t3d) - basic_machine=alpha-cray - os=-unicos - ;; t3e) basic_machine=alphaev5-cray os=-unicos @@ -886,10 +919,22 @@ basic_machine=t90-cray os=-unicos ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; tx39) basic_machine=mipstx39-unknown ;; @@ -924,8 +969,8 @@ os=-vms ;; vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -946,11 +991,7 @@ basic_machine=hppa1.1-winbond os=-proelf ;; - windows32) - basic_machine=i386-pc - os=-windows32-msvcrt - ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; ymp) @@ -996,7 +1037,7 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh3eb | sh4eb) + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) @@ -1005,7 +1046,7 @@ sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -1020,10 +1061,6 @@ pmac | pmac-mpw) basic_machine=powerpc-apple ;; - c4x*) - basic_machine=c4x-none - os=-coff - ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; @@ -1086,11 +1123,12 @@ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* ) + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -microbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1102,8 +1140,10 @@ ;; esac ;; + -nto-qnx*) + ;; -nto*) - os=-nto-qnx + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ @@ -1155,7 +1195,7 @@ os=-rtmk-nova ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 ;; -nsk*) os=-nsk @@ -1194,8 +1234,14 @@ -xenix) os=-xenix ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos ;; -none) ;; @@ -1232,7 +1278,7 @@ pdp10-*) os=-tops20 ;; - pdp11-*) + pdp11-*) os=-none ;; *-dec | vax-*) @@ -1325,19 +1371,19 @@ *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) diff -urN gawk-3.1.1/configure.in gawk-3.1.2/configure.in --- gawk-3.1.1/configure.in 2002-04-29 15:23:32.000000000 +0300 +++ gawk-3.1.2/configure.in 2003-03-16 12:23:32.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl configure.in --- autoconf input file for gawk dnl -dnl Copyright (C) 1995-2002 the Free Software Foundation, Inc. +dnl Copyright (C) 1995-2003 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Programming Language. @@ -23,36 +23,53 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(awk.h) -AC_PREREQ(2.13) -AM_INIT_AUTOMAKE(gawk, 3.1.1) -AM_CONFIG_HEADER(config.h:configh.in) +dnl *** IMPORTANT ***: Fix version in both AC_INIT and AM_INIT_AUTOMAKE +AC_INIT([GNU Awk], 3.1.2, bug-gawk@gnu.org, gawk) + +# This is a hack. Different versions of install on different systems +# are just too different. Chuck it and use install-sh. +# +# If the user supplies $INSTALL, figure they know what they're doing. +# +# With Autoconf 2.5x, this needs to come very early on, but *after* +# the INIT macro. Sigh. + +if test "x$INSTALL" = "x" +then + INSTALL="$srcdir/install-sh -c" + export INSTALL +fi + +AC_PREREQ(2.57) +AC_CONFIG_HEADERS([config.h:configh.in], [cat $srcdir/custom.h >> config.h]) +AM_INIT_AUTOMAKE(gawk, 3.1.2) dnl Additional argument stuff -AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], AC_DEFINE(HAVE_PORTALS)) +AC_ARG_ENABLE(portals, [ --enable-portals Enable /p as path prefix for portals], AC_DEFINE(HAVE_PORTALS, 1, [we have portals on /p on this system])) AC_ARG_WITH(whiny-user-strftime, [ --with-whiny-user-strftime Force use of included version of strftime for deficient systems], if test "$withval" = yes then - AC_DEFINE(USE_INCLUDED_STRFTIME) + AC_DEFINE(USE_INCLUDED_STRFTIME, 1, + [force use of our version of strftime]) + fi +) +AC_ARG_ENABLE([lint], [ --disable-lint Disable gawk lint checking], + if test "$enableval" = no + then + AC_DEFINE(NO_LINT, 1, [disable lint checks]) fi ) dnl checks for programs +AC_PROG_EGREP AC_PROG_YACC AC_PROG_LN_S AC_PROG_CC AC_PROG_CPP AC_PROG_RANLIB -# This is a hack. Different versions of install on different systems -# are just too different. Chuck it and use install-sh. -# -# If the user supplies $INSTALL, figure they know what they're doing. -if test "x$INSTALL" = "x" -then - INSTALL="$srcdir/install-sh -c" - export INSTALL -fi +AC_OBJEXT +AC_EXEEXT AC_PROG_INSTALL @@ -95,8 +112,21 @@ AM_PROG_CC_STDC AM_C_PROTOTYPES +dnl Cygwin doesn't like to get libs with full paths +dnl since that overrides linking against DLLs. +case `(uname) 2> /dev/null` in +*CYGWIN*) + with_libiconv_prefix=no + with_libintl_prefix=no + LIBS="$LIBS /usr/lib/automode.o" + ;; +*) + ;; +esac + dnl initialize GNU gettext AM_GNU_GETTEXT([no-libtool], [need-ngettext]) +AM_GNU_GETTEXT_VERSION(0.11.5) dnl checks for header files AC_HEADER_STDC @@ -105,7 +135,7 @@ AC_CHECK_HEADERS(fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h signum.h stdarg.h string.h \ sys/param.h sys/socket.h sys/time.h unistd.h \ - wchar.h wctype.h) + termios.h stropts.h wchar.h wctype.h) if test "$ac_cv_header_string_h" = yes then @@ -119,55 +149,59 @@ AC_TYPE_SIGNAL AC_SIZE_T AC_TYPE_GETGROUPS -GAWK_AC_TYPE_SSIZE_T +AC_CHECK_TYPE(ssize_t, int) AC_EGREP_HEADER([int.*sprintf], stdio.h, - AC_DEFINE(SPRINTF_RET, int), + AC_DEFINE(SPRINTF_RET, int, [return type of sprintf]), AC_DEFINE(SPRINTF_RET, char *)) dnl see if time_t is defined in AC_TRY_COMPILE([#include ],[ time_t foo; foo = 0; ], - AC_DEFINE(TIME_T_IN_SYS_TYPES_H)) + AC_DEFINE(TIME_T_IN_SYS_TYPES_H, 1, + [some systems define this type here])) dnl checks for functions -AC_DEFINE(REGEX_MALLOC) +AC_DEFINE(REGEX_MALLOC, 1, [use malloc instead of alloca in regex.c]) AC_FUNC_VPRINTF -dnl one day use [ AC_CHECK_TYPE(ssize_t, int) ] GAWK_AC_FUNC_STRTOD_C89 AC_FUNC_MKTIME case "$ac_cv_func_working_mktime" in -yes) AC_DEFINE(HAVE_MKTIME) +yes) AC_DEFINE(HAVE_MKTIME, 1, [we have the mktime function]) ;; esac AC_CHECK_LIB(m, fmod) -AC_CHECK_FUNCS(getgroups memset memcpy memcmp fmod setlocale strchr strerror \ - strftime strncasecmp strtod system tzset mbrlen mbrtowc) +AC_CHECK_FUNCS(getgrent getgroups memset memcpy memcmp fmod setlocale strchr \ + strerror strftime strncasecmp strtod system tzset mbrlen mbrtowc \ + grantpt) dnl check for dynamic linking dnl This is known to be very primitive AC_CHECK_HEADER(dlfcn.h, - AC_CHECK_LIB(dl, dlopen, - AC_DEFINE(DYNAMIC) - LIBS="$LIBS -ldl" - if test "$GCC" = yes + [AC_DEFINE([DYNAMIC], 1, [dynamic loading is possible]) + if test "$GCC" = yes + then + # Add others here as appropriate, + # one day use GNU libtool. + if uname | $EGREP -i 'linux|freebsd|cygwin' > /dev/null then - # Add others here as appropriate, - # one day use GNU libtool. - if uname | egrep -i linux > /dev/null - then - LDFLAGS="$LDFLAGS -rdynamic" - fi + LDFLAGS="$LDFLAGS -export-dynamic" fi -)) + fi + + # Check this separately. Some systems have dlopen + # in libc. Notably freebsd and cygwin. + AC_CHECK_LIB(dl, dlopen) +]) dnl check for how to use getpgrp dnl have to hardwire it for VMS POSIX. Sigh. dnl ditto for BeOS, OS/2, and MS-DOS. case `(uname) 2> /dev/null` in *VMS*|*BeOS*|*OS/2*|*MS-DOS*) - AC_DEFINE(GETPGRP_VOID) + AC_DEFINE(GETPGRP_VOID, 1, + [Define to 1 if the getpgrp function requires zero arguments.]) ;; *) AC_FUNC_GETPGRP ;; @@ -188,14 +222,6 @@ AC_C_INLINE AC_C_STRINGIZE -dnl the following code is for OS/2 only and can be removed if autoconf 2.5x is used -dnl instead of autoconf 2.13 -PATH_SEPARATOR=':' -if test `uname` = 'OS/2'; then - PATH_SEPARATOR=';' -fi -AC_SUBST(PATH_SEPARATOR) - AC_OUTPUT(Makefile \ awklib/Makefile \ doc/Makefile \ diff -urN gawk-3.1.1/custom.h gawk-3.1.2/custom.h --- gawk-3.1.1/custom.h 2002-04-16 14:40:47.000000000 +0300 +++ gawk-3.1.2/custom.h 2002-10-28 10:16:12.000000000 +0200 @@ -2,12 +2,12 @@ * custom.h * * This file is for use on systems where Autoconf isn't quite able to - * get things right. It is included after config.h in awk.h, to override - * definitions from Autoconf that are erroneous. See the manual for more - * information. + * get things right. It is appended to the bottom of config.h by configure, + * in order to override definitions from Autoconf that are erroneous. See + * the manual for more information. * * If you make additions to this file for your system, please send me - * the information, to arnold@gnu.org. + * the information, to arnold@skeeve.com. */ /* @@ -37,7 +37,7 @@ #undef HAVE_STRERROR #endif -/* for VMS POSIX, from Pat Rankin, rankin@eql.caltech.edu */ +/* for VMS POSIX, from Pat Rankin, rankin@pactechdata.com */ #ifdef VMS_POSIX #undef VMS #include "vms/redirect.h" @@ -80,9 +80,15 @@ #define HAVE_MKTIME 1 #endif +#ifdef __WIN32__ +#undef HAVE_STRFTIME +/* #define system(s) os_system(s) */ +#endif + /* For ULTRIX 4.3 */ #ifdef ultrix #define HAVE_MKTIME 1 +#define GETGROUPS_NOT_STANDARD 1 #endif /* For whiny users */ diff -urN gawk-3.1.1/depcomp gawk-3.1.2/depcomp --- gawk-3.1.1/depcomp 2000-11-06 15:01:02.000000000 +0200 +++ gawk-3.1.2/depcomp 2003-03-06 11:11:51.000000000 +0200 @@ -18,6 +18,11 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then @@ -26,7 +31,16 @@ fi # `libtool' can also be set to `yes' or `no'. -depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} +if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" +fi + tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" @@ -48,6 +62,20 @@ fi case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: @@ -61,9 +89,10 @@ if test -z "$gccflag"; then gccflag=-MD, fi - if "$@" -Wp,"$gccflag$tmpdepfile"; then : + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : else - stat=$? rm -f "$tmpdepfile" exit $stat fi @@ -97,20 +126,6 @@ exit 1 ;; -dashmd) - # The Java front end to gcc doesn't run cpp, so we can't use the -Wp - # trick. Instead we must use -M and then rename the resulting .d - # file. This is also the case for older versions of gcc, which - # don't implement -Wp. - if "$@" -MD; then : - else - stat=$? - rm -f FIXME - exit $stat - fi - FIXME: rewrite the file - ;; - sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" @@ -120,7 +135,6 @@ stat=$? if test $stat -eq 0; then : else - stat=$? rm -f "$tmpdepfile" exit $stat fi @@ -129,19 +143,24 @@ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be + # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. tr ' ' ' -' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' ' ' ' >> $depfile + echo >> $depfile + # The second pass generates a dummy entry for each header file. tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -151,40 +170,156 @@ rm -f "$tmpdepfile" ;; +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. This file always lives in the current directory. + # Also, the AIX compiler puts `$object:' at the start of each line; + # $object doesn't have directory information. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Must come before tru64. + + # Intel's C compiler understands `-MD -MF file'. However + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir.libs/$base.d" + "$@" -Wc,-MD + else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - test -z "$dashmflag" && dashmflag=-M - ( IFS=" " - case " $* " in - *" --mode=compile "*) # this is libtool, let us make it quiet - for arg - do # cycle over the arguments - case "$arg" in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done + # always write the proprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg ;; esac - "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' @@ -202,36 +337,40 @@ ;; makedepend) - # X makedepend - ( - shift - cleared=no - for arg in "$@"; do - case $cleared in no) - set ""; shift - cleared=yes - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift;; - -*) - ;; - *) - set fnord "$@" "$arg"; shift;; - esac + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tail +3 "$tmpdepfile" | tr ' ' ' + sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. @@ -241,35 +380,39 @@ cpp) # Important note: in order to support this mode, a compiler *must* - # always write the proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done + # always write the proprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg ;; esac - "$@" -E | + done + + "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -281,32 +424,25 @@ # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done - ;; + shift + shift + ;; esac - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" diff -urN gawk-3.1.1/doc/ChangeLog gawk-3.1.2/doc/ChangeLog --- gawk-3.1.1/doc/ChangeLog 2002-05-01 16:41:54.000000000 +0300 +++ gawk-3.1.2/doc/ChangeLog 2003-03-19 14:24:28.000000000 +0200 @@ -1,3 +1,90 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Tue Mar 11 11:22:36 2003 Arnold D. Robbins + + * Makefile.am (man_MANS): Add pgawk.1. + * pgawk.1: New file, does `.so gawk.1' so that `man pgawk' will work. + Thanks to Nelson Beebe for pointing the need for this. + +Sun Feb 9 09:45:06 2003 Arnold D. Robbins + + * gawk.texi, gawkinet.texi: Per Karl Berry, change dircategory + to follow current standards. In gawkinet.texi, remove + bracketing ifinfo. + +Thu Feb 6 12:06:22 2003 Arnold D. Robbins + + * texinfo.tex: Updated to version 2003-02-03.16 from Texinfo 4.5. + +Tue Feb 4 15:21:46 2003 Arnold D. Robbins + + * awkcard.in: Redid the page-breaking. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Sun Jan 26 11:13:01 2003 Arnold D. Robbins + + * texinfo.tex: Updated to version 2003-01-24.17 from prep. + * gawk.texi: Documented asorti(), new elements in match() 3rd arg, + misc cleanups. Updated to FDL 1.2. + * awkcard.in, gawk.1: Ditto for asorti(), match(). + * gawkinet.texi: Updated to FDL 1.2. + +Thu Jan 16 18:34:54 2003 Arnold D. Robbins + + * texinfo.tex: Updated to version 2003-01-12.11 from prep. + +Sun Nov 24 17:55:23 2002 Arnold D. Robbins + + * texinfo.tex: Updated to version 2002-11-05.11 from Texinfo 4.3. + +Sun Nov 17 21:34:35 2002 Arnold D. Robbins + + * texinfo.tex: Updated to version 2002-10-13.14 from automake 1.7.1. + +Fri Nov 1 11:25:00 2002 Arnold D. Robbins + + From Kaveh Ghazi: + + * gawk.texi (grcat.c): Include stdlib.h. + (main): Fix format specifier warnings. + * gawk.texi (pwcat.c): Include config.h/stdlib.h. + (main): Fix format specifier warnings. + +Tue Jun 11 23:08:04 2002 Arnold D. Robbins + + * gawk.texi: Fix grcat code ifdef for HAVE_GETGRENT. + +2002-05-09 Paul Eggert + + [ ADR: Some minor post-patch editing was required. ] + + * gawk.texi (igawk): Do not put temporary files in /tmp, as that + has some security problems. This fixes a problem originally + reported by Jarno Huuskonen via solar@openwall.com. + + Fix the following problems with igawk while we're at it. + + * Report missing operands of options; this fixes e.g. an + infinite loop with "igawk -W". + + * Check for --source and -Wsource only, not -.source (which matches + errors). Similarly for other multichar options. + + * Do not use 'echo', as that mishandles backslashes. + +Mon May 13 01:25:40 2002 Arnold D. Robbins + + * gawkinet.texi: Change `ifinfo' to `ifnottex' around + the Top node. Thanks to Eli Zaretskii. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/doc/Makefile.am gawk-3.1.2/doc/Makefile.am --- gawk-3.1.1/doc/Makefile.am 2002-04-16 15:22:53.000000000 +0300 +++ gawk-3.1.2/doc/Makefile.am 2003-03-11 11:18:41.000000000 +0200 @@ -25,7 +25,7 @@ info_TEXINFOS = gawk.texi gawkinet.texi -man_MANS = gawk.1 igawk.1 +man_MANS = gawk.1 igawk.1 pgawk.1 EXTRA_DIST = ChangeLog README.card ad.block setter.outline \ awkcard.in awkforai.txt texinfo.tex cardfonts \ diff -urN gawk-3.1.1/doc/ad.block gawk-3.1.2/doc/ad.block --- gawk-3.1.1/doc/ad.block 2001-01-21 17:48:39.000000000 +0200 +++ gawk-3.1.2/doc/ad.block 2003-02-04 15:14:19.000000000 +0200 @@ -1,7 +1,7 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" This file is the Ad block (included in cover) .\" -.\" Copyright (C) 1996, 1998, 2000, 2001 Free Software Foundation, Inc. +.\" Copyright (C) 1996, 1998, 2000, 2001, 2003 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -40,8 +40,8 @@ .ce 5 .ft HB \*(CGSource Distributions on CD-ROM -Deluxe Distributions -Emacs, Gawk, Make and GDB Manuals +.\" Deluxe Distributions +Emacs, Make and GDB Manuals Emacs and GDB References\*(CX .EB "\f(HBOTHER FSF PRODUCTS:\*(FR" .ps diff -urN gawk-3.1.1/doc/awkcard.in gawk-3.1.2/doc/awkcard.in --- gawk-3.1.1/doc/awkcard.in 2002-04-16 14:32:24.000000000 +0300 +++ gawk-3.1.2/doc/awkcard.in 2003-02-04 15:21:00.000000000 +0200 @@ -1,6 +1,6 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@gnu.org .\" -.\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +.\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -24,6 +24,7 @@ .\" Strings to save typing .ds AK \*(FCawk\*(FR .ds GK \*(FCgawk\*(FR +.ds PK \*(FCpgawk\*(FR .ds NK Bell Labs \*(FCawk\*(FR .ds MK \*(FCmawk\*(FR .\" @@ -63,7 +64,7 @@ Expressions 11 Fields 6 FTP/HTTP Information 18 -Historical Features (\*(GK) 16 +Historical Features (\*(GK) 10 Input Control 12 Internationalization (\*(GK) 18 Lines And Statements 5 @@ -75,6 +76,7 @@ Printf Formats 13 Records 6 Regular Expressions 5 +Signals (\*(PK) 4 Special Filenames 14 String Functions 15 Time Functions (\*(GK) 16 @@ -97,7 +99,7 @@ \*(CD .SL .nf -\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002 +\*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. .nf .BT @@ -286,12 +288,16 @@ .T& ls l lw(2.2i). -\*(FC\-\^\-lint\*(FR[\*(FC=fatal\*(FR] +\*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR] %T{ warn about constructs that are dubious or non-portable to other \*(AKs. With an optional argument of \*(FCfatal\*(FR, lint warnings become fatal errors. +With an optional argument of +\*(FCinvalid\*(FR, +only warnings about things that are +actually invalid are issued. (This is not fully implemented yet.) T} .T& l lw(2.2i). @@ -323,9 +329,9 @@ %T{ send profiling data to \*(FIprof_file\*(FR (default: \*(FCawkprof.out\*(FR). -With \*(FIgawk\*(FR, +With \*(GK, the profile is just a ``pretty printed'' version of the program. -With \*(FIpgawk\*(FR, +With \*(PK, the profile contains execution counts in the left margin of each statement in the program. T} @@ -357,13 +363,7 @@ options are passed on to the AWK program in \*(FCARGV\*(FR for processing. This is most useful for running AWK -programs via the \*(FC#!\*(FR executable interpreter mechanism. -.sp .5 -\*(FIpgawk\fP accepts two signals. -\*(FCSIGUSR1\fP causes it to dump a profile and function call stack to the -profile file. It then continues to run. -\*(FCSIGHUP\fP -causes it to dump the profile and function call stack and then exit.\*(CB +programs via the \*(FC#!\*(FR executable interpreter mechanism.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(GK\f(HB)\*(FR\s0" .BT @@ -411,7 +411,16 @@ \*(FC\-Wv\*(FR and so on.\*(CB .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (\*(MK\f(HB)\*(FR\s0" - +.sp .7 +.\" --- Signals (pgawk) +.ES +.fi +\*(CD\*(PK accepts two signals. +\*(FCSIGUSR1\fP dumps a profile and function call stack to the +profile file. It then continues to run. +\*(FCSIGHUP\fP is similar, but exits.\*(CB +.EB "\s+2\f(HBSIGNALS (\*(PK\f(HB)\*(FR\s0" +.sp .7 .\" --- Awk Program Execution .ES .fi @@ -857,7 +866,13 @@ \*(CB\*(FCIGNORECASE\fP T{ if non-zero, all regular expression and string operations ignore case. -Array subscripting and \*(FCasort()\*(FR are \*(FInot\*(FR affected. +Array subscripting +is \*(FInot\*(FR affected. +However, the +\*(FCasort()\*(FR +and +\*(FCasorti()\*(FR +function are affected. T} \*(CB\*(FCLINT\fP T{ provides dynamic control of the \*(FC\-\^\-lint\fP @@ -873,12 +888,7 @@ number of fields in the current input record. T} \*(FCNR\fP T{ -total number of input records seen so far. -T} -\*(FCOFMT\fP T{ -output format for numbers, \*(FC"%.6g"\*(FR, by default. -\*(CROld versions of \*(AK used this for number -to string conversion.\*(CX +total number of input records seen so far.\*(CX T} .TE .EB "\s+2\f(HBVARIABLES\*(FR\s0" @@ -890,7 +900,12 @@ .TS expand; l lw(2i). -\*(CD\*(FCOFS\fP T{ +\*(CD\*(FCOFMT\fP T{ +output format for numbers, \*(FC"%.6g"\*(FR, by default. +\*(CROld versions of \*(AK used this for number +to string conversion.\*(CD +T} +\*(FCOFS\fP T{ output field separator, a space by default. T} \*(FCORS\fP T{ @@ -980,9 +995,27 @@ .BT +.\" --- Historical Features +.ES +.fi +\*(CD1. It is possible to call the \*(FClength()\fP +built-in function not only with no argument, but even without parentheses. +This feature is marked as ``deprecated'' in the POSIX standard, and \*(GK +issues a warning about its use if \*(FC\-\^\-lint\fP +is specified on the command line. +.sp .5 +2. The \*(FCcontinue\fP +and \*(FCbreak\fP statements may be used outside the body of a +\*(FCwhile\*(FR, \*(FCfor\*(FR, or \*(FCdo\fP loop. +Historical AWK implementations have treated such usage as +equivalent to the \*(FCnext\fP statement. +\*(GK supports this usage if \*(FC\-\^\-traditional\fP +is specified.\*(CB +.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0" + .ES \*(CX -.sp 61 +.sp 47 .EB "\s+2\f(HBNOTES\*(FR\s0" .BT @@ -1479,6 +1512,12 @@ If destination \*(FId\*(FR is supplied, \*(FIs\*(FR is copied to \*(FId\*(FR, \*(FId\*(FR is sorted, and \*(FIs\*(FR is unchanged.\*(CD .ti -.2i +\*(CB\*(FCasorti(\*(FIs\*(FC \*(FR[\*(FC, \*(FId\*(FR]\*(FC)\*(FR +.br +like \*(FCasort()\*(FR, but sorting is done on the indices, not +the values. The original values are thrown array, so provide a +second array to preserve the first.\*(CD +.ti -.2i \*(CB\*(FCgensub(\*(FIr\*(FC, \*(FIs\*(FC, \*(FIh \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR .br search the target string @@ -1527,7 +1566,13 @@ \*(CBIf \*(FIa\*(FR is supplied, the text matching all of \*(FIr\*(FR is placed in \*(FIa\*(FC[0]\*(FR. If there were parenthesized subexpressions, the matching texts are placed -in \*(FIa\*(FC[1]\*(FR, \*(FIa\*(FC[2]\*(FR, and so on.\*(CD +in \*(FIa\*(FC[1]\*(FR, \*(FIa\*(FC[2]\*(FR, and so on. +Subscripts +\*(FCa[\*(FIn\^\*(FC, "start"]\*(FR, +and +\*(FCa[\*(FIn\^\*(FC, "length"]\*(FR +provide the starting index in the string and length +respectively, of each matching substring.\*(CD .ti -.2i \*(FCsplit(\*(FIs\*(FC, \*(FIa \*(FR[\*(FC, \*(FIr\*(FR]\*(FC)\*(FR .br @@ -1556,9 +1601,18 @@ \*(FCsub(\*(FIr\*(FC, \*(FIs \*(FR[\*(FC, \*(FIt\*(FR]\*(FC)\*(FR .br just like -\*(FCgsub()\*(FR, but only the first matching substring is replaced. +\*(FCgsub()\*(FR, but only the first matching substring is replaced.\*(CX +.in -.2i +.EB "\s+2\f(HBSTRING FUNCTIONS\*(FR\s0" + +.BT + +.\" --- Builtin String Functions +.ES +.fi +.in +.2i .ti -.2i -\*(FCsubstr(\*(FIs\*(FC, \*(FIi \*(FR[\*(FC, \*(FIn\*(FR]\*(FC)\*(FR +\*(CD\*(FCsubstr(\*(FIs\*(FC, \*(FIi \*(FR[\*(FC, \*(FIn\*(FR]\*(FC)\*(FR .br returns the at most \*(FIn\*(FR-character substring of \*(FIs\fP starting at \*(FIi\*(FR. @@ -1569,18 +1623,9 @@ returns a copy of the string \*(FIstr\*(FR, with all the upper-case characters in \*(FIstr\fP translated to their corresponding lower-case counterparts. Non-alphabetic characters are -left unchanged.\*(CX -.in -.2i -.EB "\s+2\f(HBSTRING FUNCTIONS\*(FR\s0" - -.BT - -.\" --- Builtin String Functions -.ES -.fi -.in +.2i +left unchanged. .ti -.2i -\*(CD\*(FCtoupper(\*(FIstr\*(FC)\*(FR +\*(FCtoupper(\*(FIstr\*(FC)\*(FR .br returns a copy of the string \*(FIstr\*(FR, with all the lower-case characters in \*(FIstr\fP translated to their @@ -1684,24 +1729,6 @@ behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB .EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0" -.\" --- Historical Features -.ES -.fi -\*(CD1. It is possible to call the \*(FClength()\fP -built-in function not only with no argument, but even without parentheses. -This feature is marked as ``deprecated'' in the POSIX standard, and \*(GK -issues a warning about its use if \*(FC\-\^\-lint\fP -is specified on the command line. -.sp .5 -2. The \*(FCcontinue\fP -and \*(FCbreak\fP statements may be used outside the body of a -\*(FCwhile\*(FR, \*(FCfor\*(FR, or \*(FCdo\fP loop. -Historical AWK implementations have treated such usage as -equivalent to the \*(FCnext\fP statement. -\*(GK supports this usage if \*(FC\-\^\-traditional\fP -is specified.\*(CB -.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0" - .BT .\" --- User-defined Functions @@ -1833,15 +1860,16 @@ You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR to use the current domain. .ti -.2i -\*(FCdcngettext(\*(FIstring1 \*(FR, \*(FIstring2 \*(FR, \*(FInumber \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR +\*(FCdcngettext(\*(FIstring1\*(FC, \*(FIstring2\*(FC, \*(FInumber\*(FR [\*(FC, \*(FIdom \*(FR[\*(FC, \*(FIcat\*(FR]]\*(FC)\*(FR .br returns the plural form used for \*(FInumber\*(FR of the translation of \*(FIstring1\*(FR and \*(FIstring2\*(FR in text domain -\*(FIdomain\*(FR for locale category \*(FIcategory\*(FR. -The default value for \*(FIdomain\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. -The default value for \*(FIcategory\*(FR is \*(FC"LC_MESSAGES"\*(FR. +\*(FIdom\*(FR for locale category \*(FIcat\*(FR. +The default value for \*(FIdom\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. +\*(FC"LC_MESSAGES"\*(FR +is the default value for \*(FIcat\*(FR. .sp .5 -If you supply a value for \*(FIcategory\*(FR, it must be a string equal to +If you supply a value for \*(FIcat\*(FR, it must be a string equal to one of the known locale categories. You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR to use the current domain.\*(CB @@ -1853,7 +1881,7 @@ .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.1.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-3.1.2.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. @@ -1864,7 +1892,7 @@ .in +.2i .fi \*(NK. This version requires an ANSI C compiler; -GCC (the GNU C compiler) works well. +GCC (the GNU Compiler Collection) works well. .in -.2i .nf .sp .5 @@ -1880,7 +1908,7 @@ .\" --- Copying Permissions .ES .fi -\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +\*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice diff -urN gawk-3.1.1/doc/gawk.1 gawk-3.1.2/doc/gawk.1 --- gawk-3.1.1/doc/gawk.1 2002-04-16 14:02:26.000000000 +0300 +++ gawk-3.1.2/doc/gawk.1 2003-02-04 14:11:53.000000000 +0200 @@ -14,7 +14,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 16 2002" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "February 3 2003" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -265,10 +265,10 @@ these options cause an immediate, successful exit.) .TP .PD 0 -.BR "\-W lint" [ =fatal ] +.BR "\-W lint" [ =\fIvalue\fR ] .TP .PD -.BR \-\^\-lint [ =fatal ] +.BR \-\^\-lint [ =\fIvalue\fR ] Provide warnings about constructs that are dubious or non-portable to other \*(AK implementations. With an optional argument of @@ -276,6 +276,10 @@ lint warnings become fatal errors. This may be drastic, but its use will certainly encourage the development of cleaner \*(AK programs. +With an optional argument of +.BR invalid , +only warnings about things that are +actually invalid are issued. (This is not fully implemented yet.) .TP .PD 0 .B "\-W lint\-old" @@ -812,9 +816,12 @@ .B NOTE: Array subscripting is .I not -affected, nor is the +affected. +However, the .B asort() -function. +and +.B asorti() +functions are affected. .sp .5 Thus, if .B IGNORECASE @@ -2236,6 +2243,20 @@ source array .I s unchanged. +.TP "\w'\fBsprintf(\^\fIfmt\fB\^, \fIexpr-list\^\fB)\fR'u+1n" +\fBasorti(\fIs \fR[\fB, \fId\fR]\fB)\fR +Returns the number of elements in the source +array +.IR s . +The behavior is the same as that of +.BR asort() , +except that the array +.I indices +are used for sorting, not the array values. +When done, the array is indexed numerically, and +the values are those of the original indices. +The original values are lost; thus provide +a second array if you wish to preserve the original. .TP \fBgensub(\fIr\fB, \fIs\fB, \fIh \fR[\fB, \fIt\fR]\fB)\fR Search the target string @@ -2367,6 +2388,12 @@ .I s matched by the entire regular expression .IR r . +Subscripts +\fBa[\fIn\^\fB, "start"]\fR, +and +\fBa[\fIn\^\fB, "length"]\fR +provide the starting index in the string and length +respectively, of each matching substring. .TP \fBsplit(\fIs\fB, \fIa \fR[\fB, \fIr\fR]\fB)\fR Splits the string @@ -2459,7 +2486,7 @@ .PP .TP "\w'\fBsystime()\fR'u+1n" \fBmktime(\fIdatespec\fB)\fR -Rurns +Turns .I datespec into a time stamp of the same form as returned by .BR systime() . @@ -2782,6 +2809,12 @@ .ft B { print NR, $0 } .ft R +Run an external command for particular lines of data: + +.ft B + tail -f access_log | + awk '/myhome.html/ { system("nmap " $1 ">> logdir/myhome.html") }' +.ft R .fi .SH INTERNATIONALIZATION .PP @@ -3117,9 +3150,11 @@ The .BR and() , .BR asort() , +.BR asorti() , .BR bindtextdomain() , .BR compl() , .BR dcgettext() , +.BR dcngettext() , .BR gensub() , .BR lshift() , .BR mktime() , @@ -3321,7 +3356,7 @@ We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, -1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. +1997, 1998, 1999, 2001, 2002, 2003 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual page provided the copyright notice and this permission diff -urN gawk-3.1.1/doc/gawk.texi gawk-3.1.2/doc/gawk.texi --- gawk-3.1.1/doc/gawk.texi 2002-04-22 14:26:20.000000000 +0300 +++ gawk-3.1.2/doc/gawk.texi 2003-03-19 13:41:28.000000000 +0200 @@ -4,13 +4,13 @@ @settitle The GNU Awk User's Guide @c %**end of header (This is for running Texinfo on a region.) -@dircategory GNU Packages +@dircategory Text creation and manipulation @direntry -* Gawk: (gawk). A text scanning and processing language. +* Gawk: (gawk). A text scanning and processing language. @end direntry @dircategory Individual utilities @direntry -* awk: (gawk)Invoking gawk. Text scanning and processing. +* awk: (gawk)Invoking gawk. Text scanning and processing. @end direntry @c @set xref-automatic-section-title @@ -20,9 +20,9 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH April, 2002 +@set UPDATE-MONTH February, 2003 @set VERSION 3.1 -@set PATCHLEVEL 1 +@set PATCHLEVEL 2 @set FSF @@ -54,6 +54,14 @@ @set SUBSECTION subsection @set DARKCORNER (d.c.) @end ifhtml +@ifxml +@set DOCUMENT book +@set CHAPTER chapter +@set APPENDIX appendix +@set SECTION section +@set SUBSECTION subsection +@set DARKCORNER (d.c.) +@end ifxml @c some special symbols @iftex @@ -87,6 +95,10 @@ @syncodeindex fn cp @syncodeindex vr cp @end iftex +@ifxml +@syncodeindex fn cp +@syncodeindex vr cp +@end ifxml @c If "finalout" is commented out, the printed output will show @c black boxes that mark lines that are too long. Thus, it is @@ -98,7 +110,7 @@ @end iftex @copying -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -106,7 +118,7 @@ implementation of AWK. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -219,6 +231,7 @@ @end iftex @ifnottex +@ifnotxml @node Top, Foreword, (dir), (dir) @top General Introduction @c Preface node should come right after the Top @@ -230,6 +243,7 @@ @insertcopying +@end ifnotxml @end ifnottex @menu @@ -319,6 +333,7 @@ * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Locales:: How the locale affects things. * Records:: Controlling how data is split into records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. @@ -1099,13 +1114,13 @@ formatting language. A single Texinfo source file is used to produce both the printed and online versions of the documentation. -@iftex +@ifnotinfo Because of this, the typographical conventions are slightly different than in other books you may have read. -@end iftex -@ifnottex +@end ifnotinfo +@ifinfo This @value{SECTION} briefly documents the typographical conventions used in Texinfo. -@end ifnottex +@end ifinfo Examples you would type at the command-line are preceded by the common shell primary and secondary prompts, @samp{$} and @samp{>}. @@ -1121,7 +1136,7 @@ @error{} hello on stderr @end example -@iftex +@ifnotinfo In the text, command names appear in @code{this font}, while code segments appear in the same font and quoted, @samp{like this}. Some things are emphasized @emph{like this}, and if a point needs to be made @@ -1129,7 +1144,7 @@ a new term is usually its @dfn{definition} and appears in the same font as the previous occurrence of ``definition'' in this sentence. @value{FN}s are indicated like this: @file{/path/to/ourfile}. -@end iftex +@end ifnotinfo Characters that you type at the keyboard look @kbd{like this}. In particular, there are special characters called ``control characters.'' These are @@ -1844,6 +1859,10 @@ @end example @noindent +(We assume you have the current directory in your shell's search +path variable (typically @code{$PATH}). If not, you may need +to type @samp{./advice} at the shell.) + Self-contained @command{awk} scripts are useful when you want to write a program that users can invoke without their having to know that the program is written in @command{awk}. @@ -2453,7 +2472,7 @@ After the last line of output from @command{ls} has been processed, the @code{END} rule executes and prints the value of @code{sum}. -In this example, the value of @code{sum} is 140963. +In this example, the value of @code{sum} is 80600. These more advanced @command{awk} techniques are covered in later sections (@pxref{Action Overview, ,Actions}). Before you can move on to more @@ -2699,6 +2718,7 @@ * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Locales:: How the locale affects things. @end menu @node Regexp Usage, Escape Sequences, Regexp, Regexp @@ -3124,7 +3144,8 @@ containing the alternation operator, @samp{|}. For example, @samp{@@(samp|code)\@{[^@}]+\@}} matches both @samp{@@code@{foo@}} and @samp{@@samp@{bar@}}. -(These are Texinfo formatting control sequences.) +(These are Texinfo formatting control sequences. The @samp{+} is +explained further on in this list.) @cindex @code{*} (asterisk), @code{*} operator, as regexp operator @cindex asterisk (@code{*}), @code{*} operator, as regexp operator @@ -3556,7 +3577,9 @@ @item @code{--re-interval} Allow interval expressions in regexps, even if @option{--traditional} -has been provided. +has been provided. (@option{--posix} automatically enables +interval expressions, so @option{--re-interval} is redundant +when @option{--posix} is is used.) @end table @c ENDOFRANGE gregexp @c ENDOFRANGE regexpg @@ -3698,7 +3721,7 @@ and field splitting (@pxref{Records, ,How Input Is Split into Records}, and also @pxref{Field Separators, ,Specifying How Fields Are Separated}). -@node Computed Regexps, , Leftmost Longest, Regexp +@node Computed Regexps, Locales, Leftmost Longest, Regexp @section Using Dynamic Regexps @c STARTOFRANGE dregexp @@ -3814,6 +3837,46 @@ @c ENDOFRANGE regexpd @c ENDOFRANGE regexp +@node Locales, , Computed Regexps, Regexp +@section Where You Are Makes A Difference + +Modern systems support the notion of @dfn{locales}: a way to tell +the system about the local character set and language. The current +locale setting can affect the way regexp matching works, often +in surprising ways. In particular, many locales do case-insensitive +matching, even when you may have specified characters of only +one particular case. + +The following example uses the @code{sub} function, which +does text replacement +(@pxref{String Functions, , String-Manipulation Functions}). +Here, the intent is to remove trailing uppercase characters: + +@example +$ echo something1234abc | gawk '@{ sub("[A-Z]*$", ""); print @}' +@print{} something1234 +@end example + +@noindent +This output is unexpected, since the @samp{abc} at the end of @samp{something1234abc} +should not normally match @samp{[A-Z]*}. This result is due to the +locale setting (and thus you may not see it on your system). +There are two fixes. The first is to use the POSIX character +class @samp{[[:upper:]]}, instead of @samp{[A-Z]}. +The second is to change the locale setting in the environment, +before running @command{gawk}, +by using the shell statements: + +@example +LANG=C LC_ALL=C +export LANG LC_ALL +@end example + +The setting @samp{C} forces @command{gawk} to behave in the traditional +Unix manner, where case distinctions do matter. +You may wish to put these statements into your shell startup file, +e.g., @file{$HOME/.profile}. + @node Reading Files, Printing, Regexp, Top @chapter Reading Input Files @@ -4057,6 +4120,14 @@ @xref{Simple Sed, ,A Simple Stream Editor}, for a more useful example of @code{RS} as a regexp and @code{RT}. +If you set @code{RS} to a regular expression that allows optional +trailing text, such as @samp{RS = "abc(XYZ)?"} it is possible, due +to implementation constraints, that @command{gawk} may match the leading +part of the regular expression, but not the trailing part, particularly +if the input text that could match the trailing part is fairly long. +@command{gawk} attempts to avoid this problem, but currently, there's +no guarantee that this will never happen. + @cindex differences in @command{awk} and @command{gawk}, @code{RS}/@code{RT} variables The use of @code{RS} as a regular expression and the @code{RT} variable are @command{gawk} extensions; they are not available in @@ -4258,6 +4329,7 @@ @node Changing Fields, Field Separators, Nonconstant Fields, Reading Files @section Changing the Contents of a Field +@c STARTOFRANGE ficon @cindex fields, changing contents of The contents of a field, as seen by @command{awk}, can be changed within an @command{awk} program; this changes what @command{awk} perceives as the @@ -4268,9 +4340,9 @@ @example $ awk '@{ nboxes = $3 ; $3 = $3 - 10 > print nboxes, $3 @}' inventory-shipped -@print{} 13 3 -@print{} 15 5 -@print{} 15 5 +@print{} 25 15 +@print{} 32 22 +@print{} 24 14 @dots{} @end example @@ -4284,7 +4356,7 @@ (Someone in the warehouse made a consistent mistake while inventorying the red boxes.) -For this to work, the text in field @code{$2} must make sense +For this to work, the text in field @code{$3} must make sense as a number; the string of characters must be converted to a number for the computer to do arithmetic on it. The number resulting from the subtraction is converted back to a string of characters that @@ -4337,11 +4409,11 @@ @cindex field separators, See Also @code{OFS} This recomputation affects and is affected by @code{NF} (the number of fields; @pxref{Fields, ,Examining Fields}). -It is also affected by a feature that has not been discussed yet: -the @dfn{output field separator}, @code{OFS}, -used to separate the fields (@pxref{Output Separators}). For example, the value of @code{NF} is set to the number of the highest field you create. +The exact format of @code{$0} is also affected by a feature that has not been discussed yet: +the @dfn{output field separator}, @code{OFS}, +used to separate the fields (@pxref{Output Separators}). Note, however, that merely @emph{referencing} an out-of-range field does @emph{not} change the value of either @code{$0} or @code{NF}. @@ -4410,6 +4482,27 @@ @cindex portability, @code{NF} variable, decrementing @strong{Caution:} Some versions of @command{awk} don't rebuild @code{$0} when @code{NF} is decremented. Caveat emptor. + +Finally, there are times when it is convenient to force +@command{awk} to rebuild the entire record, using the current +value of the fields and @code{OFS}. To do this, use the +seemingly innocuous assignment: + +@example +$1 = $1 # force record to be reconstituted +print $0 # or whatever else with $0 +@end example + +@noindent +This forces @command{awk} rebuild the record. It does help +to add a comment, as we've shown here. + +There is a flip side to the relationship between @code{$0} and +the fields. Any assignment to @code{$0} causes the record to be +reparsed into fields using the @emph{current} value of @code{FS}. +This also applies to any built-in function that updates @code{$0}, +such as @code{sub} and @code{gsub} +(@pxref{String Functions, ,String-Manipulation Functions}). @c ENDOFRANGE ficon @node Field Separators, Constant Size, Changing Fields, Reading Files @@ -4759,10 +4852,17 @@ @node Field Splitting Summary, , Command Line Field Separator, Field Separators @subsection Field-Splitting Summary -The following -table -summarizes how fields are split, based on the -value of @code{FS} (@samp{==} means ``is equal to''): +It is important to remember that when you assign a string constant +as the value of @code{FS}, it undergoes normal @command{awk} string +processing. For example, with Unix @command{awk} and @command{gawk}, +the assignment @samp{FS = "\.."} assigns the character string @code{".."} +to @code{FS} (the backslash is stripped). This creates a regexp meaning +``fields are separated by occurrences of any two characters.'' +If instead you want fields to be separated by a literal period followed +by any single character, use @samp{FS = "\\.."}. + +The following table summarizes how fields are split, based on the value +of @code{FS} (@samp{==} means ``is equal to''): @table @code @item FS == " " @@ -4830,6 +4930,29 @@ @example root:nSijPlPhZZwgE:0:0:Root:/: @end example + +@c fakenode --- for prepinfo +@subheading Advanced Notes: @code{FS} and @code{IGNORECASE} + +The @code{IGNORECASE} variable +(@pxref{User-modified, ,Built-in Variables That Control @command{awk}}) +affects field splitting @emph{only} when the value of @code{FS} is a regexp. +It has no effect when @code{FS} is a single character, even if +that character is a letter. Thus, in the following code: + +@example +FS = "c" +IGNORECASE = 1 +$0 = "aCa" +print $1 +@end example + +@noindent +The output is @samp{aCa}. If you really want to split fields on an +alphabetic character while ignoring case, use a regexp that will +do it for you. E.g., @samp{FS = "[c]"}. In this case, @code{IGNORECASE} +will take effect. + @c ENDOFRANGE fisepr @c ENDOFRANGE fisepg @@ -5029,8 +5152,13 @@ separate the fields in the record. One way to do this is to divide each of the lines into fields in the normal manner. This happens by default as the result of a special feature. When @code{RS} is set to the empty -string, the newline character @emph{always} acts as a field separator. -This is in addition to whatever field separations result from @code{FS}. +string, @emph{and} @code{FS} is a set to a single character, +the newline character @emph{always} acts as a field separator. +This is in addition to whatever field separations result from +@code{FS}.@footnote{When @code{FS} is the null string (@code{""}) +or a regexp, this special feature of @code{RS} does not apply. +It does apply to the default field separator of a single space: +@samp{FS = " "}.} The original motivation for this special exception was probably to provide useful behavior in the default case (i.e., @code{FS} is equal @@ -5039,11 +5167,16 @@ prevent it. However, you can work around this by using the @code{split} function to break up the record manually (@pxref{String Functions, ,String Manipulation Functions}). +If you have a single character field separator, you can work around +the special feature in a different way, by making @code{FS} into a +regexp for that single character. For example, if the field +separator is a percent character, instead of +@samp{FS = "%"}, use @samp{FS = "[%]"}. Another way to separate fields is to put each field on a separate line: to do this, just set the -variable @code{FS} to the string @code{"\n"}. (This simple regular -expression matches a single newline.) +variable @code{FS} to the string @code{"\n"}. (This single +character seperator matches a single newline.) A practical example of a @value{DF} organized this way might be a mailing list, where each entry is separated by blank lines. Consider a mailing list in a file named @file{addresses}, which looks like this: @@ -5600,6 +5733,16 @@ @value{DARKCORNER} (@xref{BEGIN/END, , The @code{BEGIN} and @code{END} Special Patterns}, also @pxref{Auto-set, ,Built-in Variables That Convey Information}.) + +@item +Using @code{FILENAME} with @code{getline} +(@samp{getline < FILENAME}) +is likely to be a source for +confusion. @command{awk} opens a separate input stream from the +current input file. However, by not using a variable, @code{$0} +and @code{NR} are still updated. If you're doing this, it's +probably by accident, and you should reconsider what it is you're +trying to accomplish. @end itemize @node Getline Summary, , Getline Notes, Getline @@ -6978,6 +7121,12 @@ does not represent a file, pipe or coprocess that was opened with a redirection. +Note also that @samp{close(FILENAME)} has no +``magic'' effects on the implicit loop that reads through the +files named on the command line. It is, more likely, a close +of a file that was never opened, so @command{awk} silently +does nothing. + @c comma is part of tertiary @cindex @code{|} (vertical bar), @code{|&} operator (I/O), pipes, closing When using the @samp{|&} operator to communicate with a coprocess, @@ -7024,7 +7173,10 @@ In @command{gawk}, when closing a pipe or coprocess, -the return value is the exit status of the command. +the return value is the exit status of the command.@footnote{ +This is a full 16-bit value as returned by the @code{wait} +system call. See the system manual pages for information on +how to decode this value.} Otherwise, it is the return value from the system's @code{close} or @code{fclose} C functions when closing input or output files, respectively. @@ -7034,6 +7186,8 @@ The return value for closing a pipeline is particularly useful. It allows you to get the output from a command as well as its exit status. +@c 8/21/2002, FIXME: Maybe the code and this doc should be adjusted to +@c create values indicating death-by-signal? Sigh. @cindex pipes, closing @c comma does NOT start tertiary @@ -8916,8 +9070,6 @@ This table presents @command{awk}'s operators, in order of highest to lowest precedence: -@page - @c use @code in the items, looks better in TeX w/o all the quotes @table @code @item (@dots{}) @@ -9340,7 +9492,7 @@ with other patterns: @example -$ echo yes | gawk '(/1/,/2/) || /Yes/' +$ echo Yes | gawk '(/1/,/2/) || /Yes/' @error{} gawk: cmd. line:1: (/1/,/2/) || /Yes/ @error{} gawk: cmd. line:1: ^ parse error @error{} gawk: cmd. line:2: (/1/,/2/) || /Yes/ @@ -10325,7 +10477,7 @@ The following is an alphabetical list of variables that you can change to control how @command{awk} does certain things. The variables that are -specific to @command{gawk} are marked with a pound sign (@samp{#}). +specific to @command{gawk} are marked with a pound sign@w{ (@samp{#}).} @table @code @cindex @code{BINMODE} variable @@ -10430,7 +10582,9 @@ @code{gsub}, @code{index}, @code{match}, @code{split}, and @code{sub} functions, record termination with @code{RS}, and field splitting with @code{FS}, all ignore case when doing their particular regexp operations. -However, the value of @code{IGNORECASE} does @emph{not} affect array subscripting. +However, the value of @code{IGNORECASE} does @emph{not} affect array subscripting +and it does not affect field splitting when using a single-character +field separator. @xref{Case-sensitivity, ,Case Sensitivity in Matching}. @cindex @command{gawk}, @code{IGNORECASE} variable in @@ -10447,6 +10601,8 @@ behaves as if the @option{--lint} command-line option is in effect. (@pxref{Options, ,Command-Line Options}). With a value of @code{"fatal"}, lint warnings become fatal errors. +With a value of @code{"invalid"}, only warnings about things that are +actually invalid are issued. (This is not fully implemented yet.) Any other true value prints nonfatal warnings. Assigning a false value to @code{LINT} turns off the lint warnings. @@ -10551,7 +10707,7 @@ The following is an alphabetical list of variables that @command{awk} sets automatically on certain occasions in order to provide information to your program. The variables that are specific to -@command{gawk} are marked with an asterisk (@samp{*}). +@command{gawk} are marked with a pound sign@w{ (@samp{#}).} @table @code @cindex @code{ARGC}/@code{ARGV} variables @@ -10682,6 +10838,18 @@ @code{NF} is set each time a new record is read, when a new field is created or when @code{$0} changes (@pxref{Fields, ,Examining Fields}). +Unlike most of the variables described in this +@ifnotinfo +section, +@end ifnotinfo +@ifinfo +node, +@end ifinfo +assigning a value to @code{NF} has the potential to affect +@command{awk}'s internal workings. In particular, assignments +to @code{NF} can be used to create or remove fields from the +current record: @xref{Changing Fields, ,Changing the Contents of a Field}. + @cindex @code{NR} variable @item NR The number of input records @command{awk} has processed since @@ -11031,6 +11199,14 @@ 0 1 2 3 @r{Index} @end example @end ifinfo +@ifxml +@example ++---------+---------+--------+---------+ +| 8 | "foo" | "" | 30 | @r{Value} ++---------+---------+--------+---------+ + 0 1 2 3 @r{Index} +@end example +@end ifxml @noindent Only the values are stored; the indices are implicit from the order of @@ -11712,9 +11888,10 @@ writing a @code{sort} function. While this can be educational for exploring different sorting algorithms, usually that's not the point of the program. -@command{gawk} provides the built-in @code{asort} function +@command{gawk} provides the built-in @code{asort} +and @code{asorti} functions (@pxref{String Functions, ,String Manipulation Functions}) -that sorts an array. For example: +for sorting arrays. For example: @example @var{populate the array} data @@ -11749,7 +11926,24 @@ However, the @code{source} array is not affected. Often, what's needed is to sort on the values of the @emph{indices} -instead of the values of the elements. To do this, use a helper array +instead of the values of the elements. +To do that, starting with @command{gawk} 3.1.2, use the +@code{asorti} function. The interface is identical to that of +@code{asort}, except that the index values are used for sorting, and +become the values of the result array: + +@example +@{ source[$0] = some_func($0) @} + +END @{ + n = asorti(source, dest) + for (i = 1; i <= n; i++) + @var{do something with} dest[i] +@} +@end example + +If your version of @command{gawk} is 3.1.0 or 3.1.1, you don't +have @code{asorti}. Instead, use a helper array to hold the sorted index values, and then access the original array's elements. It works in the following way: @@ -11779,10 +11973,14 @@ @code{data} to @code{ind}, there is only one copy of the actual index strings. +@c Document It And Call It A Feature. Sigh. @cindex arrays, sorting, @code{IGNORECASE} variable and @cindex @code{IGNORECASE} variable, array sorting and -As with array subscripts, the value of @code{IGNORECASE} -does not affect array sorting. +We said previously that comparisons are done using @command{gawk}'s +``usual comparison rules.'' Because @code{IGNORECASE} affects +string comparisons, the value of @code{IGNORECASE} also +affects sorting for both @code{asort} and @code{asorti}. +Caveat Emptor. @c ENDOFRANGE arrs @node Functions, Internationalization, Arrays, Top @@ -11894,7 +12092,7 @@ The following list describes all of the built-in functions that work with numbers. -Optional parameters are enclosed in square brackets ([ ]): +Optional parameters are enclosed in square brackets@w{ ([ ]):} @table @code @item int(@var{x}) @@ -12021,9 +12219,9 @@ The functions in this @value{SECTION} look at or change the text of one or more strings. -Optional parameters are enclosed in square brackets ([ ]). +Optional parameters are enclosed in square brackets@w{ ([ ]).} Those functions that are -specific to @command{gawk} are marked with a pound sign (@samp{#}): +specific to @command{gawk} are marked with a pound sign@w{ (@samp{#}):} @menu * Gory Details:: More than you want to know about @samp{\} and @@ -12037,7 +12235,9 @@ @cindex @code{asort} function (@command{gawk}) @code{asort} is a @command{gawk}-specific extension, returning the number of elements in the array @var{source}. The contents of @var{source} are -sorted using @command{gawk}'s normal rules for comparing values, and the indices +sorted using @command{gawk}'s normal rules for comparing values +(in particular, @code{IGNORECASE} affects the sorting) +and the indices of the sorted values of @var{source} are replaced with sequential integers starting with one. If the optional array @var{dest} is specified, then @var{source} is duplicated into @var{dest}. @var{dest} is then @@ -12071,6 +12271,21 @@ @code{asort} is a @command{gawk} extension; it is not available in compatibility mode (@pxref{Options, ,Command-Line Options}). +@item asorti(@var{source} @r{[}, @var{dest}@r{]}) # +@cindex @code{asorti} function (@command{gawk}) +@code{asorti} is a @command{gawk}-specific extension, returning the number of +elements in the array @var{source}. +It works similarly to @code{asort}, however, the @emph{indices} +are sorted, instead of the values. As array indices are always strings, +the comparison performed is always a string comparison. (Here too, +@code{IGNORECASE} affects the sorting.) + +The @code{asorti} function is described in more detail in +@ref{Array Sorting, ,Sorting Array Values and Indices with @command{gawk}}. +It was added in @command{gawk} 3.1.2. +@code{asorti} is a @command{gawk} extension; it is not available +in compatibility mode (@pxref{Options, ,Command-Line Options}). + @item index(@var{in}, @var{find}) @cindex @code{index} function @cindex searching @@ -12118,6 +12333,13 @@ at which that substring begins (one, if it starts at the beginning of @var{string}). If no match is found, it returns zero. +The @var{regexp} argument may be either a regexp constant +(@samp{/@dots{}/}) or a string constant (@var{"@dots{}"}). +In the latter case, the string is treated as a regexp to be matched. +@ref{Computed Regexps, ,Using Dynamic Regexps}, for a +discussion of the difference between the two forms, and the +implications for writing your program correctly. + The order of the first two arguments is backwards from most other string functions that work with regular expressions, such as @code{sub} and @code{gsub}. It might help to remember that @@ -12191,6 +12413,23 @@ @print{} foooo barrrrr @end example +In addition, +beginning with @command{gawk} 3.1.2, +multidimensional subscripts are available providing +the start index and length of each matched subexpression: + +@example +$ echo foooobazbarrrrr | +> gawk '@{ match($0, /(fo+).+(bar*)/, arr) +> print arr[1], arr[2] +> print arr[1, "start"], arr[1, "length"] +> print arr[2, "start"], arr[2, "length"] +> @}' +@print{} foooo barrrrr +@print{} 1 5 +@print{} 9 7 +@end example + @cindex troubleshooting, @code{match} function The @var{array} argument to @code{match} is a @command{gawk} extension. In compatibility mode @@ -12237,17 +12476,30 @@ individual character in the string is split into its own array element. (This is a @command{gawk}-specific extension.) +Note, however, that @code{RS} has no effect on the way @code{split} +works. Even though @samp{RS = ""} causes newline to also be an input +field separator, this does not affect how @code{split} splits strings. + @cindex dark corner, @code{split} function Modern implementations of @command{awk}, including @command{gawk}, allow the third argument to be a regexp constant (@code{/abc/}) as well as a string. @value{DARKCORNER} The POSIX standard allows this as well. +@ref{Computed Regexps, ,Using Dynamic Regexps}, for a +discussion of the difference between using a string constant or a regexp constant, +and the implications for writing your program correctly. Before splitting the string, @code{split} deletes any previously existing elements in the array @var{array}. -If @var{string} does not match @var{fieldsep} at all, @var{array} has -one element only. The value of that element is the original @var{string}. + +If @var{string} is null, the array has no elements. (So this is a portable +way to delete an entire array with one statement. +@xref{Delete, ,The @code{delete} Statement}.) + +If @var{string} does not match @var{fieldsep} at all (but is not null), +@var{array} has one element only. The value of that element is the original +@var{string}. @item sprintf(@var{format}, @var{expression1}, @dots{}) @cindex @code{sprintf} function @@ -12297,11 +12549,22 @@ changed by replacing the matched text with @var{replacement}. The modified string becomes the new value of @var{target}. +The @var{regexp} argument may be either a regexp constant +(@samp{/@dots{}/}) or a string constant (@var{"@dots{}"}). +In the latter case, the string is treated as a regexp to be matched. +@ref{Computed Regexps, ,Using Dynamic Regexps}, for a +discussion of the difference between the two forms, and the +implications for writing your program correctly. + This function is peculiar because @var{target} is not simply used to compute a value, and not just any expression will do---it must be a variable, field, or array element so that @code{sub} can store a modified value there. If this argument is omitted, then the -default is to use and alter @code{$0}. +default is to use and alter @code{$0}.@footnote{Note that this means +that the record will first be regenerated using the value of @code{OFS} if +any fields have been changed, and that the fields will be updated +after the substituion, even if the operation is a ``no-op'' such +as @samp{sub(/^/, "")}.} For example: @example @@ -12477,7 +12740,11 @@ if @var{length} is greater than the number of characters remaining in the string, counting from character @var{start}. -If @var{start} is less than one or greater than the number of characters +If @var{start} is less than one, @code{substr} treats it as +if it was one. (POSIX doesn't specify what to do in this case: +Unix @command{awk} acts this way, and therefore @command{gawk} +does too.) +If @var{start} is greater than the number of characters in the string, @code{substr} returns the null string. Similarly, if @var{length} is present but less than or equal to zero, the null string is returned. @@ -13846,7 +14113,6 @@ 21.2 @end example -@page This function deletes all the elements in an array: @example @@ -14612,7 +14878,7 @@ file. Also included in the output are any constant strings that appear as the first argument to @code{dcgettext} or as the first and second argument to @code{dcngettext}.@footnote{Starting with @code{gettext} -version 0.11.1, the @command{xgettext} utility that comes with GNU +version 0.11.5, the @command{xgettext} utility that comes with GNU @code{gettext} can handle @file{.awk} files.} @xref{I18N Example, ,A Simple Internationalization Example}, for the full list of steps to go through to create and test @@ -14941,7 +15207,7 @@ @cite{GNU gettext tools}.) @end ifnotinfo As of this writing, the latest version of GNU @code{gettext} is -@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.1.tar.gz, @value{PVERSION} 0.11.1}. +@uref{ftp://ftp.gnu.org/gnu/gettext/gettext-0.11.5.tar.gz, @value{PVERSION} 0.11.5}. If a translation of @command{gawk}'s messages exists, then @command{gawk} produces usage messages, warnings, @@ -15100,7 +15366,7 @@ @example # write the data for processing -tempfile = ("/tmp/mydata." PROCINFO["pid"]) +tempfile = ("mydata." PROCINFO["pid"]) while (@var{not done with data}) print @var{data} | ("subprogram > " tempfile) close("subprogram > " tempfile) @@ -15113,7 +15379,10 @@ @end example @noindent -This works, but not elegantly. +This works, but not elegantly. Among other things, it requires that +the program be run in a directory that cannot be shared among users; +for example, @file{/tmp} will not do, as another user might happen +to be using a temporary file with the same name. @cindex coprocesses @cindex input/output, two-way @@ -15157,7 +15426,6 @@ @cindex deadlocks @cindex buffering, input/output @cindex @code{getline} command, deadlock and - @item I/O buffering may be a problem. @command{gawk} automatically flushes all output down the pipe to the child process. @@ -15215,6 +15483,26 @@ As a side note, the assignment @samp{LC_ALL=C} in the @command{sort} command ensures traditional Unix (ASCII) sorting from @command{sort}. +Beginning with @command{gawk} 3.1.2, you may use Pseudo-ttys (ptys) for +two-way communication instead of pipes, if your system supports them. +This is done on a per-command basis, by setting a special element +in the @code{PROCINFO} array +(@pxref{Auto-set, ,Built-in Variables That Convey Information}), +like so: + +@example +command = "sort -nr" # command, saved in variable for convenience +PROCINFO[command, "pty"] = 1 # update PROCINFO +print @dots{} |& command # start two-way pipe +@dots{} +@end example + +@noindent +Using ptys avoids the buffer deadlock issues described earlier, at some +loss in performance. If your system does not have ptys, or if all the +system's ptys are in use, @command{gawk} automatically falls back to +using regular pipes. + @node TCP/IP Networking, Portal Files, Two-way I/O, Advanced Features @section Using @command{gawk} for Network Programming @cindex advanced features, @command{gawk}, network programming @@ -15894,6 +16182,8 @@ lint warnings become fatal errors. This may be drastic, but its use will certainly encourage the development of cleaner @command{awk} programs. +With an optional argument of @samp{invalid}, only warnings about things that are +actually invalid are issued. (This is not fully implemented yet.) @item -W lint-old @itemx --lint-old @@ -17444,12 +17734,12 @@ which is specific to @command{gawk}. If you are not using @command{gawk}, you can use ideas presented in -@iftex +@ifnotinfo the previous @value{SECTION} -@end iftex -@ifnottex +@end ifnotinfo +@ifinfo @ref{Filetrans Function, ,Noting @value{DDF} Boundaries}, -@end ifnottex +@end ifinfo to either update @code{ARGIND} on your own or modify this code as appropriate. @@ -17990,12 +18280,26 @@ * Public Domain */ +#if HAVE_CONFIG_H +#include +#endif + @c endfile @end ignore @c file eg/lib/pwcat.c #include #include +@c endfile +@ignore +@c file eg/lib/pwcat.c +#if defined (STDC_HEADERS) +#include +#endif + +@c endfile +@end ignore +@c file eg/lib/pwcat.c int main(argc, argv) int argc; @@ -18004,12 +18308,12 @@ struct passwd *p; while ((p = getpwent()) != NULL) - printf("%s:%s:%d:%d:%s:%s:%s\n", - p->pw_name, p->pw_passwd, p->pw_uid, - p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); + printf("%s:%s:%ld:%ld:%s:%s:%s\n", + p->pw_name, p->pw_passwd, (long) p->pw_uid, + (long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); endpwent(); - exit(0); + return 0; @} @c endfile @end example @@ -18028,9 +18332,12 @@ @item User-ID The user's numeric user ID number. +(On some systems it's a C @code{long}, and not an @code{int}. Thus +we cast it to @code{long} for all cases.) @item Group-ID The user's numeric group ID number. +(Similar comments about @code{long} vs.@: @code{int} apply here.) @item Full name The user's full name, and perhaps other information associated with the @@ -18328,9 +18635,13 @@ #if HAVE_CONFIG_H #include #endif + +#if defined (STDC_HEADERS) +#include +#endif -#ifndef HAVE_GETPGRENT -int main() { exit(0); } +#ifndef HAVE_GETGRENT +int main() { return 0; } #else @c endfile @end ignore @@ -18347,8 +18658,8 @@ int i; while ((g = getgrent()) != NULL) @{ - printf("%s:%s:%d:", g->gr_name, g->gr_passwd, - g->gr_gid); + printf("%s:%s:%ld:", g->gr_name, g->gr_passwd, + (long) g->gr_gid); for (i = 0; g->gr_mem[i] != NULL; i++) @{ printf("%s", g->gr_mem[i]); @group @@ -18359,13 +18670,13 @@ putchar('\n'); @} endgrent(); - exit(0); + return 0; @} @c endfile @end example @ignore @c file eg/lib/grcat.c -#endif /* HAVE_GETPGRENT */ +#endif /* HAVE_GETGRENT */ @c endfile @end ignore @@ -18383,6 +18694,8 @@ @item Group ID Number The numeric group ID number. This number is unique within the file. +(On some systems it's a C @code{long}, and not an @code{int}. Thus +we cast it to @code{long} for all cases.) @item Group Member List A comma-separated list of usernames. These users are members of the group. @@ -21378,8 +21691,11 @@ including the ability to have multiple source files specified via @option{-f}, and the ability to mix command-line and library source files. -The program is written using the POSIX Shell (@command{sh}) command language. -It works as follows: +The program is written using the POSIX Shell (@command{sh}) command +language.@footnote{Fully explaining the @command{sh} language is beyond +the scope of this book. We provide some minimal explanations, but see +a good shell programming book if you wish to understand things in more +depth.} It works as follows: @enumerate @item @@ -21388,38 +21704,38 @@ @item For any arguments that do represent @command{awk} text, put the arguments into -a temporary file that will be expanded. There are two cases: +a shell variable that will be expanded. There are two cases: @enumerate a @item Literal text, provided with @option{--source} or @option{--source=}. This -text is just echoed directly. The @command{echo} program automatically -supplies a trailing newline. +text is just appended directly. @item -Source @value{FN}s, provided with @option{-f}. We use a neat trick and echo -@samp{@@include @var{filename}} into the temporary file. Since the file-inclusion +Source @value{FN}s, provided with @option{-f}. We use a neat trick and append +@samp{@@include @var{filename}} to the shell variable's contents. Since the file-inclusion program works the way @command{gawk} does, this gets the text of the file included into the program at the correct point. @end enumerate @item -Run an @command{awk} program (naturally) over the temporary file to expand +Run an @command{awk} program (naturally) over the shell variable's contents to expand @samp{@@include} statements. The expanded program is placed in a second -temporary file. +shell variable. @item Run the expanded program with @command{gawk} and any other original command-line arguments that the user supplied (such as the data @value{FN}s). @end enumerate -The initial part of the program turns on shell tracing if the first -argument is @samp{debug}. Otherwise, a shell @code{trap} statement -arranges to clean up any temporary files on program exit or upon an -interrupt. +This program uses shell variables extensively; for storing command line arguments, +the text of the @command{awk} program that will expand the user's program, for the +user's original program, and for the expanded program. Doing so removes some +potential problems that might arise were we to use temporary files instead, +at the cost of making the script somewhat more complicated. -@c 2e: For the temp file handling, go with Darrel's ig=${TMP:-/tmp}/igs.$$ -@c 2e: or something as similar as possible. +The initial part of the program turns on shell tracing if the first +argument is @samp{debug}. The next part loops through all the command-line arguments. There are several cases of interest: @@ -21440,13 +21756,17 @@ These are saved and passed on to @command{gawk}. @item -f@r{,} --file@r{,} --file=@r{,} -Wfile= -The @value{FN} is saved to the temporary file @file{/tmp/ig.s.$$} with an +The @value{FN} is appended to the shell variable @code{program} with an @samp{@@include} statement. -The @command{sed} utility is used to remove the leading option part of the +The @command{expr} utility is used to remove the leading option part of the argument (e.g., @samp{--file=}). +(Typical @command{sh} usage would be to use the @command{echo} and @command{sed} +utilities to do this work. Unfortunately, some versions of @command{echo} evaluate +escape sequences in their arguments, possibly mangling the program text. +Using @command{expr} avoids this problem.) @item --source@r{,} --source=@r{,} -Wsource= -The source text is echoed into @file{/tmp/ig.s.$$}. +The source text is appended to @code{program}. @item --version@r{,} -Wversion @command{igawk} prints its version number, runs @samp{gawk --version} @@ -21457,17 +21777,11 @@ or @option{-Wsource} arguments are supplied, then the first nonoption argument should be the @command{awk} program. If there are no command-line arguments left, @command{igawk} prints an error message and exits. -Otherwise, the first argument is echoed into @file{/tmp/ig.s.$$}. +Otherwise, the first argument is appended to @code{program}. In any case, after the arguments have been processed, -@file{/tmp/ig.s.$$} contains the complete text of the original @command{awk} +@code{program} contains the complete text of the original @command{awk} program. -@cindex @command{sed} utility -@cindex stream editors -The @samp{$$} in @command{sh} represents the current process ID number. -It is often used in shell programs to generate unique temporary @value{FN}s. -This allows multiple users to run @command{igawk} without worrying -that the temporary @value{FN}s will clash. The program is as follows: @cindex @code{igawk.sh} program @@ -21489,49 +21803,56 @@ then set -x shift -else - # cleanup on exit, hangup, interrupt, quit, termination - trap 'rm -f /tmp/ig.[se].$$' 0 1 2 3 15 fi +# A literal newline, so that program text is formmatted correctly +n=' +' + +# Initialize variables to empty +program= +opts= + while [ $# -ne 0 ] # loop over arguments do case $1 in --) shift; break;; -W) shift - set -- -W"$@@" + # The $@{x?'message here'@} construct prints a + # diagnostic if $x is the null string + set -- -W"$@{@@?'missing operand'@}" continue;; - -[vF]) opts="$opts $1 '$2'" + -[vF]) opts="$opts $1 '$@{2?'missing operand'@}'" shift;; -[vF]*) opts="$opts '$1'" ;; - -f) echo @@include "$2" >> /tmp/ig.s.$$ + -f) program="$program$n@@include $@{2?'missing operand'@}" shift;; - -f*) f=`echo "$1" | sed 's/-f//'` - echo @@include "$f" >> /tmp/ig.s.$$ ;; + -f*) f=`expr "$1" : '-f\(.*\)'` + program="$program$n@@include $f";; - -?file=*) # -Wfile or --file - f=`echo "$1" | sed 's/-.file=//'` - echo @@include "$f" >> /tmp/ig.s.$$ ;; + -[W-]file=*) + f=`expr "$1" : '-.file=\(.*\)'` + program="$program$n@@include $f";; - -?file) # get arg, $2 - echo @@include "$2" >> /tmp/ig.s.$$ + -[W-]file) + program="$program$n@@include $@{2?'missing operand'@}" shift;; - -?source=*) # -Wsource or --source - t=`echo "$1" | sed 's/-.source=//'` - echo "$t" >> /tmp/ig.s.$$ ;; + -[W-]source=*) + t=`expr "$1" : '-.source=\(.*\)'` + program="$program$n$t";; - -?source) # get arg, $2 - echo "$2" >> /tmp/ig.s.$$ + -[W-]source) + program="$program$n$@{2?'missing operand'@}" shift;; - -?version) - echo igawk: version 1.0 1>&2 + -[W-]version) + echo igawk: version 2.0 1>&2 gawk --version exit 0 ;; @@ -21542,26 +21863,20 @@ shift done -if [ ! -s /tmp/ig.s.$$ ] +if [ -z "$program" ] then -@group - if [ -z "$1" ] - then - echo igawk: no program! 1>&2 - exit 1 -@end group - else - echo "$1" > /tmp/ig.s.$$ - shift - fi + program=$@{1?'missing program'@} + shift fi -# at this point, /tmp/ig.s.$$ has the program +# At this point, `program' has the program. @c endfile @end example The @command{awk} program to process @samp{@@include} directives -reads through the program, one line at a time, using @code{getline} +is stored in the shell variable @code{expand_prog}. Doing this keeps +the shell script readable. The @command{awk} program +reads through the user's program, one line at a time, using @code{getline} (@pxref{Getline, ,Explicit Input with @code{getline}}). The input @value{FN}s and @samp{@@include} statements are managed using a stack. As each @samp{@@include} is encountered, the current @value{FN} is @@ -21595,8 +21910,7 @@ @example @c file eg/prog/igawk.sh -gawk -- ' -# process @@include directives +expand_prog=' function pathto(file, i, t, junk) @{ @@ -21635,7 +21949,7 @@ @c endfile @end example -The stack is initialized with @code{ARGV[1]}, which will be @file{/tmp/ig.s.$$}. +The stack is initialized with @code{ARGV[1]}, which will be @file{/dev/stdin}. The main loop comes next. Input lines are read in succession. Lines that do not start with @samp{@@include} are printed verbatim. If the line does start with @samp{@@include}, the @value{FN} is in @code{$2}. @@ -21681,14 +21995,44 @@ @} close(input[stackptr]) @} -@}' /tmp/ig.s.$$ > /tmp/ig.e.$$ +@}' # close quote ends `expand_prog' variable + +processed_program=`gawk -- "$expand_prog" /dev/stdin < +@c now rankin@pactechdata.com @cindex installation, vms This @value{SUBSECTION} describes how to compile and install @command{gawk} under VMS. @@ -23955,7 +24348,7 @@ @cindex Rankin, Pat @item VMS -Pat Rankin, @email{rankin@@eql.caltech.edu}. +Pat Rankin, @email{rankin@@pactechdata.com}. @end table @end ignore @@ -23980,7 +24373,7 @@ @item Tandem @tab Stephen Davies, @email{scldad@@sdc.com.au}. @cindex Rankin, Pat -@item VMS @tab Pat Rankin, @email{rankin@@eql.caltech.edu}. +@item VMS @tab Pat Rankin, @email{rankin@@pactechdata.com}. @end multitable If your bug is also reproducible under Unix, please send a copy of your @@ -24117,12 +24510,22 @@ The @command{awk} translator is released under the GPL, and the library is under the LGPL. -@ignore -To get @command{awka}, go to its home page at -Go to @uref{http://awka.sourceforge.net}. -@end ignore To get @command{awka}, go to @uref{http://awka.sourceforge.net}. -You can reach Andrew Sumner at @email{andrew_sumner@@bigfoot.com}. +You can reach Andrew Sumner at @email{andrew@@zbcom.net}. + +@cindex Beebe, Nelson H.F. +@cindex @command{pawk} profiling Bell Labs @command{awk} +@item @command{pawk} +Nelson H.F.@: Beebe at the University of Utah has modified +the Bell Labs @command{awk} to provide timing and profiling information. +It is different from @command{pgawk} +(@pxref{Profiling, ,Profiling Your @command{awk} Programs}), +in that it uses CPU-based profiling, not line-count +profiling. You may find it at either +@uref{ftp://ftp.math.utah.edu/pub/pawk/pawk-20020210.tar.gz} +or +@uref{http://www.math.utah.edu/pub/pawk/pawk-20020210.tar.gz}. + @end table @c ENDOFRANGE gligawk @c ENDOFRANGE ingawk @@ -24234,7 +24637,10 @@ the GNU Project's @command{ftp} site, at -@uref{ftp://ftp.gnu.org/gnu/GNUInfo/standards.text}. +@uref{ftp://ftp.gnu.org/gnu/GNUinfo/standards.text}. +An HTML version, suitable for reading with a WWW browser, is +available at +@uref{http://www.gnu.org/prep/standards_toc.html}. Texinfo, Info, and DVI versions are also available.) @cindex @command{gawk}, coding style in @@ -25275,11 +25681,6 @@ perform better: @table @asis -@item An improved version of @code{dfa} -The @code{dfa} pattern matcher from GNU @command{grep} has some -problems. Either a new version or a fixed one will deal with some -important regexp matching issues. - @c NEXT ED: remove this item. awka and mawk do these respectively @item Compilation of @command{awk} programs @command{gawk} uses a Bison (YACC-like) @@ -25712,7 +26113,7 @@ David Goldberg, ``What Every Computer Scientist Should Know About Floating-point Arithmetic,'' @cite{ACM Computing Surveys} @strong{23}, 1 (1991-03), -5-48.@footnote{@uref{http://www.validgh.com/goldberg/paper.ps}.} +5-48.@footnote{@uref{http://www.validlab.com/goldberg/paper.ps}.} This is worth reading if you are interested in the details, but it does require a background in computer science. @@ -25899,12 +26300,12 @@ @item Bash The GNU version of the standard shell -@iftex +@ifnotinfo (the @b{B}ourne-@b{A}gain @b{SH}ell). -@end iftex -@ifnottex +@end ifnotinfo +@ifinfo (the Bourne-Again SHell). -@end ifnottex +@end ifinfo See also ``Bourne Shell.'' @item BBS @@ -26915,32 +27316,33 @@ library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. -@node GNU Free Documentation License, Index, Copying, Top +@node GNU Free Documentation License @unnumbered GNU Free Documentation License -@center Version 1.1, March 2000 + @cindex FDL (Free Documentation License) @cindex Free Documentation License (FDL) @cindex GNU Free Documentation License +@center Version 1.2, November 2002 @display -Copyright (C) 2000 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display -@sp 1 + @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other -written document ``free'' in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It @@ -26955,60 +27357,72 @@ whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. -@sp 1 @item APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The ``Document'', below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as ``you''. +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A ``Secondary Section'' is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and +general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not ``Transparent'' is called ``Opaque''. +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material @@ -27016,7 +27430,22 @@ formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -@sp 1 + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + @item VERBATIM COPYING @@ -27032,13 +27461,14 @@ You may also lend copies, under the same conditions stated above, and you may publicly display copies. -@sp 1 + @item COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present @@ -27056,21 +27486,20 @@ If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. -@sp 1 + @item MODIFICATIONS @@ -27093,7 +27522,8 @@ List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the -Document (all of its principal authors, if it has less than five). +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. @item State on the Title page the name of the publisher of the @@ -27119,10 +27549,10 @@ Include an unaltered copy of this License. @item -Preserve the section entitled ``History'', and its title, and add to -it an item stating at least the title, year, new authors, and +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If -there is no section entitled ``History'' in the Document, create one +there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @@ -27137,10 +27567,10 @@ publisher of the version it refers to gives permission. @item -In any section entitled ``Acknowledgements'' or ``Dedications'', -preserve the section's title, and preserve in the section all the -substance and tone of each of the contributor acknowledgements -and/or dedications given therein. +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. @item Preserve all the Invariant Sections of the Document, @@ -27148,12 +27578,15 @@ or the equivalent are not considered part of the section titles. @item -Delete any section entitled ``Endorsements''. Such a section +Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item -Do not retitle any existing section as ``Endorsements'' -or to conflict in title with any Invariant Section. +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or @@ -27163,9 +27596,9 @@ list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -You may add a section entitled ``Endorsements'', provided it contains +You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has +parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. @@ -27182,7 +27615,7 @@ The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -@sp 1 + @item COMBINING DOCUMENTS @@ -27191,7 +27624,7 @@ versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its -license notice. +license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single @@ -27202,12 +27635,12 @@ Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -In the combination, you must combine any sections entitled ``History'' -in the various original documents, forming one section entitled -``History''; likewise combine any sections entitled ``Acknowledgements'', -and any sections entitled ``Dedications''. You must delete all sections -entitled ``Endorsements.'' -@sp 1 +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + @item COLLECTIONS OF DOCUMENTS @@ -27221,25 +27654,27 @@ it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -@sp 1 + @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an ``aggregate'', and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. -@sp 1 +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + @item TRANSLATION @@ -27249,11 +27684,18 @@ permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. -@sp 1 +translation of this License, and all the license notices in the +Document, and any Warrany Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + @item TERMINATION @@ -27264,7 +27706,7 @@ parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -@sp 1 + @item FUTURE REVISIONS OF THIS LICENSE @@ -27282,7 +27724,6 @@ Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - @end enumerate @c fakenode --- for prepinfo @@ -27294,27 +27735,41 @@ @smallexample @group - Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 + under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; - with the Invariant Sections being @var{list their titles}, with the - Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample -If you have no Invariant Sections, write ``with no Invariant Sections'' -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write ``no Front-Cover Texts'' instead of -``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts. + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with...Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + + @node Index, , GNU Free Documentation License, Top @unnumbered Index @printindex cp diff -urN gawk-3.1.1/doc/gawkinet.texi gawk-3.1.2/doc/gawkinet.texi --- gawk-3.1.1/doc/gawkinet.texi 2002-04-16 15:17:03.000000000 +0300 +++ gawk-3.1.2/doc/gawkinet.texi 2003-03-19 13:54:56.000000000 +0200 @@ -5,13 +5,10 @@ @c %**end of header (This is for running Texinfo on a region.) @c FIXME: web vs. Web -@c inside ifinfo for older versions of texinfo.tex -@ifinfo -@dircategory GNU Packages +@dircategory Text creation and manipulation @direntry -* Gawkinet: (gawkinet). TCP/IP Internetworking With @command{gawk}. +* Gawkinet: (gawkinet). TCP/IP Internetworking With `gawk'. @end direntry -@end ifinfo @iftex @set DOCUMENT book @@ -78,7 +75,7 @@ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. @sp 2 Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.1 or +under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -142,7 +139,7 @@ @oddheading @| @| @strong{@thischapter}@ @ @ @thispage @end iftex -@ifinfo +@ifnottex @node Top, Preface, (dir), (dir) @top General Introduction @comment node-name, next, previous, up @@ -151,7 +148,7 @@ version 3.1 and later. @insertcopying -@end ifinfo +@end ifnottex @menu * Preface:: About this document. @@ -350,13 +347,13 @@ The price the user pays for the lower overhead of datagram communications is exactly the lower reliability; it is often necessary for user-level -protocols that use datagram communications to add their own reliabilty +protocols that use datagram communications to add their own reliability features on top of the basic communications. @node The TCP/IP Protocols, Making Connections, Datagram Communications, Introduction @section The Internet Protocols -The Internet Protocol Suite (usually referred as just TCP/IP)@footnote{ +The Internet Protocol Suite (usually referred to as just TCP/IP)@footnote{ It should be noted that although the Internet seems to have conquered the world, there are other networking protocol suites in existence and in use.} consists of a number of different protocols at different levels or ``layers.'' @@ -395,7 +392,7 @@ All other user-level protocols use either TCP or UDP to do their basic communications. Examples are SMTP (Simple Mail Transfer Protocol), -FTP (File Transfer Protocol) and HTTP (HyperText Transfer Protocol). +FTP (File Transfer Protocol), and HTTP (HyperText Transfer Protocol). @cindex SMTP (Simple Mail Transfer Protocol) @cindex FTP (File Transfer Protocol) @cindex HTTP (Hypertext Transfer Protocol) @@ -405,7 +402,7 @@ In the postal system, the address on an envelope indicates a physical location, such as a residence or office building. But there may be -more than one person at the location; thus you have to further quantify +more than one person at a location; thus you have to further quantify the recipient by putting a person or company name on the envelope. In the phone system, one phone number may represent an entire company, @@ -415,14 +412,14 @@ IP networking provides the concept of addressing. An IP address represents a particular computer, but no more. In order to reach the mail service -on a system, or the FTP or WWW service on a system, you have to have some +on a system, or the FTP or WWW service on a system, you must have some way to further specify which service you want. In the Internet Protocol suite, this is done with @dfn{port numbers}, which represent the services, much like an extension number used with a phone number. Port numbers are 16-bit integers. Unix and Unix-like systems reserve ports below 1024 for ``well known'' services, such as SMTP, FTP, and HTTP. -Numbers above 1024 may be used by any application, although there is no +Numbers 1024 and above may be used by any application, although there is no promise made that a particular port number is always available. @node Making Connections, , The TCP/IP Protocols, Introduction @@ -445,7 +442,7 @@ For this to work though, the server must be expecting connections. Much as there has to be someone at the office building to answer the phone@footnote{In the days before voice mail systems!}, the -server process (usually) has to be started first and waiting +server process (usually) has to be started first and be waiting for a connection. @cindex clients @@ -464,11 +461,13 @@ @cindex blocking @cindex synchronous communications -Furthermore, once the connection is established, communications -are @dfn{synchronous}. I.e., each end waits on the other to finish -transmitting, before replying. This is much like two people in a phone -conversation. While both could talk simultaneously, doing so usually -doesn't work too well. +Furthermore, once the connection is established, communications are +@dfn{synchronous}.@footnote{For the technically savvy, data reads +block---if there's no incoming data, the program is made to wait until +there is, instead of receiving a ``there's no data'' error return.} I.e., +each end waits on the other to finish transmitting, before replying. This +is much like two people in a phone conversation. While both could talk +simultaneously, doing so usually doesn't work too well. In the case of TCP, the synchronicity is enforced by the protocol when sending data. Data writes @dfn{block} until the data have been received on the @@ -1076,7 +1075,7 @@ their TCP/IP implementation to Microsoft Windows for Workgroups 3.11, but it was a rather rudimentary and half-hearted implementation. Nevertheless, the equivalent of @file{/etc/services} resides under -@file{c:\windows\services} on Microsoft Windows.} +@file{C:\WINNT\system32\drivers\etc\services} on Microsoft Windows 2000.} The first column of the file gives the name of the service, and the second column gives a unique number and the protocol that one can use to connect to this service. @@ -4721,29 +4720,33 @@ @end table -@node GNU Free Documentation License, Index, Links, Top +@node GNU Free Documentation License @unnumbered GNU Free Documentation License -@center Version 1.1, March 2000 + +@cindex FDL (Free Documentation License) +@cindex Free Documentation License (FDL) +@cindex GNU Free Documentation License +@center Version 1.2, November 2002 @display -Copyright (C) 2000 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display -@sp 1 + @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other -written document ``free'' in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It @@ -4758,60 +4761,72 @@ whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. -@sp 1 @item APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The ``Document'', below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as ``you''. +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A ``Secondary Section'' is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and +general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not ``Transparent'' is called ``Opaque''. +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. +@sc{ascii} without markup, Texinfo input format, La@TeX{} input +format, @acronym{SGML} or @acronym{XML} using a publicly available +@acronym{DTD}, and standard-conforming simple @acronym{HTML}, +PostScript or @acronym{PDF} designed for human modification. Examples +of transparent image formats include @acronym{PNG}, @acronym{XCF} and +@acronym{JPG}. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, @acronym{SGML} or +@acronym{XML} for which the @acronym{DTD} and/or processing tools are +not generally available, and the machine-generated @acronym{HTML}, +PostScript or @acronym{PDF} produced by some word processors for +output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material @@ -4819,7 +4834,22 @@ formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -@sp 1 + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + @item VERBATIM COPYING @@ -4835,13 +4865,14 @@ You may also lend copies, under the same conditions stated above, and you may publicly display copies. -@sp 1 + @item COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present @@ -4859,21 +4890,20 @@ If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. -@sp 1 + @item MODIFICATIONS @@ -4896,7 +4926,8 @@ List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the -Document (all of its principal authors, if it has less than five). +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. @item State on the Title page the name of the publisher of the @@ -4922,10 +4953,10 @@ Include an unaltered copy of this License. @item -Preserve the section entitled ``History'', and its title, and add to -it an item stating at least the title, year, new authors, and +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If -there is no section entitled ``History'' in the Document, create one +there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @@ -4940,10 +4971,10 @@ publisher of the version it refers to gives permission. @item -In any section entitled ``Acknowledgements'' or ``Dedications'', -preserve the section's title, and preserve in the section all the -substance and tone of each of the contributor acknowledgements -and/or dedications given therein. +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. @item Preserve all the Invariant Sections of the Document, @@ -4951,12 +4982,15 @@ or the equivalent are not considered part of the section titles. @item -Delete any section entitled ``Endorsements''. Such a section +Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item -Do not retitle any existing section as ``Endorsements'' -or to conflict in title with any Invariant Section. +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or @@ -4966,9 +5000,9 @@ list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -You may add a section entitled ``Endorsements'', provided it contains +You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has +parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. @@ -4985,7 +5019,7 @@ The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -@sp 1 + @item COMBINING DOCUMENTS @@ -4994,7 +5028,7 @@ versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its -license notice. +license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single @@ -5005,12 +5039,12 @@ Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -In the combination, you must combine any sections entitled ``History'' -in the various original documents, forming one section entitled -``History''; likewise combine any sections entitled ``Acknowledgements'', -and any sections entitled ``Dedications''. You must delete all sections -entitled ``Endorsements.'' -@sp 1 +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + @item COLLECTIONS OF DOCUMENTS @@ -5024,25 +5058,27 @@ it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -@sp 1 + @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an ``aggregate'', and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. -@sp 1 +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + @item TRANSLATION @@ -5052,11 +5088,18 @@ permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. -@sp 1 +translation of this License, and all the license notices in the +Document, and any Warrany Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + @item TERMINATION @@ -5067,7 +5110,7 @@ parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -@sp 1 + @item FUTURE REVISIONS OF THIS LICENSE @@ -5085,7 +5128,6 @@ Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - @end enumerate @c fakenode --- for prepinfo @@ -5097,27 +5139,41 @@ @smallexample @group - Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 + under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; - with the Invariant Sections being @var{list their titles}, with the - Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample -If you have no Invariant Sections, write ``with no Invariant Sections'' -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write ``no Front-Cover Texts'' instead of -``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts. + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with...Texts.'' line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: + + @node Index, , GNU Free Documentation License, Top @comment node-name, next, previous, up diff -urN gawk-3.1.1/doc/texinfo.tex gawk-3.1.2/doc/texinfo.tex --- gawk-3.1.1/doc/texinfo.tex 2002-03-26 18:29:26.000000000 +0200 +++ gawk-3.1.2/doc/texinfo.tex 2003-03-06 11:11:53.000000000 +0200 @@ -3,10 +3,10 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2002-03-26.08} +\def\texinfoversion{2003-02-03.16} % -% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, -% 2000, 01, 02 Free Software Foundation, Inc. +% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, +% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -29,19 +29,17 @@ % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: -% ftp://ftp.gnu.org/gnu/texinfo.tex +% ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) -% ftp://texinfo.org/texinfo/texinfo.tex % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org), % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. % +% The GNU Texinfo home page is http://www.gnu.org/software/texinfo. +% % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. % -% Texinfo has a small home page at http://texinfo.org/ and also -% http://www.gnu.org/software/texinfo. -% % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. @@ -57,9 +55,10 @@ % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. -% -% It is possible to adapt texinfo.tex for other languages. You can get -% the existing language-specific files from the full Texinfo distribution. +% +% It is possible to adapt texinfo.tex for other languages, to some +% extent. You can get the existing language-specific files from the +% full Texinfo distribution. \message{Loading texinfo [version \texinfoversion]:} @@ -69,6 +68,13 @@ \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} +\message{Basics,} +\chardef\other=12 + +% We never want plain's outer \+ definition in Texinfo. +% For @tex, we can use \tabalign. +\let\+ = \relax + % Save some parts of plain tex whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet @@ -79,19 +85,16 @@ \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! +\let\ptexgtr=> +\let\ptexhat=^ \let\ptexi=\i \let\ptexlbrace=\{ +\let\ptexless=< +\let\ptexplus=+ \let\ptexrbrace=\} \let\ptexstar=\* \let\ptext=\t -% We never want plain's outer \+ definition in Texinfo. -% For @tex, we can use \tabalign. -\let\+ = \relax - -\message{Basics,} -\chardef\other=12 - % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J @@ -138,40 +141,64 @@ \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi +% In some macros, we cannot use the `\? notation---the left quote is +% in some cases the escape char. +\chardef\colonChar = `\: +\chardef\commaChar = `\, +\chardef\dotChar = `\. +\chardef\equalChar = `\= +\chardef\exclamChar= `\! +\chardef\questChar = `\? +\chardef\semiChar = `\; +\chardef\spaceChar = `\ % +\chardef\underChar = `\_ + % Ignore a token. % \def\gobble#1{} +% True if #1 is the empty string, i.e., called like `\ifempty{}'. +% +\def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}% +\def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}% + +% Hyphenation fixes. \hyphenation{ap-pen-dix} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{eshell} \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. -\newdimen \bindingoffset -\newdimen \normaloffset +\newdimen\bindingoffset +\newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, -% since that produces some useless output on the terminal. +% since that produces some useless output on the terminal. We also make +% some effort to order the tracing commands to reduce output in the log +% file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% -\ifx\eTeXversion\undefined -\def\loggingall{\tracingcommands2 \tracingstats2 - \tracingpages1 \tracingoutput1 \tracinglostchars1 - \tracingmacros2 \tracingparagraphs1 \tracingrestores1 - \showboxbreadth\maxdimen\showboxdepth\maxdimen -}% -\else -\def\loggingall{\tracingcommands3 \tracingstats2 - \tracingpages1 \tracingoutput1 \tracinglostchars1 - \tracingmacros2 \tracingparagraphs1 \tracingrestores1 - \tracingscantokens1 \tracingassigns1 \tracingifs1 - \tracinggroups1 \tracingnesting2 - \showboxbreadth\maxdimen\showboxdepth\maxdimen +\def\loggingall{% + \tracingstats2 + \tracingpages1 + \tracinglostchars2 % 2 gives us more in etex + \tracingparagraphs1 + \tracingoutput1 + \tracingmacros2 + \tracingrestores1 + \showboxbreadth\maxdimen \showboxdepth\maxdimen + \ifx\eTeXversion\undefined\else % etex gives us more logging + \tracingscantokens1 + \tracingifs1 + \tracinggroups1 + \tracingnesting2 + \tracingassigns1 + \fi + \tracingcommands3 % 3 gives us more in etex + \errorcontextlines\maxdimen }% -\fi % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. @@ -276,7 +303,7 @@ \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox - }% end of group with \turnoffactive + }% end of group with \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } @@ -436,17 +463,6 @@ } -% Single-spacing is done by various environments (specifically, in -% \nonfillstart and \quotations). -\newskip\singlespaceskip \singlespaceskip = 12.5pt -\def\singlespace{% - % Why was this kern here? It messes up equalizing space above and below - % environments. --karl, 6may93 - %{\advance \baselineskip by -\singlespaceskip - %\kern \baselineskip}% - \setleading\singlespaceskip -} - %% Simple single-character @ commands % @@ prints an @ @@ -466,16 +482,19 @@ \let\{=\mylbrace \let\}=\myrbrace \begingroup - % Definitions to produce actual \{ & \} command in an index. - \catcode`\{ = 12 \catcode`\} = 12 + % Definitions to produce \{ and \} commands for indices, + % and @{ and @} for the aux file. + \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\@ = 0 \catcode`\\ = 12 - @gdef@lbracecmd[\{]% - @gdef@rbracecmd[\}]% -@endgroup + \catcode`\! = 0 \catcode`\\ = \other + !gdef!lbracecmd[\{]% + !gdef!rbracecmd[\}]% + !gdef!lbraceatcmd[@{]% + !gdef!rbraceatcmd[@}]% +!endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. +% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} @@ -484,7 +503,7 @@ \let\udotaccent = \d % Other special characters: @questiondown @exclamdown -% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. +% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} @@ -539,6 +558,16 @@ % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % +% Another complication is that the group might be very large. This can +% cause the glue on the previous page to be unduly stretched, because it +% does not have much material. In this case, it's better to add an +% explicit \vfill so that the extra space is at the bottom. The +% threshold for doing this is if the group is more than \vfilllimit +% percent of a page (\vfilllimit can be changed inside of @tex). +% +\newbox\groupbox +\def\vfilllimit{0.7} +% \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp @@ -552,10 +581,22 @@ % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. + % \dimen0 is the vertical size of the group's box. + \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox + % \dimen2 is how much space is left on the page (more or less). + \dimen2 = \pageheight \advance\dimen2 by -\pagetotal + % if the group doesn't fit on the current page, and it's a big big + % group, force a page break. + \ifdim \dimen0 > \dimen2 + \ifdim \pagetotal < \vfilllimit\pageheight + \page + \fi + \fi + \copy\groupbox \endgroup % End the \group. }% % - \vtop\bgroup + \setbox\groupbox = \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group @@ -753,30 +794,36 @@ % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup - \catcode`\\=12 - \catcode`~=12 - \catcode`^=12 - \catcode`_=12 - \catcode`|=12 - \catcode`<=12 - \catcode`>=12 - \catcode`+=12 + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% + \let\value=\expandablevalue \input\thisfile \endgroup} \def\thisfile{} -% @center line outputs that line, centered - -\def\center{\parsearg\centerzzz} -\def\centerzzz #1{{\advance\hsize by -\leftskip -\advance\hsize by -\rightskip -\centerline{#1}}} +% @center line +% outputs that line, centered. +% +\def\center{\parsearg\docenter} +\def\docenter#1{{% + \ifhmode \hfil\break \fi + \advance\hsize by -\leftskip + \advance\hsize by -\rightskip + \line{\hfil \ignorespaces#1\unskip \hfil}% + \ifhmode \break \fi +}} % @sp n outputs n lines of vertical space @@ -841,11 +888,6 @@ % to set catcodes according to plain TeX first, to allow for subscripts, % superscripts, special math chars, etc. % -% @math does not do math typesetting in section titles, index -% entries, and other such contexts where the catcodes are set before -% @math gets a chance to work. This could perhaps be fixed, but for now -% at least we can have real math in the main text, where it's needed most. -% \let\implicitmath = $%$ font-lock fix % % One complication: _ usually means subscripts, but it could also mean @@ -853,9 +895,9 @@ % _ within @math be active (mathcode "8000), and distinguish by seeing % if the current family is \slfam, which is what @var uses. % -{\catcode95 = \active % 95 = _ +{\catcode\underChar = \active \gdef\mathunderscore{% - \catcode95=\active + \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% }} % @@ -871,9 +913,27 @@ \tex \mathcode`\_="8000 \mathunderscore \let\\ = \mathbackslash + \mathactive \implicitmath\finishmath} \def\finishmath#1{#1\implicitmath\Etex} +% Some active characters (such as <) are spaced differently in math. +% We have to reset their definitions in case the @math was an +% argument to a command which set the catcodes (such as @item or @section). +% +{ + \catcode`^ = \active + \catcode`< = \active + \catcode`> = \active + \catcode`+ = \active + \gdef\mathactive{% + \let^ = \ptexhat + \let< = \ptexless + \let> = \ptexgtr + \let+ = \ptexplus + } +} + % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} @@ -965,7 +1025,7 @@ \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 - #1.pdf% + #1.pdf% \else {#1.pdf}% \fi @@ -987,40 +1047,39 @@ \openin 1 \jobname.toc \ifeof 1\else\begingroup \closein 1 - \indexnofonts - \def\tt{} - \let\_ = \normalunderscore % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} - \let\appendixentry = \chapentry - \def\unnumbchapentry ##1##2{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} - \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} - \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} - \def\unnumbsubsubsecentry ##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}} + \let\appendixentry = \chapentry + \let\unnumbchapentry = \chapentry + \let\unnumbsecentry = \secentry + \let\unnumbsubsecentry = \subsecentry + \let\unnumbsubsubsecentry = \subsubsecentry \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} - \let\appendixentry = \chapentry - \def\unnumbchapentry ##1##2{% - \pdfoutline goto name{\pdfmkpgn{##2}}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} - \def\unnumbsecentry ##1##2##3{% - \pdfoutline goto name{\pdfmkpgn{##3}}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} - \def\unnumbsubsecentry ##1##2##3##4{% - \pdfoutline goto name{\pdfmkpgn{##4}}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} - \def\unnumbsubsubsecentry ##1##2##3##4##5{% - \pdfoutline goto name{\pdfmkpgn{##5}}{##1}} + \let\appendixentry = \chapentry + \let\unnumbchapentry = \chapentry + \let\unnumbsecentry = \secentry + \let\unnumbsubsecentry = \subsecentry + \let\unnumbsubsubsecentry = \subsubsecentry + % + % Make special characters normal for writing to the pdf file. + % + \indexnofonts + \let\tt=\relax + \turnoffactive \input \jobname.toc \endgroup\fi }} @@ -1170,7 +1229,7 @@ \newcount\mainmagstep \ifx\bigger\relax % not really supported. - \let\mainmagstep=\magstep1 + \mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else @@ -1178,9 +1237,10 @@ \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi -% Instead of cmb10, you many want to use cmbx10. +% Instead of cmb10, you may want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 -% looks better when embedded in a line with cmr10. +% looks better when embedded in a line with cmr10 +% (in Bob's opinion). \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} @@ -1231,6 +1291,7 @@ \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} +\def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} @@ -1328,7 +1389,25 @@ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \resetmathfonts \setleading{9.5pt}} -\let\smallexamplefonts = \smallerfonts + +% Set the fonts to use with the @small... environments. +\let\smallexamplefonts = \smallfonts + +% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample +% can fit this many characters: +% 8.5x11=86 smallbook=72 a4=90 a5=69 +% If we use \smallerfonts (8pt), then we can fit this many characters: +% 8.5x11=90+ smallbook=80 a4=90+ a5=77 +% For me, subjectively, the few extra characters that fit aren't worth +% the additional smallness of 8pt. So I'm making the default 9pt. +% +% By the way, for comparison, here's what fits with @example (10pt): +% 8.5x11=71 smallbook=60 a4=75 a5=58 +% +% I wish we used A4 paper on this side of the Atlantic. +% +% --karl, 24jan03. + % Set up the default fonts, so we can use them for creating boxes. % @@ -1345,6 +1424,7 @@ \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} +\setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -1352,8 +1432,8 @@ % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else\/\fi\fi\fi} -\def\smartslanted#1{{\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\it #1}\futurelet\next\smartitalicx} +\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} +\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted @@ -1371,6 +1451,17 @@ \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } +% Set sfcode to normal for the chars that usually have another value. +% Can't use plain's \frenchspacing because it uses the `\x notation, and +% sometimes \x has an active definition that messes things up. +% +\catcode`@=11 + \def\frenchspacing{% + \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m + \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m + } +\catcode`@=\other + \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null @@ -1470,15 +1561,17 @@ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% + \else + \errhelp = \EMsimple + \errmessage{Unknown @kbdinputstyle `\arg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} -% Default is kbdinputdistinct. (Too much of a hassle to call the macro, -% the catcodes are wrong for parsearg to work.) -\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl} +% Default is `distinct.' +\kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% @@ -1592,7 +1685,8 @@ \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % - \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines}% + \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines + \let\tt=\authortt}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue @@ -1873,10 +1967,18 @@ % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % - % Stop a page break at the \parskip glue coming up. Unfortunately + % Stop a page break at the \parskip glue coming up. (Unfortunately % we can't prevent a possible page break at the following - % \baselineskip glue. - \nobreak + % \baselineskip glue.) However, if what follows is an environment + % such as @example, there will be no \parskip glue; then + % the negative vskip we just would cause the example and the item to + % crash together. So we use this bizarre value of 10001 as a signal + % to \aboveenvbreak to insert \parskip glue after all. + % (Possibly there are other commands that could be followed by + % @example which need the same treatment, but not section titles; or + % maybe section titles are the only special case and they should be + % penalty 10001...) + \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else @@ -1982,11 +2084,6 @@ \def\itemcontents{#1}% \let\item=\itemizeitem} -% Set sfcode to normal for the chars that usually have another value. -% These are `.?!:;,' -\def\frenchspacing{\sfcode46=1000 \sfcode63=1000 \sfcode33=1000 - \sfcode58=1000 \sfcode59=1000 \sfcode44=1000 } - % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % @@ -2208,8 +2305,8 @@ \let\go\pickupwholefraction \else \global\advance\colcount by 1 - \setbox0=\hbox{#1\unskip }% Add a normal word space as a separator; - % typically that is always in the input, anyway. + \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a + % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi @@ -2224,18 +2321,18 @@ \go } -% This used to have \hskip1sp. But then the space in a template line is -% not enough. That is bad. So let's go back to just & until we -% encounter the problem it was intended to solve again. -% --karl, nathan@acm.org, 20apr99. -\def\tab{&} - % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip - \let\item\crcr + \let\item=\crcrwithfootnotes + % A \tab used to include \hskip1sp. But then the space in a template + % line is not enough. That is bad. So let's go back to just & until + % we encounter the problem it was intended to solve again. --karl, + % nathan@acm.org, 20apr99. + \let\tab=&% + \let\startfootins=\startsavedfootnote \tolerance=9500 \hbadness=9500 \setmultitablespacing @@ -2243,7 +2340,11 @@ \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 - \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}% + \def\Emultitable{% + \global\setpercentfalse + \crcrwithfootnotes\crcr + \egroup\egroup + }% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable @@ -2332,6 +2433,25 @@ %% than skip between lines in the table. \fi} +% In case a @footnote appears inside an alignment, save the footnote +% text to a box and make the \insert when a row of the table is +% finished. Otherwise, the insertion is lost, it never migrates to the +% main vertical list. --kasal, 22jan03. +% +\newbox\savedfootnotes +% +% \dotable \let's \startfootins to this, so that \dofootnote will call +% it instead of starting the insertion right away. +\def\startsavedfootnote{% + \global\setbox\savedfootnotes = \vbox\bgroup + \unvbox\savedfootnotes +} +\def\crcrwithfootnotes{% + \crcr + \ifvoid\savedfootnotes \else + \noalign{\insert\footins{\box\savedfootnotes}}% + \fi +} \message{conditionals,} % Prevent errors for section commands. @@ -2367,65 +2487,117 @@ % and so want to turn off most commands, in case they are used % incorrectly. % +% We use \empty instead of \relax for the @def... commands, so that \end +% doesn't throw an error. For instance: +% @ignore +% @deffn ... +% @end deffn +% @end ignore +% +% The @end deffn is going to get expanded, because we're trying to allow +% nested conditionals. But we don't want to expand the actual @deffn, +% since it might be syntactically correct and intended to be ignored. +% Since \end checks for \relax, using \empty does not cause an error. +% \def\ignoremorecommands{% \let\defcodeindex = \relax - \let\defcv = \relax - \let\deffn = \relax - \let\deffnx = \relax + \let\defcv = \empty + \let\defcvx = \empty + \let\Edefcv = \empty + \let\deffn = \empty + \let\deffnx = \empty + \let\Edeffn = \empty \let\defindex = \relax - \let\defivar = \relax - \let\defmac = \relax - \let\defmethod = \relax - \let\defop = \relax - \let\defopt = \relax - \let\defspec = \relax - \let\deftp = \relax - \let\deftypefn = \relax - \let\deftypefun = \relax - \let\deftypeivar = \relax - \let\deftypeop = \relax - \let\deftypevar = \relax - \let\deftypevr = \relax - \let\defun = \relax - \let\defvar = \relax - \let\defvr = \relax - \let\ref = \relax - \let\xref = \relax - \let\printindex = \relax - \let\pxref = \relax - \let\settitle = \relax - \let\setchapternewpage = \relax - \let\setchapterstyle = \relax - \let\everyheading = \relax + \let\defivar = \empty + \let\defivarx = \empty + \let\Edefivar = \empty + \let\defmac = \empty + \let\defmacx = \empty + \let\Edefmac = \empty + \let\defmethod = \empty + \let\defmethodx = \empty + \let\Edefmethod = \empty + \let\defop = \empty + \let\defopx = \empty + \let\Edefop = \empty + \let\defopt = \empty + \let\defoptx = \empty + \let\Edefopt = \empty + \let\defspec = \empty + \let\defspecx = \empty + \let\Edefspec = \empty + \let\deftp = \empty + \let\deftpx = \empty + \let\Edeftp = \empty + \let\deftypefn = \empty + \let\deftypefnx = \empty + \let\Edeftypefn = \empty + \let\deftypefun = \empty + \let\deftypefunx = \empty + \let\Edeftypefun = \empty + \let\deftypeivar = \empty + \let\deftypeivarx = \empty + \let\Edeftypeivar = \empty + \let\deftypemethod = \empty + \let\deftypemethodx = \empty + \let\Edeftypemethod = \empty + \let\deftypeop = \empty + \let\deftypeopx = \empty + \let\Edeftypeop = \empty + \let\deftypevar = \empty + \let\deftypevarx = \empty + \let\Edeftypevar = \empty + \let\deftypevr = \empty + \let\deftypevrx = \empty + \let\Edeftypevr = \empty + \let\defun = \empty + \let\defunx = \empty + \let\Edefun = \empty + \let\defvar = \empty + \let\defvarx = \empty + \let\Edefvar = \empty + \let\defvr = \empty + \let\defvrx = \empty + \let\Edefvr = \empty + \let\clear = \relax + \let\down = \relax + \let\evenfooting = \relax \let\evenheading = \relax - \let\oddheading = \relax \let\everyfooting = \relax - \let\evenfooting = \relax - \let\oddfooting = \relax + \let\everyheading = \relax \let\headings = \relax \let\include = \relax + \let\item = \relax \let\lowersections = \relax - \let\down = \relax + \let\oddfooting = \relax + \let\oddheading = \relax + \let\printindex = \relax + \let\pxref = \relax \let\raisesections = \relax - \let\up = \relax + \let\ref = \relax \let\set = \relax - \let\clear = \relax - \let\item = \relax + \let\setchapternewpage = \relax + \let\setchapterstyle = \relax + \let\settitle = \relax + \let\up = \relax + \let\verbatiminclude = \relax + \let\xref = \relax } -% Ignore @ignore, @ifhtml, @ifinfo, @ifplaintext, @ifnottex, @html, @menu, -% @direntry, and @documentdescription. +% Ignore @ignore, @ifhtml, @ifinfo, and the like. % -\def\ignore{\doignore{ignore}} +\def\direntry{\doignore{direntry}} +\def\documentdescriptionword{documentdescription} +\def\documentdescription{\doignore{documentdescription}} +\def\html{\doignore{html}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} -\def\ifplaintext{\doignore{ifplaintext}} \def\ifnottex{\doignore{ifnottex}} -\def\html{\doignore{html}} +\def\ifplaintext{\doignore{ifplaintext}} +\def\ifxml{\doignore{ifxml}} +\def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} -\def\direntry{\doignore{direntry}} -\def\documentdescription{\doignore{documentdescription}} -\def\documentdescriptionword{documentdescription} +\def\xml{\doignore{xml}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. @@ -2443,7 +2615,7 @@ \long\def\doignoretext##1@end #1{\enddoignore}% % % Make sure that spaces turn into tokens that match what \doignoretext wants. - \catcode32 = 10 + \catcode\spaceChar = 10 % % Ignore braces, too, so mismatched braces don't cause trouble. \catcode`\{ = 9 @@ -2485,7 +2657,7 @@ \immediate\write16{If you are running another version of TeX, relax.} \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} - \immediate\write16{ (See ftp://ftp.gnu.org/pub/gnu/TeX.README.)} + \immediate\write16{ (See ftp://ftp.gnu.org/non-gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} \immediate\write16{ to use a workaround.} @@ -2507,8 +2679,8 @@ % We must actually expand the ignored text to look for the @end % command, so that nested ignore constructs work. Thus, we put the % text into a \vbox and then do nothing with the result. To minimize - % the change of memory overflow, we follow the approach outlined on - % page 401 of the TeXbook: make the current font be a dummy font. + % the chance of memory overflow, we follow the approach outlined on + % page 401 of the TeXbook. % \setbox0 = \vbox\bgroup % Don't complain about control sequences we have declared \outer. @@ -2529,8 +2701,8 @@ % % Set the current font to be \nullfont, a TeX primitive, and define % all the font commands to also use \nullfont. We don't use - % dummy.tfm, as suggested in the TeXbook, because not all sites - % might have that installed. Therefore, math mode will still + % dummy.tfm, as suggested in the TeXbook, because some sites + % might not have that installed. Therefore, math mode will still % produce output, but that should be an extremely small amount of % stuff compared to the main input. % @@ -2559,7 +2731,7 @@ % Do minimal line-breaking. \pretolerance = 10000 % - % Do not execute instructions in @tex + % Do not execute instructions in @tex. \def\tex{\doignore{tex}}% % Do not execute macro definitions. % `c' is a comment character, so the word `macro' will get cut off. @@ -2604,7 +2776,7 @@ % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup - \catcode`\-=12 \catcode`\_=12 + \catcode`\-=\other \catcode`\_=\other \indexbreaks \let_\normalunderscore \valuexxx} } @@ -2613,15 +2785,17 @@ % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything -% about that. The command has to be fully expandable, since the result -% winds up in the index file. This means that if the variable's value -% contains other Texinfo commands, it's almost certain it will fail -% (although perhaps we could fix that with sufficient work to do a -% one-level expansion on the result, instead of complete). +% about that. The command has to be fully expandable (if the variable +% is set), since the result winds up in the index file. This means that +% if the variable's value contains other Texinfo commands, it's almost +% certain it will fail (although perhaps we could fix that with +% sufficient work to do a one-level expansion on the result, instead of +% complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% + \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi @@ -2630,13 +2804,14 @@ % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % -\def\ifset{\parsearg\ifsetxxx} -\def\ifsetxxx #1{% +\def\ifset{\parsearg\doifset} +\def\doifset#1{% \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifsetfail + \let\next=\ifsetfail \else - \expandafter\ifsetsucceed + \let\next=\ifsetsucceed \fi + \next } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\nestedignore{ifset}} @@ -2645,13 +2820,14 @@ % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % -\def\ifclear{\parsearg\ifclearxxx} -\def\ifclearxxx #1{% +\def\ifclear{\parsearg\doifclear} +\def\doifclear#1{% \expandafter\ifx\csname SET#1\endcsname\relax - \expandafter\ifclearsucceed + \let\next=\ifclearsucceed \else - \expandafter\ifclearfail + \let\next=\ifclearfail \fi + \next } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\nestedignore{ifclear}} @@ -2670,28 +2846,13 @@ \defineunmatchedend{ifnotinfo} \defineunmatchedend{ifnotplaintext} -% We can't just want to start a group at @iftex (etc.) and end it at -% @end iftex, since then @set commands inside the conditional have no -% effect (they'd get reverted at the end of the group). So we must -% define \Eiftex to redefine itself to be its previous value. (We can't -% just define it to fail again with an ``unmatched end'' error, since -% the @ifset might be nested.) -% -\def\conditionalsucceed#1{% - \edef\temp{% - % Remember the current value of \E#1. - \let\nece{prevE#1} = \nece{E#1}% - % - % At the `@end #1', redefine \E#1 to be its previous value. - \def\nece{E#1}{\let\nece{E#1} = \nece{prevE#1}}% - }% - \temp -} - -% We need to expand lots of \csname's, but we don't want to expand the -% control sequences after we've constructed them. +% True conditional. Since \set globally defines its variables, we can +% just start and end a group (to keep the @end definition undefined at +% the outer level). % -\def\nece#1{\expandafter\noexpand\csname#1\endcsname} +\def\conditionalsucceed#1{\begingroup + \expandafter\def\csname E#1\endcsname{\endgroup}% +} % @defininfoenclose. \let\definfoenclose=\comment @@ -2784,104 +2945,166 @@ \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} -% Take care of texinfo commands likely to appear in an index entry. -% (Must be a way to avoid doing expansion at all, and thus not have to -% laboriously list every single command here.) +% Take care of Texinfo commands that can appear in an index entry. +% Since there are some commands we want to expand, and others we don't, +% we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% -\def\ { }% -\def\@{@}% change to @@ when we switch to @ as escape char in aux files. -% Need these in case \tex is in effect and \{ is a \delimiter again. -% But can't use \lbracecmd and \rbracecmd because texindex assumes -% braces and backslashes are used only as delimiters. -\let\{ = \mylbrace -\let\} = \myrbrace -\def\_{{\realbackslash _}}% -\normalturnoffactive -% -% Take care of the plain tex accent commands. -\def\,##1{\realbackslash ,{##1}}% -\def\"{\realbackslash "}% -\def\`{\realbackslash `}% -\def\'{\realbackslash '}% -\def\^{\realbackslash ^}% -\def\~{\realbackslash ~}% -\def\={\realbackslash =}% -\def\b{\realbackslash b}% -\def\c{\realbackslash c}% -\def\d{\realbackslash d}% -\def\u{\realbackslash u}% -\def\v{\realbackslash v}% -\def\H{\realbackslash H}% -\def\dotless##1{\realbackslash dotless {##1}}% -% Take care of the plain tex special European modified letters. -\def\AA{\realbackslash AA}% -\def\AE{\realbackslash AE}% -\def\L{\realbackslash L}% -\def\OE{\realbackslash OE}% -\def\O{\realbackslash O}% -\def\aa{\realbackslash aa}% -\def\ae{\realbackslash ae}% -\def\l{\realbackslash l}% -\def\oe{\realbackslash oe}% -\def\o{\realbackslash o}% -\def\ss{\realbackslash ss}% -% -% Although these internals commands shouldn't show up, sometimes they do. -\def\bf{\realbackslash bf }% -\def\gtr{\realbackslash gtr}% -\def\hat{\realbackslash hat}% -\def\less{\realbackslash less}% -%\def\rm{\realbackslash rm }% -\def\sf{\realbackslash sf}% -\def\sl{\realbackslash sl }% -\def\tclose##1{\realbackslash tclose {##1}}% -\def\tt{\realbackslash tt}% -% -\def\b##1{\realbackslash b {##1}}% -\def\i##1{\realbackslash i {##1}}% -\def\sc##1{\realbackslash sc {##1}}% -\def\t##1{\realbackslash t {##1}}% -\def\r##1{\realbackslash r {##1}}% -% -\def\TeX{\realbackslash TeX}% -\def\acronym##1{\realbackslash acronym {##1}}% -\def\cite##1{\realbackslash cite {##1}}% -\def\code##1{\realbackslash code {##1}}% -\def\command##1{\realbackslash command {##1}}% -\def\dfn##1{\realbackslash dfn {##1}}% -\def\dots{\realbackslash dots }% -\def\emph##1{\realbackslash emph {##1}}% -\def\env##1{\realbackslash env {##1}}% -\def\file##1{\realbackslash file {##1}}% -\def\kbd##1{\realbackslash kbd {##1}}% -\def\key##1{\realbackslash key {##1}}% -\def\math##1{\realbackslash math {##1}}% -\def\option##1{\realbackslash option {##1}}% -\def\samp##1{\realbackslash samp {##1}}% -\def\strong##1{\realbackslash strong {##1}}% -\def\uref##1{\realbackslash uref {##1}}% -\def\url##1{\realbackslash url {##1}}% -\def\var##1{\realbackslash var {##1}}% -\def\w{\realbackslash w }% -% -% These math commands don't seem likely to be used in index entries. -\def\copyright{\realbackslash copyright}% -\def\equiv{\realbackslash equiv}% -\def\error{\realbackslash error}% -\def\expansion{\realbackslash expansion}% -\def\point{\realbackslash point}% -\def\print{\realbackslash print}% -\def\result{\realbackslash result}% -% -% Handle some cases of @value -- where the variable name does not -% contain - or _, and the value does not contain any -% (non-fully-expandable) commands. -\let\value = \expandablevalue -% -\unsepspaces -% Turn off macro expansion -\turnoffmacros + \def\@{@}% change to @@ when we switch to @ as escape char in index files. + \def\ {\realbackslash\space }% + % Need these in case \tex is in effect and \{ is a \delimiter again. + % But can't use \lbracecmd and \rbracecmd because texindex assumes + % braces and backslashes are used only as delimiters. + \let\{ = \mylbrace + \let\} = \myrbrace + % + % \definedummyword defines \#1 as \realbackslash #1\space, thus + % effectively preventing its expansion. This is used only for control + % words, not control letters, because the \space would be incorrect + % for control characters, but is needed to separate the control word + % from whatever follows. + % + % For control letters, we have \definedummyletter, which omits the + % space. + % + % These can be used both for control words that take an argument and + % those that do not. If it is followed by {arg} in the input, then + % that will dutifully get written to the index (or wherever). + % + \def\definedummyword##1{% + \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% + }% + \def\definedummyletter##1{% + \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% + }% + % + % Do the redefinitions. + \commondummies +} + +% For the aux file, @ is the escape character. So we want to redefine +% everything using @ instead of \realbackslash. When everything uses +% @, this will be simpler. +% +\def\atdummies{% + \def\@{@@}% + \def\ {@ }% + \let\{ = \lbraceatcmd + \let\} = \rbraceatcmd + % + % (See comments in \indexdummies.) + \def\definedummyword##1{% + \expandafter\def\csname ##1\endcsname{@##1\space}% + }% + \def\definedummyletter##1{% + \expandafter\def\csname ##1\endcsname{@##1}% + }% + % + % Do the redefinitions. + \commondummies +} + +% Called from \indexdummies and \atdummies. \definedummyword and +% \definedummyletter must be defined first. +% +\def\commondummies{% + % + \normalturnoffactive + % + % Control letters and accents. + \definedummyletter{_}% + \definedummyletter{,}% + \definedummyletter{"}% + \definedummyletter{`}% + \definedummyletter{'}% + \definedummyletter{^}% + \definedummyletter{~}% + \definedummyletter{=}% + \definedummyword{u}% + \definedummyword{v}% + \definedummyword{H}% + \definedummyword{dotaccent}% + \definedummyword{ringaccent}% + \definedummyword{tieaccent}% + \definedummyword{ubaraccent}% + \definedummyword{udotaccent}% + \definedummyword{dotless}% + % + % Other non-English letters. + \definedummyword{AA}% + \definedummyword{AE}% + \definedummyword{L}% + \definedummyword{OE}% + \definedummyword{O}% + \definedummyword{aa}% + \definedummyword{ae}% + \definedummyword{l}% + \definedummyword{oe}% + \definedummyword{o}% + \definedummyword{ss}% + % + % Although these internal commands shouldn't show up, sometimes they do. + \definedummyword{bf}% + \definedummyword{gtr}% + \definedummyword{hat}% + \definedummyword{less}% + \definedummyword{sf}% + \definedummyword{sl}% + \definedummyword{tclose}% + \definedummyword{tt}% + % + % Texinfo font commands. + \definedummyword{b}% + \definedummyword{i}% + \definedummyword{r}% + \definedummyword{sc}% + \definedummyword{t}% + % + \definedummyword{TeX}% + \definedummyword{acronym}% + \definedummyword{cite}% + \definedummyword{code}% + \definedummyword{command}% + \definedummyword{dfn}% + \definedummyword{dots}% + \definedummyword{emph}% + \definedummyword{env}% + \definedummyword{file}% + \definedummyword{kbd}% + \definedummyword{key}% + \definedummyword{math}% + \definedummyword{option}% + \definedummyword{samp}% + \definedummyword{strong}% + \definedummyword{uref}% + \definedummyword{url}% + \definedummyword{var}% + \definedummyword{w}% + % + % Assorted special characters. + \definedummyword{bullet}% + \definedummyword{copyright}% + \definedummyword{dots}% + \definedummyword{enddots}% + \definedummyword{equiv}% + \definedummyword{error}% + \definedummyword{expansion}% + \definedummyword{minus}% + \definedummyword{pounds}% + \definedummyword{point}% + \definedummyword{print}% + \definedummyword{result}% + % + % Handle some cases of @value -- where the variable name does not + % contain - or _, and the value does not contain any + % (non-fully-expandable) commands. + \let\value = \expandablevalue + % + % Normal spaces, not active ones. + \unsepspaces + % + % No macro expansion. + \turnoffmacros } % If an index command is used in an @example environment, any spaces @@ -2890,83 +3113,86 @@ {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} -% \indexnofonts no-ops all font-change commands. -% This is used when outputting the strings to sort the index by. -\def\indexdummyfont#1{#1} + +% \indexnofonts is used when outputting the strings to sort the index +% by, and when constructing control sequence names. It eliminates all +% control sequences and just writes whatever the best ASCII sort string +% would be for a given command (usually its argument). +% \def\indexdummytex{TeX} \def\indexdummydots{...} - +% \def\indexnofonts{% -\def\@{@}% -% how to handle braces? -\def\_{\normalunderscore}% -% -\let\,=\indexdummyfont -\let\"=\indexdummyfont -\let\`=\indexdummyfont -\let\'=\indexdummyfont -\let\^=\indexdummyfont -\let\~=\indexdummyfont -\let\==\indexdummyfont -\let\b=\indexdummyfont -\let\c=\indexdummyfont -\let\d=\indexdummyfont -\let\u=\indexdummyfont -\let\v=\indexdummyfont -\let\H=\indexdummyfont -\let\dotless=\indexdummyfont -% Take care of the plain tex special European modified letters. -\def\AA{AA}% -\def\AE{AE}% -\def\L{L}% -\def\OE{OE}% -\def\O{O}% -\def\aa{aa}% -\def\ae{ae}% -\def\l{l}% -\def\oe{oe}% -\def\o{o}% -\def\ss{ss}% -% -% Don't no-op \tt, since it isn't a user-level command -% and is used in the definitions of the active chars like <, >, |, etc. -% Likewise with the other plain tex font commands. -%\let\tt=\indexdummyfont -% -\let\b=\indexdummyfont -\let\i=\indexdummyfont -\let\r=\indexdummyfont -\let\sc=\indexdummyfont -\let\t=\indexdummyfont -% -\let\TeX=\indexdummytex -\let\acronym=\indexdummyfont -\let\cite=\indexdummyfont -\let\code=\indexdummyfont -\let\command=\indexdummyfont -\let\dfn=\indexdummyfont -\let\dots=\indexdummydots -\let\emph=\indexdummyfont -\let\env=\indexdummyfont -\let\file=\indexdummyfont -\let\kbd=\indexdummyfont -\let\key=\indexdummyfont -\let\math=\indexdummyfont -\let\option=\indexdummyfont -\let\samp=\indexdummyfont -\let\strong=\indexdummyfont -\let\uref=\indexdummyfont -\let\url=\indexdummyfont -\let\var=\indexdummyfont -\let\w=\indexdummyfont -} - -% To define \realbackslash, we must make \ not be an escape. -% We must first make another character (@) an escape -% so we do not become unable to do a definition. - -{\catcode`\@=0 \catcode`\\=\other - @gdef@realbackslash{\}} + \def\ { }% + \def\@{@}% + % how to handle braces? + \def\_{\normalunderscore}% + % + \let\,=\asis + \let\"=\asis + \let\`=\asis + \let\'=\asis + \let\^=\asis + \let\~=\asis + \let\==\asis + \let\u=\asis + \let\v=\asis + \let\H=\asis + \let\dotaccent=\asis + \let\ringaccent=\asis + \let\tieaccent=\asis + \let\ubaraccent=\asis + \let\udotaccent=\asis + \let\dotless=\asis + % + % Other non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\aa{aa}% + \def\ae{ae}% + \def\l{l}% + \def\oe{oe}% + \def\o{o}% + \def\ss{ss}% + \def\exclamdown{!}% + \def\questiondown{?}% + % + % Don't no-op \tt, since it isn't a user-level command + % and is used in the definitions of the active chars like <, >, |, etc. + % Likewise with the other plain tex font commands. + %\let\tt=\asis + % + % Texinfo font commands. + \let\b=\asis + \let\i=\asis + \let\r=\asis + \let\sc=\asis + \let\t=\asis + % + \let\TeX=\indexdummytex + \let\acronym=\asis + \let\cite=\asis + \let\code=\asis + \let\command=\asis + \let\dfn=\asis + \let\dots=\indexdummydots + \let\emph=\asis + \let\env=\asis + \let\file=\asis + \let\kbd=\asis + \let\key=\asis + \let\math=\asis + \let\option=\asis + \let\samp=\asis + \let\strong=\asis + \let\uref=\asis + \let\url=\asis + \let\var=\asis + \let\w=\asis +} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? @@ -2998,28 +3224,24 @@ \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % - \def\thirdarg{#3}% - % - % If third arg is present, precede it with space in sort key. - \ifx\thirdarg\emptymacro - \let\subentry = \empty - \else - \def\subentry{ #3}% - \fi - % - % First process the index entry with all font commands turned - % off to get the string to sort by. - {\indexnofonts \xdef\indexsorttmp{#2\subentry}}% - % - % Now the real index entry with the fonts. + % The main index entry text. \toks0 = {#2}% % - % If the third (subentry) arg is present, add it to the index - % line to write. + % If third arg is present, precede it with space in sort key. + \def\thirdarg{#3}% \ifx\thirdarg\emptymacro \else - \toks0 = \expandafter{\the\toks0{#3}}% + % If the third (subentry) arg is present, add it to the index + % line to write. + \toks0 = \expandafter{\the\toks0 \space #3}% \fi % + % Process the index entry with all font commands turned off, to + % get the string to sort by. + {\indexnofonts + \edef\temp{\the\toks0}% need full expansion + \xdef\indexsorttmp{\temp}% + }% + % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the @@ -3050,12 +3272,11 @@ \iflinks \ifvmode \skip0 = \lastskip - \ifdim\lastskip = 0pt \else \nobreak\vskip-\lastskip \fi + \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi \fi % \temp % do the write % - % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi }% @@ -3531,42 +3752,41 @@ \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% -\chapmacro {#1}{\the\chapno}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -% We don't substitute the actual chapter name into \thischapter -% because we don't want its macros evaluated now. -\xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash chapentry{\the\toks0}% - {\the\chapno}}}% -\temp -\donoderef -\global\let\section = \numberedsec -\global\let\subsection = \numberedsubsec -\global\let\subsubsection = \numberedsubsubsec -} + \secno=0 \subsecno=0 \subsubsecno=0 + \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% + \chapmacro {#1}{\the\chapno}% + \gdef\thissection{#1}% + \gdef\thischaptername{#1}% + % We don't substitute the actual chapter name into \thischapter + % because we don't want its macros evaluated now. + \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% + \writetocentry{chap}{#1}{{\the\chapno}} + \donoderef + \global\let\section = \numberedsec + \global\let\subsection = \numberedsubsec + \global\let\subsubsection = \numberedsubsubsec +} + +% we use \chapno to avoid indenting back +\def\appendixbox#1{% + \setbox0 = \hbox{\putwordAppendix{} \the\chapno}% + \hbox to \wd0{#1\hss}} \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \appendixno by 1 -\message{\putwordAppendix\space \appendixletter}% -\chapmacro {#1}{\putwordAppendix{} \appendixletter}% -\gdef\thissection{#1}% -\gdef\thischaptername{#1}% -\xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash appendixentry{\the\toks0}% - {\appendixletter}}}% -\temp -\appendixnoderef -\global\let\section = \appendixsec -\global\let\subsection = \appendixsubsec -\global\let\subsubsection = \appendixsubsubsec + \secno=0 \subsecno=0 \subsubsecno=0 + \global\advance \appendixno by 1 + \message{\putwordAppendix\space \appendixletter}% + \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% + \gdef\thissection{#1}% + \gdef\thischaptername{#1}% + \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% + \writetocentry{appendix}{#1}{{\appendixletter}} + \appendixnoderef + \global\let\section = \appendixsec + \global\let\subsection = \appendixsubsec + \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. @@ -3579,150 +3799,121 @@ \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% -\secno=0 \subsecno=0 \subsubsecno=0 -% -% This used to be simply \message{#1}, but TeX fully expands the -% argument to \message. Therefore, if #1 contained @-commands, TeX -% expanded them. For example, in `@unnumbered The @cite{Book}', TeX -% expanded @cite (which turns out to cause errors because \cite is meant -% to be executed, not expanded). -% -% Anyway, we don't want the fully-expanded definition of @cite to appear -% as a result of the \message, we just want `@cite' itself. We use -% \the to achieve this: TeX expands \the only once, -% simply yielding the contents of . (We also do this for -% the toc entries.) -\toks0 = {#1}\message{(\the\toks0)}% -% -\unnumbchapmacro {#1}% -\gdef\thischapter{#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbchapentry{\the\toks0}}}% -\temp -\unnumbnoderef -\global\let\section = \unnumberedsec -\global\let\subsection = \unnumberedsubsec -\global\let\subsubsection = \unnumberedsubsubsec + \secno=0 \subsecno=0 \subsubsecno=0 + % + % This used to be simply \message{#1}, but TeX fully expands the + % argument to \message. Therefore, if #1 contained @-commands, TeX + % expanded them. For example, in `@unnumbered The @cite{Book}', TeX + % expanded @cite (which turns out to cause errors because \cite is meant + % to be executed, not expanded). + % + % Anyway, we don't want the fully-expanded definition of @cite to appear + % as a result of the \message, we just want `@cite' itself. We use + % \the to achieve this: TeX expands \the only once, + % simply yielding the contents of . (We also do this for + % the toc entries.) + \toks0 = {#1}\message{(\the\toks0)}% + % + \unnumbchapmacro {#1}% + \gdef\thischapter{#1}\gdef\thissection{#1}% + \writetocentry{unnumbchap}{#1}{{\the\chapno}} + \unnumbnoderef + \global\let\section = \unnumberedsec + \global\let\subsection = \unnumberedsubsec + \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% - {\the\chapno}{\the\secno}}}% -\temp -\donoderef -\nobreak + \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % + \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% + \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} + \donoderef + \nobreak } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% -\subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % -\gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash secentry{\the\toks0}% - {\appendixletter}{\the\secno}}}% -\temp -\appendixnoderef -\nobreak + \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % + \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% + \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% -\plainsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry% - {\the\toks0}{\the\chapno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} + \unnumbnoderef + \nobreak } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% - {\the\chapno}{\the\secno}{\the\subsecno}}}% -\temp -\donoderef -\nobreak + \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % + \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% + \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} + \donoderef + \nobreak } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% -\gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % -\subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsecentry{\the\toks0}% - {\appendixletter}{\the\secno}{\the\subsecno}}}% -\temp -\appendixnoderef -\nobreak + \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % + \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% + \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% -\plainsubsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry% - {\the\toks0}{\the\chapno}{\the\secno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsubsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} + \unnumbnoderef + \nobreak } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% - {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% -\temp -\donoderef -\nobreak + \gdef\thissection{#1}\global\advance \subsubsecno by 1 % + \subsubsecheading {#1} + {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% + \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \donoderef + \nobreak } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% -\gdef\thissection{#1}\global\advance \subsubsecno by 1 % -\subsubsecheading {#1} - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash subsubsecentry{\the\toks0}% - {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}}}% -\temp -\appendixnoderef -\nobreak + \gdef\thissection{#1}\global\advance \subsubsecno by 1 % + \subsubsecheading {#1} + {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% + \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \appendixnoderef + \nobreak } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% -\plainsubsubsecheading {#1}\gdef\thissection{#1}% -\toks0 = {#1}% -\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry% - {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}% -\temp -\unnumbnoderef -\nobreak + \plainsubsubsecheading {#1}\gdef\thissection{#1}% + \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} + \unnumbnoderef + \nobreak } % These are variants which are not "outer", so they can appear in @ifinfo. @@ -3763,16 +3954,16 @@ \def\majorheading{\parsearg\majorheadingzzz} \def\majorheadingzzz #1{% -{\advance\chapheadingskip by 10pt \chapbreak }% -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + {\advance\chapheadingskip by 10pt \chapbreak }% + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\penalty 200} \def\chapheading{\parsearg\chapheadingzzz} \def\chapheadingzzz #1{\chapbreak % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 200} + {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt\raggedright + \rm #1\hfill}}\bigskip \par\penalty 200} % @heading, @subheading, @subsubheading. \def\heading{\parsearg\plainsecheading} @@ -3918,7 +4109,16 @@ \hangindent = \wd0 % zero if no section number \unhbox0 #3}% }% - \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak + % Add extra space after the heading -- either a line space or a + % paragraph space, whichever is more. (Some people like to set + % \parskip to large values for some reason.) Don't allow stretch, though. + \nobreak + \ifdim\parskip>\normalbaselineskip + \kern\parskip + \else + \kern\normalbaselineskip + \fi + \nobreak } @@ -3930,16 +4130,22 @@ % Called from @chapter, etc. We supply {\folio} at the end of the % argument, which will end up as the last argument to the \...entry macro. % -% We open the .toc file here instead of at @setfilename or any other -% fixed time so that @contents can be put in the document anywhere. +% Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} +% We open the .toc file for writing here instead of at @setfilename (or +% any other fixed time) so that @contents can be anywhere in the document. % \newif\iftocfileopened -\def\writetocentry#1{% +\def\writetocentry#1#2#3{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi - \iflinks \write\tocfile{#1{\folio}}\fi + % + \iflinks + \toks0 = {#2}% + \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% + \temp + \fi % % Tell \shipout to create a page destination if we're doing pdf, which % will be the target of the links in the table of contents. We can't @@ -3978,7 +4184,7 @@ \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. - \ifnum \pageno>0 \pageno = \lastnegativepageno \fi + \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } @@ -3995,7 +4201,7 @@ \pdfmakeoutlines \endgroup \lastnegativepageno = \pageno - \pageno = \savepageno + \global\pageno = \savepageno } % And just the chapters. @@ -4007,16 +4213,17 @@ \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl + \let\rm=\shortcontrm \let\bf=\shortcontbf + \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} - \def\unnumbsecentry ##1##2##3{} \def\subsecentry ##1##2##3##4##5{} - \def\unnumbsubsecentry ##1##2##3##4{} \def\subsubsecentry ##1##2##3##4##5##6{} - \def\unnumbsubsubsecentry ##1##2##3##4##5{} + \let\unnumbsecentry = \secentry + \let\unnumbsubsecentry = \subsecentry + \let\unnumbsubsubsecentry = \subsubsecentry \openin 1 \jobname.toc \ifeof 1 \else \closein 1 @@ -4026,7 +4233,7 @@ \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno - \pageno = \savepageno + \global\pageno = \savepageno } \let\shortcontents = \summarycontents @@ -4049,7 +4256,8 @@ } % Appendices, in the main contents. -\def\appendixentry#1#2#3{\dochapentry{\putwordAppendix{} #2\labelspace#1}{#3}} +\def\appendixentry#1#2#3{% + \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}} % % Appendices, in the short toc. \let\shortappendixentry = \shortchapentry @@ -4073,21 +4281,21 @@ } % Unnumbered chapters. -\def\unnumbchapentry#1#2{\dochapentry{#1}{#2}} -\def\shortunnumberedentry#1#2{\tocentry{#1}{\doshortpageno\bgroup#2\egroup}} +\def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}} +\def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} -\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}} +\def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} -\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} +\def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} -\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}} +\def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc @@ -4189,14 +4397,14 @@ \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie + \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 - \catcode 43=12 % plus - \catcode`\"=12 - \catcode`\==12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 + \catcode `\+=\other + \catcode `\"=\other + \catcode `\==\other + \catcode `\|=\other + \catcode `\<=\other + \catcode `\>=\other \escapechar=`\\ % \let\b=\ptexb @@ -4250,15 +4458,18 @@ % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the -% start of the next paragraph will insert \parskip +% start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% - \ifnum\lastpenalty < 10000 + % =10000 instead of <10000 because of a special case in \itemzzz, q.v. + \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip - \penalty-50 + % it's not a good place to break if the last penalty was \nobreak + % or better ... + \ifnum\lastpenalty>10000 \else \penalty-50 \fi \vskip\envskipamount \fi \fi @@ -4290,7 +4501,8 @@ % \newskip\lskip\newskip\rskip -\long\def\cartouche{% +\def\cartouche{% +\par % can't be in the midst of a paragraph. \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. @@ -4337,7 +4549,6 @@ \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. - \singlespace \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt @@ -4376,27 +4587,16 @@ % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} -% @small... is usually equivalent to the non-small (@smallbook -% redefines). We must call \example (or whatever) last in the -% definition, since it reads the return following the @example (or -% whatever) command. -% -% This actually allows (for example) @end display inside an -% @smalldisplay. Too bad, but makeinfo will catch the error anyway. -% -\def\smalldisplay{\begingroup\def\Esmalldisplay{\nonfillfinish\endgroup}\display} -\def\smallexample{\begingroup\def\Esmallexample{\nonfillfinish\endgroup}\lisp} -\def\smallformat{\begingroup\def\Esmallformat{\nonfillfinish\endgroup}\format} -\def\smalllisp{\begingroup\def\Esmalllisp{\nonfillfinish\endgroup}\lisp} - -% Real @smallexample and @smalllisp (when @smallbook): use smaller fonts. +% @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. -\def\smalllispx{\begingroup +\def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallexamplefonts \lisp } +\let\smallexample = \smalllisp + % @display: same as @lisp except keep current font. % @@ -4406,9 +4606,9 @@ \gobble } % -% @smalldisplay (when @smallbook): @display plus smaller fonts. +% @smalldisplay: @display plus smaller fonts. % -\def\smalldisplayx{\begingroup +\def\smalldisplay{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallexamplefonts \rm \display @@ -4423,9 +4623,9 @@ \gobble } % -% @smallformat (when @smallbook): @format plus smaller fonts. +% @smallformat: @format plus smaller fonts. % -\def\smallformatx{\begingroup +\def\smallformat{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallexamplefonts \rm \format @@ -4452,7 +4652,6 @@ \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \singlespace \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... @@ -4475,10 +4674,14 @@ % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % -% [Knuth] p. 344; only we need to do '@' too +% [Knuth] p.344; only we need to do the other characters Texinfo sets +% active too. Otherwise, they get lost as the first character on a +% verbatim line. \def\dospecials{% - \do\ \do\\\do\@\do\{\do\}\do\$\do\&% - \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~} + \do\ \do\\\do\{\do\}\do\$\do\&% + \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% + \do\<\do\>\do\|\do\@\do+\do\"% +} % % [Knuth] p. 380 \def\uncatcodespecials{% @@ -4565,7 +4768,7 @@ % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': -% we need not redefine '\', '{' and '}' +% we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] %% Include LaTeX hack for completeness -- never know @@ -4575,9 +4778,14 @@ %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ %% #1|endgroup|def|Everbatim[]|end[verbatim]] %% |endgroup +% \begingroup \catcode`\ =\active - \gdef\doverbatim#1@end verbatim{#1\end{verbatim}} + \obeylines % + % ignore everything up to the first ^^M, that's the newline at the end + % of the @verbatim input line itself. Otherwise we get an extra blank + % line in the output. + \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% \endgroup % \def\verbatim{% @@ -4593,14 +4801,14 @@ % Allow normal characters that we make active in the argument (a file name). \def\verbatiminclude{% \begingroup - \catcode`\\=12 - \catcode`~=12 - \catcode`^=12 - \catcode`_=12 - \catcode`|=12 - \catcode`<=12 - \catcode`>=12 - \catcode`+=12 + \catcode`\\=\other + \catcode`~=\other + \catcode`^=\other + \catcode`_=\other + \catcode`|=\other + \catcode`<=\other + \catcode`>=\other + \catcode`+=\other \parsearg\doverbatiminclude } \def\setupverbatiminclude{% @@ -4614,44 +4822,102 @@ % Restore active chars for included file. \endgroup \begingroup - \def\thisfile{#1}% - \expandafter\expandafter\setupverbatiminclude\input\thisfile - \endgroup\nonfillfinish\endgroup + \let\value=\expandablevalue + \def\thisfile{#1}% + \expandafter\expandafter\setupverbatiminclude\input\thisfile + \endgroup + \nonfillfinish + \endgroup } % @copying ... @end copying. -% Save the text away for @insertcopying later. +% Save the text away for @insertcopying later. Many commands won't be +% allowed in this context, but that's ok. +% +% We save the uninterpreted tokens, rather than creating a box. +% Saving the text in a box would be much easier, but then all the +% typesetting commands (@smallbook, font changes, etc.) have to be done +% beforehand -- and a) we want @copying to be done first in the source +% file; b) letting users define the frontmatter in as flexible order as +% possible is very desirable. % -\newbox\copyingbox -% \def\copying{\begingroup + % Define a command to swallow text until we reach `@end copying'. + % \ is the escape char in this texinfo.tex file, so it is the + % delimiter for the command; @ will be the escape char when we read + % it, but that doesn't matter. + \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% + % + % We must preserve ^^M's in the input file; see \insertcopying below. + \catcode`\^^M = \active + \docopying +} + +% What we do to finish off the copying text. +% +\def\enddocopying{\endgroup\ignorespaces} + +% @insertcopying. Here we must play games with ^^M's. On the one hand, +% we need them to delimit commands such as `@end quotation', so they +% must be active. On the other hand, we certainly don't want every +% end-of-line to be a \par, as would happen with the normal active +% definition of ^^M. On the third hand, two ^^M's in a row should still +% generate a \par. +% +% Our approach is to make ^^M insert a space and a penalty1 normally; +% then it can also check if \lastpenalty=1. If it does, then manually +% do \par. +% +% This messes up the normal definitions of @c[omment], so we redefine +% it. Similarly for @ignore. (These commands are used in the gcc +% manual for man page generation.) +% +% Seems pretty fragile, most line-oriented commands will presumably +% fail, but for the limited use of getting the copying text (which +% should be quite simple) inserted, we can hope it's ok. +% +{\catcode`\^^M=\active % +\gdef\insertcopying{\begingroup % \parindent = 0pt % looks wrong on title page - \def\Ecopying{\egroup\endgroup}% - \global\setbox\copyingbox = \vbox\bgroup + \def^^M{% + \ifnum \lastpenalty=1 % + \par % + \else % + \space \penalty 1 % + \fi % + }% + % + % Fix @c[omment] for catcode 13 ^^M's. + \def\c##1^^M{\ignorespaces}% + \let\comment = \c % + % + % Don't bother jumping through all the hoops that \doignore does, it + % would be very hard since the catcodes are already set. + \long\def\ignore##1\end ignore{\ignorespaces}% + % + \copyingtext % +\endgroup}% } -% @insertcopying. -% -\def\insertcopying{\unvcopy\copyingbox} - - \message{defuns,} % @defun etc. % Allow user to change definition object font (\df) internally -\def\setdeffont #1 {\csname DEF#1\endcsname} +\def\setdeffont#1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt -\newskip\deftypemargin \deftypemargin=12pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount -% define \functionparens, which makes ( and ) and & do special things. -% \functionparens affects the group it is contained in. + +% We want ()&[] to print specially on the defun line. +% \def\activeparens{% -\catcode`\(=\active \catcode`\)=\active \catcode`\&=\active -\catcode`\[=\active \catcode`\]=\active} + \catcode`\(=\active \catcode`\)=\active + \catcode`\&=\active + \catcode`\[=\active \catcode`\]=\active +} % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) @@ -4698,88 +4964,124 @@ % Active &'s sneak into the index arguments, so make sure it's defined. { - \catcode`& = 13 + \catcode`& = \active \global\let& = \ampnr } -% First, defname, which formats the header line itself. -% #1 should be the function name. -% #2 should be the type of definition, such as "Function". - -\def\defname #1#2{% -% Get the values of \leftskip and \rightskip as they were -% outside the @def... -\dimen2=\leftskip -\advance\dimen2 by -\defbodyindent -\noindent -\setbox0=\hbox{\hskip \deflastargmargin{\rm #2}\hskip \deftypemargin}% -\dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line -\dimen1=\hsize \advance \dimen1 by -\defargsindent %size for continuations -\parshape 2 0in \dimen0 \defargsindent \dimen1 -% Now output arg 2 ("Function" or some such) -% ending at \deftypemargin from the right margin, -% but stuck inside a box of width 0 so it does not interfere with linebreaking -{% Adjust \hsize to exclude the ambient margins, -% so that \rightline will obey them. -\advance \hsize by -\dimen2 -\rlap{\rightline{{\rm #2}\hskip -1.25pc }}}% -% Make all lines underfull and no complaints: -\tolerance=10000 \hbadness=10000 -\advance\leftskip by -\defbodyindent -\exdentamount=\defbodyindent -{\df #1}\enskip % Generate function name -} - -% Actually process the body of a definition -% #1 should be the terminating control sequence, such as \Edefun. -% #2 should be the "another name" control sequence, such as \defunx. -% #3 should be the control sequence that actually processes the header, -% such as \defunheader. - -\def\defparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2{\begingroup\obeylines\activeparens\spacesplit#3}% -\parindent=0in -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup % -\catcode 61=\active % 61 is `=' -\obeylines\activeparens\spacesplit#3} +% \defname, which formats the name of the @def (not the args). +% #1 is the function name. +% #2 is the type of definition, such as "Function". +% +\def\defname#1#2{% + % How we'll output the type name. Putting it in brackets helps + % distinguish it from the body text that may end up on the next line + % just below it. + \ifempty{#2}% + \def\defnametype{}% + \else + \def\defnametype{[\rm #2]}% + \fi + % + % Get the values of \leftskip and \rightskip as they were outside the @def... + \dimen2=\leftskip + \advance\dimen2 by -\defbodyindent + % + % Figure out values for the paragraph shape. + \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% + \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line + \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations + \parshape 2 0in \dimen0 \defargsindent \dimen1 + % + % Output arg 2 ("Function" or some such) but stuck inside a box of + % width 0 so it does not interfere with linebreaking. + \noindent + % + {% Adjust \hsize to exclude the ambient margins, + % so that \rightline will obey them. + \advance \hsize by -\dimen2 + \dimen3 = 0pt % was -1.25pc + \rlap{\rightline{\defnametype\kern\dimen3}}% + }% + % + % Allow all lines to be underfull without complaint: + \tolerance=10000 \hbadness=10000 + \advance\leftskip by -\defbodyindent + \exdentamount=\defbodyindent + {\df #1}\enskip % output function name + % \defunargs will be called next to output the arguments, if any. +} +% Common pieces to start any @def... % #1 is the \E... control sequence to end the definition (which we define). -% #2 is the \...x control sequence for consecutive fns (which we define). -% #3 is the control sequence to call to resume processing. +% #2 is the \...x control sequence (which our caller defines). +% #3 is the control sequence to process the header, such as \defunheader. +% +\def\parsebodycommon#1#2#3{% + \begingroup\inENV + % If there are two @def commands in a row, we'll have a \nobreak, + % which is there to keep the function description together with its + % header. But if there's nothing but headers, we want to allow a + % break after all. Check for penalty 10002 (inserted by + % \defargscommonending) instead of 10000, since the sectioning + % commands insert a \penalty10000, and we don't want to allow a break + % between a section heading and a defun. + \ifnum\lastpenalty=10002 \penalty0 \fi + \medbreak + % + % Define the \E... end token that this defining construct specifies + % so that it will exit this group. + \def#1{\endgraf\endgroup\medbreak}% + % + \parindent=0in + \advance\leftskip by \defbodyindent + \exdentamount=\defbodyindent +} + +% Common part of the \...x definitions. +% +\def\defxbodycommon{% + % As with \parsebodycommon above, allow line break if we have multiple + % x headers in a row. It's not a great place, though. + \ifnum\lastpenalty=10000 \penalty1000 \fi + % + \begingroup\obeylines +} + +% Process body of @defun, @deffn, @defmac, etc. +% +\def\defparsebody#1#2#3{% + \parsebodycommon{#1}{#2}{#3}% + \def#2{\defxbodycommon \activeparens \spacesplit#3}% + \catcode\equalChar=\active + \begingroup\obeylines\activeparens + \spacesplit#3% +} + +% #1, #2, #3 are the common arguments (see \parsebodycommon above). % #4, delimited by the space, is the class name. % -\def\defmethparsebody#1#2#3#4 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}}}% -\parindent=0in -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\activeparens\spacesplit{#3{#4}}} +\def\defmethparsebody#1#2#3#4 {% + \parsebodycommon{#1}{#2}{#3}% + \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% + \begingroup\obeylines\activeparens + % The \empty here prevents misinterpretation of a construct such as + % @deffn {whatever} {Enharmonic comma} + % See comments at \deftpparsebody, although in our case we don't have + % to remove the \empty afterwards, since it is empty. + \spacesplit{#3{#4}}\empty +} % Used for @deftypemethod and @deftypeivar. -% #1 is the \E... control sequence to end the definition (which we define). -% #2 is the \...x control sequence for consecutive fns (which we define). -% #3 is the control sequence to call to resume processing. +% #1, #2, #3 are the common arguments (see \defparsebody). % #4, delimited by a space, is the class name. % #5 is the method's return type. % -\def\deftypemethparsebody#1#2#3#4 #5 {\begingroup\inENV - \medbreak - \def#1{\endgraf\endgroup\medbreak}% - \def#2##1 ##2 {\begingroup\obeylines\activeparens\spacesplit{#3{##1}{##2}}}% - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup\obeylines\activeparens\spacesplit{#3{#4}{#5}}} +\def\deftypemethparsebody#1#2#3#4 #5 {% + \parsebodycommon{#1}{#2}{#3}% + \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% + \begingroup\obeylines\activeparens + \spacesplit{#3{#4}{#5}}% +} % Used for @deftypeop. The change from \deftypemethparsebody is an % extra argument at the beginning which is the `category', instead of it @@ -4788,64 +5090,48 @@ % input at hand. Thus also need a control sequence (passed as #5) for % the \E... definition to assign the category name to. % -\def\deftypeopparsebody#1#2#3#4#5 #6 {\begingroup\inENV - \medbreak - \def#1{\endgraf\endgroup\medbreak}% - \def#2##1 ##2 ##3 {% - \def#4{##1}% - \begingroup\obeylines\activeparens\spacesplit{#3{##2}{##3}}}% - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent - \begingroup\obeylines\activeparens\spacesplit{#3{#5}{#6}}} +\def\deftypeopparsebody#1#2#3#4#5 #6 {% + \parsebodycommon{#1}{#2}{#3}% + \def#2##1 ##2 ##3 {\def#4{##1}% + \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% + \begingroup\obeylines\activeparens + \spacesplit{#3{#5}{#6}}% +} -\def\defopparsebody #1#2#3#4#5 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 ##2 {\def#4{##1}% -\begingroup\obeylines\activeparens\spacesplit{#3{##2}}}% -\parindent=0in -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\activeparens\spacesplit{#3{#5}}} +% For @defop. +\def\defopparsebody #1#2#3#4#5 {% + \parsebodycommon{#1}{#2}{#3}% + \def#2##1 ##2 {\def#4{##1}% + \defxbodycommon \activeparens \spacesplit{#3{##2}}}% + \begingroup\obeylines\activeparens + \spacesplit{#3{#5}}% +} % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. - -\def\defvarparsebody #1#2#3{\begingroup\inENV% Environment for definitionbody -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2{\begingroup\obeylines\spacesplit#3}% -\parindent=0in -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup % -\catcode 61=\active % -\obeylines\spacesplit#3} - -% This is used for \def{tp,vr}parsebody. It could probably be used for -% some of the others, too, with some judicious conditionals. % -\def\parsebodycommon#1#2#3{% - \begingroup\inENV % - \medbreak % - % Define the end token that this defining construct specifies - % so that it will exit this group. - \def#1{\endgraf\endgroup\medbreak}% - \def#2##1 {\begingroup\obeylines\spacesplit{#3{##1}}}% - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent +\def\defvarparsebody #1#2#3{% + \parsebodycommon{#1}{#2}{#3}% + \def#2{\defxbodycommon \spacesplit#3}% + \catcode\equalChar=\active + \begingroup\obeylines + \spacesplit#3% +} + +% @defopvar. +\def\defopvarparsebody #1#2#3#4#5 {% + \parsebodycommon{#1}{#2}{#3}% + \def#2##1 ##2 {\def#4{##1}% + \defxbodycommon \spacesplit{#3{##2}}}% \begingroup\obeylines + \spacesplit{#3{#5}}% } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% + \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% + \begingroup\obeylines \spacesplit{#3{#4}}% } @@ -4860,6 +5146,8 @@ % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% + \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% + \begingroup\obeylines \spacesplit{\parsetpheaderline{#3{#4}}}\empty } @@ -4876,38 +5164,37 @@ #1{\removeemptybraces#2\relax}{#3}% }% -\def\defopvarparsebody #1#2#3#4#5 {\begingroup\inENV % -\medbreak % -% Define the end token that this defining construct specifies -% so that it will exit this group. -\def#1{\endgraf\endgroup\medbreak}% -\def#2##1 ##2 {\def#4{##1}% -\begingroup\obeylines\spacesplit{#3{##2}}}% -\parindent=0in -\advance\leftskip by \defbodyindent -\exdentamount=\defbodyindent -\begingroup\obeylines\spacesplit{#3{#5}}} - -% Split up #2 at the first space token. +% Split up #2 (the rest of the input line) at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. - -{\obeylines -\gdef\spacesplit#1#2^^M{\endgroup\spacesplitfoo{#1}#2 \relax\spacesplitfoo}% -\long\gdef\spacesplitfoo#1#2 #3#4\spacesplitfoo{% -\ifx\relax #3% -#1{#2}{}\else #1{#2}{#3#4}\fi}} - -% So much for the things common to all kinds of definitions. +% +{\obeylines % + \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% + \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% + \ifx\relax #3% + #1{#2}{}% + \else % + #1{#2}{#3#4}% + \fi}% +} % Define @defun. -% First, define the processing that is wanted for arguments of \defun -% Use this to expand the args and terminate the paragraph they make up +% This is called to end the arguments processing for all the @def... commands. +% +\def\defargscommonending{% + \interlinepenalty = 10000 + \advance\rightskip by 0pt plus 1fil + \endgraf + \nobreak\vskip -\parskip + \penalty 10002 % signal to \parsebodycommon. +} +% This expands the args and terminates the paragraph they comprise. +% \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. @@ -4916,9 +5203,7 @@ #1% {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% -\interlinepenalty=10000 -\advance\rightskip by 0pt plus 1fil -\endgraf\nobreak\vskip -\parskip\nobreak + \defargscommonending } \def\deftypefunargs #1{% @@ -4927,9 +5212,7 @@ % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars -\interlinepenalty=10000 -\advance\rightskip by 0pt plus 1fil -\endgraf\nobreak\vskip -\parskip\nobreak + \defargscommonending } % Do complete processing of one @defun or @defunx line already parsed. @@ -4940,7 +5223,7 @@ \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defun == @deffn Function @@ -4950,7 +5233,7 @@ \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) @@ -4964,7 +5247,7 @@ \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) @@ -4985,7 +5268,7 @@ % at least some C++ text from working \defname {\defheaderxcond#2\relax$.$#3}{#1}% \deftypefunargs {#4}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro @@ -4995,7 +5278,7 @@ \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form @@ -5005,7 +5288,7 @@ \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % -\catcode 61=\other % Turn off change made in \defparsebody +\catcode\equalChar=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... @@ -5014,9 +5297,11 @@ \defopparsebody\Edefop\defopx\defopheader\defoptype} % \def\defopheader#1#2#3{% -\dosubind {fn}{\code{#2}}{\putwordon\ #1}% Make entry in function index -\begingroup\defname {#2}{\defoptype\ \putwordon\ #1}% -\defunargs {#3}\endgroup % + \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry + \begingroup + \defname{#2}{\defoptype\ \putwordon\ #1}% + \defunargs{#3}% + \endgroup } % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... @@ -5083,9 +5368,11 @@ \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% -\dosubind {vr}{\code{#2}}{\putwordof\ #1}% Make entry in var index -\begingroup\defname {#2}{\defcvtype\ \putwordof\ #1}% -\defvarargs {#3}\endgroup % + \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry + \begingroup + \defname{#2}{\defcvtype\ \putwordof\ #1}% + \defvarargs{#3}% + \endgroup } % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME @@ -5093,7 +5380,7 @@ \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} % \def\defivarheader#1#2#3{% - \dosubind {vr}{\code{#2}}{\putwordof\ #1}% entry in var index + \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% \defvarargs{#3}% @@ -5105,8 +5392,8 @@ % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% -\interlinepenalty=10000 -\endgraf\nobreak\vskip -\parskip\nobreak} + \defargscommonending +} % @defvr Counter foo-count @@ -5142,8 +5429,7 @@ \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% -\interlinepenalty=10000 -\endgraf\nobreak\vskip -\parskip\nobreak + \defargscommonending \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} @@ -5153,8 +5439,7 @@ \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} -\interlinepenalty=10000 -\endgraf\nobreak\vskip -\parskip\nobreak + \defargscommonending \endgroup} % Now define @deftp @@ -5203,7 +5488,7 @@ \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex - \catcode`\@=0 \catcode`\\=12 \escapechar=`\@ + \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp @@ -5217,7 +5502,7 @@ \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex -\catcode`\@=0 \catcode`\\=12 \escapechar=`\@ +\catcode`\@=0 \catcode`\\=\other \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi @@ -5247,7 +5532,7 @@ } % Trim a single trailing ^^M off a string. -{\catcode`\^^M=12\catcode`\Q=3% +{\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% @@ -5262,29 +5547,29 @@ % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 - \catcode`\+=12 - \catcode`\{=12 - \catcode`\}=12 - \catcode`\@=12 - \catcode`\^^M=12 + \catcode`\~=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\+=\other + \catcode`\{=\other + \catcode`\}=\other + \catcode`\@=\other + \catcode`\^^M=\other \usembodybackslash} \def\macroargctxt{% - \catcode`\~=12 - \catcode`\^=12 - \catcode`\_=12 - \catcode`\|=12 - \catcode`\<=12 - \catcode`\>=12 - \catcode`\+=12 - \catcode`\@=12 - \catcode`\\=12} + \catcode`\~=\other + \catcode`\^=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\+=\other + \catcode`\@=\other + \catcode`\\=\other} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N @@ -5325,32 +5610,33 @@ \else \expandafter\parsemacbody \fi} -\def\unmacro{\parsearg\unmacroxxx} -\def\unmacroxxx#1{% +\def\unmacro{\parsearg\dounmacro} +\def\dounmacro#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% - % Remove the macro name from \macrolist + % Remove the macro name from \macrolist: \begingroup - \edef\tempa{\expandafter\noexpand\csname#1\endcsname}% - \def\do##1{% - \def\tempb{##1}% - \ifx\tempa\tempb - % remove this - \else - \toks0 = \expandafter{\newmacrolist\do}% - \edef\newmacrolist{\the\toks0\expandafter\noexpand\tempa}% - \fi}% - \def\newmacrolist{}% - % Execute macro list to define \newmacrolist - \macrolist - \global\let\macrolist\newmacrolist + \expandafter\let\csname#1\endcsname \relax + \let\do\unmacrodo + \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } +% Called by \do from \dounmacro on each macro. The idea is to omit any +% macro definitions that have been changed to \relax. +% +\def\unmacrodo#1{% + \ifx#1\relax + % remove this + \else + \noexpand\do \noexpand #1% + \fi +} + % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. @@ -5533,15 +5819,23 @@ \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} -% \setref{NAME}{SNT} defines a cross-reference point NAME, namely -% NAME-title, NAME-pg, and NAME-SNT. Called from \foonoderef. We have -% to set \indexdummies so commands such as @code in a section title -% aren't expanded. It would be nicer not to expand the titles in the -% first place, but there's so many layers that that is hard to do. +% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an +% anchor), namely NAME-title (the corresponding @chapter/etc. name), +% NAME-pg (the page number), and NAME-snt (section number and type). +% Called from \foonoderef. +% +% We have to set \indexdummies so commands such as @code in a section +% title aren't expanded. It would be nicer not to expand the titles in +% the first place, but there's so many layers that that is hard to do. % +% Likewise, use \turnoffactive so that punctuation chars such as underscore +% and backslash work in node names. +% \def\setref#1#2{{% - \indexdummies + \atdummies \pdfmkdest{#1}% + % + \turnoffactive \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{#2}% @@ -5593,7 +5887,7 @@ \ifpdf \leavevmode \getfilename{#4}% - {\normalturnoffactive + {\turnoffactive \otherbackslash \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1}% @@ -5613,7 +5907,7 @@ % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. - {\normalturnoffactive + {\turnoffactive \otherbackslash % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% @@ -5622,73 +5916,74 @@ % [mynode], [\printednodename],\space % page 3 - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} -% \dosetq is the interface for calls from other macros - -% Use \normalturnoffactive so that punctuation chars such as underscore -% and backslash work in node names. (\turnoffactive doesn't do \.) +% \dosetq is called from \setref to do the actual \write (\iflinks). +% \def\dosetq#1#2{% {\let\folio=0% - \normalturnoffactive \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% - \iflinks - \next - \fi + \iflinks \next \fi }% } -% \internalsetq {foo}{page} expands into -% CHARACTERS 'xrdef {foo}{...expansion of \Ypage...} -% When the aux file is read, ' is the escape character - -\def\internalsetq #1#2{'xrdef {#1}{\csname #2\endcsname}} - -% Things to be expanded by \internalsetq +% \internalsetq{foo}{page} expands into +% CHARACTERS @xrdef{foo}{...expansion of \page...} +\def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} +% Things to be expanded by \internalsetq. +% \def\Ypagenumber{\folio} - \def\Ytitle{\thissection} - \def\Ynothing{} - \def\Ysectionnumberandtype{% -\ifnum\secno=0 \putwordChapter\xreftie\the\chapno % -\else \ifnum \subsecno=0 \putwordSection\xreftie\the\chapno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } + \ifnum\secno=0 + \putwordChapter@tie \the\chapno + \else \ifnum\subsecno=0 + \putwordSection@tie \the\chapno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno + \else + \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} \def\Yappendixletterandtype{% -\ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}% -\else \ifnum \subsecno=0 \putwordSection\xreftie'char\the\appendixno.\the\secno % -\else \ifnum \subsubsecno=0 % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno % -\else % -\putwordSection\xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno % -\fi \fi \fi } - -\gdef\xreftie{'tie} + \ifnum\secno=0 + \putwordAppendix@tie @char\the\appendixno{}% + \else \ifnum\subsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno + \else \ifnum\subsubsecno=0 + \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno + \else + \putwordSection@tie + @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno + \fi\fi\fi +} % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Non-3.0. + \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. - +% \def\refx#1#2{% - \expandafter\ifx\csname X#1\endcsname\relax + {% + \indexnofonts + \otherbackslash + \expandafter\global\expandafter\let\expandafter\thisrefX + \csname X#1\endcsname + }% + \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks @@ -5703,19 +5998,14 @@ \fi \else % It's defined, so just use it. - \csname X#1\endcsname + \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % -\def\xrdef#1{\begingroup - % Reenable \ as an escape while reading the second argument. - \catcode`\\ = 0 - \afterassignment\endgroup - \expandafter\gdef\csname X#1\endcsname -} +\def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup @@ -5746,9 +6036,7 @@ \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other - \catcode`\@=\other - \catcode`\^=\other - % It was suggested to define this as 7, which would allow ^^e4 etc. + % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ @@ -5761,6 +6049,9 @@ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % + \catcode`\^=\other + % + % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other @@ -5772,7 +6063,9 @@ \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other + \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off + % % Make the characters 128-255 be printing characters {% \count 1=128 @@ -5782,17 +6075,18 @@ \ifnum \count 1<256 \loop \fi }% }% - % The aux file uses ' as the escape (for now). + % % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. - % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ + % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. + \catcode`\\=\other + % + % @ is our escape character in .aux files. \catcode`\{=1 \catcode`\}=2 - \catcode`\%=\other - \catcode`\'=0 - \catcode`\\=\other + \catcode`\@=0 % \openin 1 \jobname.aux \ifeof 1 \else @@ -5837,7 +6131,7 @@ % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf - \footnotezzz + \dofootnote }% % Don't bother with the trickery in plain.tex to not require the @@ -5847,10 +6141,17 @@ % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % -\long\gdef\footnotezzz{\insert\footins\bgroup +% The start of the footnote looks usually like this: +\gdef\startfootins{\insert\footins\bgroup} +% +% ... but this macro is redefined inside @multitable. +% +\gdef\dofootnote{% + \startfootins % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. + \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox @@ -5880,12 +6181,6 @@ \footstrut \futurelet\next\fo@t } -\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t - \else\let\next\f@t\fi \next} -\def\f@@t{\bgroup\aftergroup\@foot\let\next} -\def\f@t#1{#1\@foot} -\def\@foot{\strut\par\egroup} - }%end \catcode `\@=11 % @| inserts a changebar to the left of the current line. It should @@ -5932,8 +6227,8 @@ \openin 1 = epsf.tex \ifeof 1 \else \closein 1 - % Do not bother showing banner with post-v2.7 epsf.tex (available in - % doc/epsf.tex until it shows up on ctan). + % Do not bother showing banner with epsf.tex v2.7k (available in + % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi @@ -6058,11 +6353,13 @@ } % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; -% 4) hoffset; 5) binding offset; 6) topskip. We also call -% \setleading{\textleading}, so the caller should define \textleading. -% The caller should also set \parskip. +% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) +% physical page width. +% +% We also call \setleading{\textleading}, so the caller should define +% \textleading. The caller should also set \parskip. % -\def\internalpagesizes#1#2#3#4#5#6{% +\def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip @@ -6081,28 +6378,27 @@ \normaloffset = #4\relax \bindingoffset = #5\relax % + \ifpdf + \pdfpageheight #7\relax + \pdfpagewidth #8\relax + \fi + % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } -% Use `small' versions. -% -\def\smallenvironments{% - \let\smalldisplay = \smalldisplayx - \let\smallexample = \smalllispx - \let\smallformat = \smallformatx - \let\smalllisp = \smalllispx -} - % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}{\voffset}{.25in}{\bindingoffset}{36pt}% + \internalpagesizes{46\baselineskip}{6in}% + {\voffset}{.25in}% + {\bindingoffset}{36pt}% + {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. @@ -6110,26 +6406,42 @@ \parskip = 2pt plus 1pt \textleading = 12pt % - \internalpagesizes{7.5in}{5.in}{\voffset}{.25in}{\bindingoffset}{16pt}% + \internalpagesizes{7.5in}{5in}% + {\voffset}{.25in}% + {\bindingoffset}{16pt}% + {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt - \deftypemargin = 0pt \defbodyindent = .5cm - \smallenvironments }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt - \textleading = 12pt + \textleading = 13.2pt % - \internalpagesizes{53\baselineskip}{160mm}{\voffset}{4mm}{\bindingoffset}{44pt}% + % Double-side printing via postscript on Laserjet 4050 + % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. + % To change the settings for a different printer or situation, adjust + % \normaloffset until the front-side and back-side texts align. Then + % do the same for \bindingoffset. You can set these for testing in + % your texinfo source file like this: + % @tex + % \global\normaloffset = -6mm + % \global\bindingoffset = 10mm + % @end tex + \internalpagesizes{51\baselineskip}{160mm} + {\voffset}{\hoffset}% + {\bindingoffset}{44pt}% + {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt + \contentsrightmargin = 0pt + \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. @@ -6139,37 +6451,40 @@ \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % - \internalpagesizes{166mm}{120mm}{\voffset}{-8mm}{\bindingoffset}{8pt}% + \internalpagesizes{160mm}{120mm}% + {\voffset}{\hoffset}% + {\bindingoffset}{8pt}% + {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt - \contentsrightmargin = 0mm - \deftypemargin = 0pt + \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm - % - \smallenvironments }} -% A specific text layout, 24x15cm overall, intended for A4 paper. Top margin -% 29mm, hence bottom margin 28mm, nominal side margin 3cm. +% A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 - \textleading = 13.6pt - % \afourpaper - \internalpagesizes{237mm}{150mm}{3.6mm}{3.6mm}{3mm}{7mm}% + \internalpagesizes{237mm}{150mm}% + {\voffset}{4.6mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% % - % Must explicitly reset to 0 because we call \afourpaper, apparently, - % although this does not entirely make sense. + % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} -% Use @afourwide to print on European A4 paper in wide format. -\def\afourwide{% +% Use @afourwide to print on A4 paper in landscape format. +\def\afourwide{{\globaldefs = 1 \afourpaper - \internalpagesizes{6.5in}{9.5in}{\hoffset}{\normaloffset}{\bindingoffset}{7mm}% -} + \internalpagesizes{241mm}{165mm}% + {\voffset}{-2.95mm}% + {\bindingoffset}{7mm}% + {297mm}{210mm}% + \globaldefs = 0 +}} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, @@ -6184,7 +6499,16 @@ \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % - \internalpagesizes{#1}{\hsize}{\voffset}{\normaloffset}{\bindingoffset}{44pt}% + \dimen0 = #1 + \advance\dimen0 by \voffset + % + \dimen2 = \hsize + \advance\dimen2 by \normaloffset + % + \internalpagesizes{#1}{\hsize}% + {\voffset}{\normaloffset}% + {\bindingoffset}{44pt}% + {\dimen0}{\dimen2}% }} % Set default to letter. @@ -6248,7 +6572,7 @@ \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. -\def\_{\leavevmode \kern.06em \vbox{\hrule width.3em height.1ex}} +\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} @@ -6262,8 +6586,6 @@ \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix -%\catcode 27=\active -%\def^^[{$\diamondsuit$} % Set up an active definition for =, but don't enable it most of the time. {\catcode`\==\active @@ -6280,44 +6602,46 @@ \catcode`\@=0 -% \rawbackslashxx output one backslash character in current font +% \rawbackslashxx outputs one backslash character in current font, +% as in \char`\\. \global\chardef\rawbackslashxx=`\\ -%{\catcode`\\=\other -%@gdef@rawbackslashxx{\}} -% \rawbackslash redefines \ as input to do \rawbackslashxx. +% \rawbackslash defines an active \ to do \rawbackslashxx. +% \otherbackslash defines an active \ to be a literal `\' character with +% catcode other. {\catcode`\\=\active -@gdef@rawbackslash{@let\=@rawbackslashxx }} + @gdef@rawbackslash{@let\=@rawbackslashxx} + @gdef@otherbackslash{@let\=@realbackslash} +} + +% \realbackslash is an actual character `\' with catcode other. +{\catcode`\\=\other @gdef@realbackslash{\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} -% \catcode 17=0 % Define control-q \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. -@def@turnoffactive{@let"=@normaldoublequote -@let\=@realbackslash -@let~=@normaltilde -@let^=@normalcaret -@let_=@normalunderscore -@let|=@normalverticalbar -@let<=@normalless -@let>=@normalgreater -@let+=@normalplus -@let$=@normaldollar}%$ font-lock fix - -@def@normalturnoffactive{@let"=@normaldoublequote -@let\=@normalbackslash -@let~=@normaltilde -@let^=@normalcaret -@let_=@normalunderscore -@let|=@normalverticalbar -@let<=@normalless -@let>=@normalgreater -@let+=@normalplus -@let$=@normaldollar}%$ font-lock fix +@def@turnoffactive{% + @let"=@normaldoublequote + @let\=@realbackslash + @let~=@normaltilde + @let^=@normalcaret + @let_=@normalunderscore + @let|=@normalverticalbar + @let<=@normalless + @let>=@normalgreater + @let+=@normalplus + @let$=@normaldollar %$ font-lock fix +} + +% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of +% the literal character `\'. (Thus, \ is not expandable when this is in +% effect.) +% +@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. diff -urN gawk-3.1.1/eval.c gawk-3.1.2/eval.c --- gawk-3.1.1/eval.c 2002-04-16 14:41:14.000000000 +0300 +++ gawk-3.1.2/eval.c 2003-03-03 14:35:05.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -31,15 +31,17 @@ static int eval_condition P((NODE *tree)); static NODE *op_assign P((NODE *tree)); -static NODE *func_call P((NODE *name, NODE *arg_list)); +static NODE *func_call P((NODE *tree)); static NODE *match_op P((NODE *tree)); +static int forloops_active P((void)); +static void pop_forloop P((void)); +static void pop_all_forloops P((void)); +static void push_forloop P((const char *varname, NODE **elems, size_t nelems)); static void push_args P((int count, NODE *arglist, NODE **oldstack, - char *func_name, char **varnames)); + const char *func_name, char **varnames)); static void pop_fcall_stack P((void)); static void pop_fcall P((void)); static int in_function P((void)); -char *nodetype2str P((NODETYPE type)); -char *flags2str P((int flagval)); static int comp_func P((const void *p1, const void *p2)); #if __GNUC__ < 2 @@ -66,8 +68,8 @@ * the val variable allows return/continue/break-out-of-context to be * caught and diagnosed */ -#define PUSH_BINDING(stack, x, val) (memcpy((char *)(stack), (char *)(x), sizeof(jmp_buf)), val++) -#define RESTORE_BINDING(stack, x, val) (memcpy((char *)(x), (char *)(stack), sizeof(jmp_buf)), val--) +#define PUSH_BINDING(stack, x, val) (memcpy((char *)(stack), (const char *)(x), sizeof(jmp_buf)), val++) +#define RESTORE_BINDING(stack, x, val) (memcpy((char *)(x), (const char *)(stack), sizeof(jmp_buf)), val--) static jmp_buf loop_tag; /* always the current binding */ static int loop_tag_valid = FALSE; /* nonzero when loop_tag valid */ @@ -92,7 +94,7 @@ * just in this file. */ #if 'a' == 97 /* it's ascii */ -char casetable[] = { +const char casetable[] = { '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', @@ -150,7 +152,7 @@ * This table maps node types to strings for debugging. * KEEP IN SYNC WITH awk.h!!!! */ -static char *nodetypes[] = { +static const char *const nodetypes[] = { "Node_illegal", "Node_times", "Node_quotient", @@ -198,6 +200,7 @@ "Node_K_break", "Node_K_continue", "Node_K_print", + "Node_K_print_rec", "Node_K_printf", "Node_K_next", "Node_K_exit", @@ -248,7 +251,7 @@ /* nodetype2str --- convert a node type into a printable value */ -char * +const char * nodetype2str(NODETYPE type) { static char buf[40]; @@ -262,16 +265,16 @@ /* flags2str --- make a flags value readable */ -char * +const char * flags2str(int flagval) { - static struct flagtab values[] = { + static const struct flagtab values[] = { { MALLOC, "MALLOC" }, { TEMP, "TEMP" }, { PERM, "PERM" }, { STRING, "STRING" }, - { STR, "STR" }, - { NUM, "NUM" }, + { STRCUR, "STRCUR" }, + { NUMCUR, "NUMCUR" }, { NUMBER, "NUMBER" }, { MAYBE_NUM, "MAYBE_NUM" }, { ARRAYMAXED, "ARRAYMAXED" }, @@ -288,8 +291,8 @@ /* genflags2str --- general routine to convert a flag value to a string */ -char * -genflags2str(int flagval, struct flagtab *tab) +const char * +genflags2str(int flagval, const struct flagtab *tab) { static char buffer[BUFSIZ]; char *sp; @@ -369,8 +372,16 @@ } break; case TAG_CONTINUE: /* NEXT statement */ + if (forloops_active()) + pop_all_forloops(); + if (in_function()) + pop_fcall_stack(); return 1; - case TAG_BREAK: + case TAG_BREAK: /* EXIT statement */ + if (forloops_active()) + pop_all_forloops(); + if (in_function()) + pop_fcall_stack(); return 0; default: cant_happen(); @@ -466,8 +477,8 @@ Func_ptr after_assign = NULL; NODE **list = 0; NODE *volatile array; - volatile size_t i; - size_t j, num_elems; + volatile size_t i, num_elems; + size_t j; volatile int retval = 0; int sort_indices = whiny_users; @@ -500,7 +511,8 @@ continue; for (; t != NULL; t = t->ahnext) { - list[j++] = dupnode(t->ahname); + list[j++] = dupnode(t); + assert(list[j-1] == t); } } @@ -509,6 +521,7 @@ qsort(list, num_elems, sizeof(NODE *), comp_func); /* shazzam! */ /* now we can run the loop */ + push_forloop(array->vname, list, num_elems); PUSH_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); lhs = get_lhs(tree->hakvar, &after_assign, FALSE); @@ -516,7 +529,7 @@ for (i = 0; i < num_elems; i++) { INCREMENT(stable_tree->exec_count); unref(*((NODE **) lhs)); - *lhs = dupnode(list[i]); + *lhs = make_string(list[i]->ahname_str, list[i]->ahname_len); if (after_assign) (*after_assign)(); switch (setjmp(loop_tag)) { @@ -536,20 +549,18 @@ done: RESTORE_BINDING(loop_tag_stack, loop_tag, loop_tag_valid); + pop_forloop(); if (do_lint && num_elems != array->table_size) - lintwarn(_("for loop: array `%s' changed size from %d to %d during loop execution"), - array->vname, num_elems, array->table_size); + lintwarn(_("for loop: array `%s' changed size from %ld to %ld during loop execution"), + array->vname, (long) num_elems, (long) array->table_size); - for (i = 0; i < num_elems; i++) - unref(list[i]); - - free(list); - if (retval == 1) return 1; break; } +#undef hakvar +#undef arrvar case Node_K_break: INCREMENT(tree->exec_count); @@ -567,8 +578,6 @@ } if (! do_traditional || do_posix) fatal(_("`break' outside a loop is not allowed")); - if (in_function()) - pop_fcall_stack(); longjmp(rule_tag, TAG_CONTINUE); } else longjmp(loop_tag, TAG_BREAK); @@ -590,8 +599,6 @@ } if (! do_traditional || do_posix) fatal(_("`continue' outside a loop is not allowed")); - if (in_function()) - pop_fcall_stack(); longjmp(rule_tag, TAG_CONTINUE); } else longjmp(loop_tag, TAG_CONTINUE); @@ -602,6 +609,11 @@ do_print(tree); break; + case Node_K_print_rec: + INCREMENT(tree->exec_count); + do_print_rec(tree); + break; + case Node_K_printf: INCREMENT(tree->exec_count); do_printf(tree); @@ -613,6 +625,7 @@ break; case Node_K_delete_loop: + INCREMENT(tree->exec_count); do_delete_loop(tree->lnode, tree->rnode); break; @@ -623,10 +636,7 @@ else if (in_end_rule) fatal(_("`next' cannot be called from an END rule")); - /* could add a lint check here */ - if (in_function()) - pop_fcall_stack(); - + /* could add a lint check here for in a loop or function */ longjmp(rule_tag, TAG_CONTINUE); break; @@ -637,7 +647,14 @@ else if (in_end_rule) fatal(_("`nextfile' cannot be called from an END rule")); - /* could add a lint check here */ + /* could add a lint check here for in a loop or function */ + /* + * Have to do this cleanup here, since we don't longjump + * back to the main awk rule loop (rule_tag). + */ + if (forloops_active()) + pop_all_forloops(); + if (in_function()) pop_fcall_stack(); @@ -679,7 +696,8 @@ lintwarn(_("statement has no effect")); INCREMENT(tree->exec_count); t = tree_eval(tree); - free_temp(t); + if (t) /* stopme() returns NULL */ + free_temp(t); break; } return 1; @@ -757,16 +775,16 @@ /* Builtins */ case Node_builtin: - return (*tree->proc)(tree->subnode); + return (*tree->builtin)(tree->subnode); case Node_K_getline: return (do_getline(tree)); case Node_in_array: - return tmp_number((AWKNUM) in_array(tree->lnode, tree->rnode)); + return tmp_number((AWKNUM) (in_array(tree->lnode, tree->rnode) != NULL)); case Node_func_call: - return func_call(tree->rnode, tree->lnode); + return func_call(tree); /* unary operations */ case Node_NR: @@ -809,28 +827,6 @@ case Node_dynregex: return match_op(tree); - case Node_func: - fatal(_("function `%s' called with space between name and `(',\n%s"), - tree->lnode->param, - _("or used in other expression context")); - - /* assignments */ - case Node_assign: - { - Func_ptr after_assign = NULL; - - if (do_lint && iscond) - lintwarn(_("assignment used in conditional context")); - r = tree_eval(tree->rnode); - lhs = get_lhs(tree->lnode, &after_assign, FALSE); - assign_val(lhs, r); - free_temp(r); - tree->lnode->flags |= SCALAR; - if (after_assign) - (*after_assign)(); - return *lhs; - } - case Node_concat: { NODE **treelist; @@ -930,6 +926,23 @@ } return r; + /* assignments */ + case Node_assign: + { + Func_ptr after_assign = NULL; + + if (do_lint && iscond) + lintwarn(_("assignment used in conditional context")); + r = tree_eval(tree->rnode); + lhs = get_lhs(tree->lnode, &after_assign, FALSE); + + assign_val(lhs, r); + tree->lnode->flags |= SCALAR; + if (after_assign) + (*after_assign)(); + return *lhs; + } + /* other assignment types are easier because they are numeric */ case Node_preincrement: case Node_predecrement: @@ -1039,10 +1052,6 @@ case Node_minus: return tmp_number(x1 - x2); - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - tree->vname); - default: fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type)); } @@ -1135,14 +1144,15 @@ return ldiff; l = (ldiff <= 0 ? len1 : len2); if (IGNORECASE) { - register unsigned char *cp1 = (unsigned char *) t1->stptr; - register unsigned char *cp2 = (unsigned char *) t2->stptr; + const unsigned char *cp1 = (const unsigned char *) t1->stptr; + const unsigned char *cp2 = (const unsigned char *) t2->stptr; #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { mbstate_t mbs; memset(&mbs, 0, sizeof(mbstate_t)); - ret = strncasecmpmbs(cp1, mbs, cp2, mbs, l); + ret = strncasecmpmbs((const char *) cp1, mbs, + (const char *) cp2, mbs, l); } else #endif for (ret = 0; l-- > 0 && ret == 0; cp1++, cp2++) @@ -1163,54 +1173,40 @@ long ltemp; NODE *tmp; Func_ptr after_assign = NULL; + int post = FALSE; /* - * For ++ and --, get the lhs when doing the op and then - * return. For += etc, do the rhs first, since it can - * rearrange things, and *then* get the lhs. + * For += etc, do the rhs first, since it can rearrange things, + * and *then* get the lhs. */ + if (tree->rnode != NULL) { + tmp = tree_eval(tree->rnode); + rval = force_number(tmp); + free_temp(tmp); + } else + rval = (AWKNUM) 1.0; + + lhs = get_lhs(tree->lnode, &after_assign, TRUE); + lval = force_number(*lhs); + unref(*lhs); switch(tree->type) { + case Node_postincrement: + post = TRUE; + /* fall through */ case Node_preincrement: - case Node_predecrement: - lhs = get_lhs(tree->lnode, &after_assign, TRUE); - lval = force_number(*lhs); - unref(*lhs); - *lhs = make_number(lval + - (tree->type == Node_preincrement ? 1.0 : -1.0)); - tree->lnode->flags |= SCALAR; - if (after_assign) - (*after_assign)(); - return *lhs; + case Node_assign_plus: + *lhs = make_number(lval + rval); + break; - case Node_postincrement: case Node_postdecrement: - lhs = get_lhs(tree->lnode, &after_assign, TRUE); - lval = force_number(*lhs); - unref(*lhs); - *lhs = make_number(lval + - (tree->type == Node_postincrement ? 1.0 : -1.0)); - tree->lnode->flags |= SCALAR; - if (after_assign) - (*after_assign)(); - return tmp_number(lval); - default: - break; /* handled below */ - } - - /* - * It's a += kind of thing. Do the rhs, then the lhs. - */ - - tmp = tree_eval(tree->rnode); - rval = force_number(tmp); - free_temp(tmp); - - lhs = get_lhs(tree->lnode, &after_assign, FALSE); - lval = force_number(*lhs); + post = TRUE; + /* fall through */ + case Node_predecrement: + case Node_assign_minus: + *lhs = make_number(lval - rval); + break; - unref(*lhs); - switch(tree->type) { case Node_assign_exp: if ((ltemp = rval) == rval) { /* integer exponent */ if (ltemp == 0) @@ -1261,28 +1257,118 @@ #endif /* ! HAVE_FMOD */ break; - case Node_assign_plus: - *lhs = make_number(lval + rval); - break; - - case Node_assign_minus: - *lhs = make_number(lval - rval); - break; default: cant_happen(); } + tree->lnode->flags |= SCALAR; if (after_assign) (*after_assign)(); - return *lhs; + + /* for postincrement or postdecrement, return the old value */ + return (post ? tmp_number(lval) : *lhs); +} + +/* + * Avoiding memory leaks is difficult. In paticular, any of `next', + * `nextfile', `break' or `continue' (when not in a loop), can longjmp + * out to the outermost level. This leaks memory if it happens in a + * called function. It also leaks memory if it happens in a + * `for (iggy in foo)' loop, since such loops malloc an array of the + * current array indices to loop over, which provides stability. + * + * The following code takes care of these problems. First comes the + * array-loop management code. This can be a stack of arrays being looped + * on at any one time. This stack serves for both mainline code and + * function body code. As each loop starts and finishes, it pushes its + * info onto this stack and off of it; whether the loop is in a function + * body or not isn't relevant. + * + * Since the list of indices is created using dupnode(), when popping + * this stack it should be safe to unref() things, and then memory + * will get finally released when the function call stack is popped. + * This means that the loop_stack should be popped first upon a `next'. + */ + +static struct loop_info { + const char *varname; /* variable name, for debugging */ + NODE **elems; /* list of indices */ + size_t nelems; /* how many there are */ +} *loop_stack = NULL; +size_t nloops = 0; /* how many slots there are in the stack */ +size_t nloops_active = 0; /* how many loops are actively stacked */ + + +/* forloops_active --- return true if there are loops that need popping */ + +static int +forloops_active() +{ + return nloops > 0; +} + +/* pop_forloop --- pop one for loop off the stack */ + +static void +pop_forloop() +{ + int i, curloop; + struct loop_info *loop; + + assert(nloops_active > 0); + + curloop = --nloops_active; /* 0-based indexing */ + loop = & loop_stack[curloop]; + + for (i = 0; i < loop->nelems; i++) + unref(loop->elems[i]); + + free(loop->elems); + + loop->elems = NULL; + loop->varname = NULL; + loop->nelems = 0; +} + +/* pop_forloops --- pop the for loops stack all the way */ + +static void +pop_all_forloops() +{ + while (nloops_active > 0) + pop_forloop(); /* decrements nloops_active for us */ +} + +/* push_forloop --- add a single for loop to the stack */ + +static void +push_forloop(const char *varname, NODE **elems, size_t nelems) +{ +#define NLOOPS 4 /* seems like a good guess */ + if (loop_stack == NULL) { + /* allocate stack, set vars */ + nloops = NLOOPS; + emalloc(loop_stack, struct loop_info *, nloops * sizeof(struct loop_info), + "push_forloop"); + } else if (nloops_active == nloops) { + /* grow stack, set vars */ + nloops *= 2; + erealloc(loop_stack, struct loop_info *, nloops * sizeof(struct loop_info), + "push_forloop"); + } + + loop_stack[nloops_active].varname = varname; + loop_stack[nloops_active].elems = elems; + loop_stack[nloops_active].nelems = nelems; + nloops_active++; } static struct fcall { - char *fname; - unsigned long count; - NODE *arglist; - NODE **prevstack; - NODE **stack; + const char *fname; /* function name */ + unsigned long count; /* how many args */ + NODE *arglist; /* list thereof */ + NODE **prevstack; /* function stack frame of previous function */ + NODE **stack; /* function stack frame of current function */ } *fcall_list = NULL; static long fcall_list_size = 0; @@ -1386,7 +1472,7 @@ push_args(int count, NODE *arglist, NODE **oldstack, - char *func_name, + const char *func_name, char **varnames) { struct fcall *f; @@ -1421,7 +1507,7 @@ /* for each calling arg. add NODE * on stack */ for (argp = arglist, i = 0; count > 0 && argp != NULL; argp = argp->rnode) { - static char from[] = N_("%s (from %s)"); + static const char from[] = N_("%s (from %s)"); arg = argp->lnode; getnode(r); r->type = Node_var; @@ -1467,10 +1553,34 @@ i++; count--; } - if (argp != NULL) /* left over calling args. */ + + /* + * We have to reassign f. Why, you may ask? It is possible that + * other functions were called during the course of tree_eval()-ing + * the arguments to this function. As a result of that, fcall_list + * may have been realloc()'ed, with the result that f is now + * pointing into free()'d space. This was a nasty one to track down. + */ + f = & fcall_list[curfcall]; + + if (argp != NULL) { + /* Left over calling args. */ warning( _("function `%s' called with more arguments than declared"), func_name); + /* Evaluate them, they may have side effects: */ + do { + arg = argp->lnode; + if (arg->type == Node_param_list) + arg = f->prevstack[arg->param_cnt]; + if (arg->type != Node_var_array && + arg->type != Node_array_ref) + free_temp(tree_eval(arg)); + + /* reassign f, tree_eval could have moved it */ + f = & fcall_list[curfcall]; + } while ((argp = argp->rnode) != NULL); + } /* add remaining params. on stack with null value */ while (count-- > 0) { @@ -1485,15 +1595,6 @@ *sp++ = r; } - /* - * We have to reassign f. Why, you may ask? It is possible that - * other functions were called during the course of tree_eval()-ing - * the arguments to this function. As a result of that, fcall_list - * may have been realloc()'ed, with the result that f is now - * pointing into free()'d space. This was a nasty one to track down. - */ - f = & fcall_list[curfcall]; - stack_ptr = f->stack; } @@ -1502,10 +1603,10 @@ NODE **stack_ptr; static NODE * -func_call(NODE *name, /* name is a Node_val giving function name */ - NODE *arg_list) /* Node_expression_list of calling args. */ +func_call(NODE *tree) { register NODE *r; + NODE *name, *arg_list; NODE *f; jmp_buf volatile func_tag_stack; jmp_buf volatile loop_tag_stack; @@ -1513,10 +1614,22 @@ NODE *save_ret_node; extern NODE *ret_node; + /* tree->rnode is a Node_val giving function name */ + /* tree->lnode is Node_expression_list of calling args. */ + name = tree->rnode; + arg_list = tree->lnode; + /* retrieve function definition node */ - f = lookup(name->stptr); - if (f == NULL || f->type != Node_func) - fatal(_("function `%s' not defined"), name->stptr); + if (tree->funcbody != NULL) + f = tree->funcbody; + else { + f = lookup(name->stptr); + if (f == NULL || f->type != Node_func) + fatal(_("function `%s' not defined"), name->stptr); + + tree->funcbody = f; /* save for next call */ + } + #ifdef FUNC_TRACE fprintf(stderr, _("function %s called\n"), name->stptr); #endif @@ -1616,12 +1729,12 @@ ptr->vname); case Node_var: - if (! reference) - ptr->flags &= ~UNINITIALIZED; - else if (do_lint && (ptr->flags & UNINITIALIZED) != 0) + if (do_lint && reference && (ptr->flags & UNINITIALIZED) != 0) lintwarn(_("reference to uninitialized variable `%s'"), ptr->vname); + /* clear the flag, since it's about to be assigned to */ + ptr->flags &= ~UNINITIALIZED; aptr = &(ptr->var_value); #ifdef GAWKDEBUG if (ptr->var_value->stref <= 0) @@ -1727,28 +1840,6 @@ *assign = set_TEXTDOMAIN; break; - case Node_param_list: - { - NODE *n = stack_ptr[ptr->param_cnt]; - - /* - * This test should always be true, due to the code - * above, before the switch, that handles parameters. - */ - if (n->type != Node_var_array) - aptr = &n->var_value; - else - fatal(_("attempt to use array `%s' in a scalar context"), - n->vname); - - if (! reference) - n->flags &= ~UNINITIALIZED; - else if (do_lint && (n->flags & UNINITIALIZED) != 0) - lintwarn(_("reference to uninitialized argument `%s'"), - n->vname); - } - break; - case Node_field_spec: { int field_num; @@ -1786,17 +1877,9 @@ n = n->orig_array; assert(n->type == Node_var_array || n->type == Node_var); } - if (n->type == Node_func) { - fatal(_("attempt to use function `%s' as array"), - n->lnode->param); - } aptr = assoc_lookup(n, concat_exp(ptr->rnode), reference); break; - case Node_func: - fatal(_("`%s' is a function, assignment is not allowed"), - ptr->lnode->param); - case Node_builtin: #if 1 /* in gawk for a while */ @@ -1806,9 +1889,9 @@ * This is how Christos at Deshaw did it. * Does this buy us anything? */ - if (ptr->proc == NULL) + if (ptr->builtin == NULL) fatal(_("assignment is not allowed to result of builtin function")); - ptr->callresult = (*ptr->proc)(ptr->subnode); + ptr->callresult = (*ptr->builtin)(ptr->subnode); aptr = &ptr->callresult; break; #endif @@ -1830,7 +1913,6 @@ register Regexp *rp; int i; int match = TRUE; - int kludge_need_start = FALSE; /* FIXME: --- see below */ if (tree->type == Node_nomatch) match = FALSE; @@ -1841,22 +1923,7 @@ tree = tree->rnode; } rp = re_update(tree); - /* - * FIXME: - * - * Any place where research() is called with a last parameter of - * FALSE, we need to use the avoid_dfa test. This is the only place - * at the moment. - * - * A new or improved dfa that distinguishes beginning/end of - * string from beginning/end of line will allow us to get rid of - * this temporary hack. - * - * The avoid_dfa() function is in re.c; it is not very smart. - */ - if (avoid_dfa(tree, t1->stptr, t1->stlen)) - kludge_need_start = TRUE; - i = research(rp, t1->stptr, 0, t1->stlen, kludge_need_start); + i = research(rp, t1->stptr, 0, t1->stlen, FALSE); i = (i == -1) ^ (match == TRUE); free_temp(t1); return tmp_number((AWKNUM) i); @@ -1875,16 +1942,17 @@ } if (do_traditional) IGNORECASE = FALSE; - else if ((IGNORECASE_node->var_value->flags & (STRING|STR)) != 0) { + else if ((IGNORECASE_node->var_value->flags & (STRING|STRCUR)) != 0) { if ((IGNORECASE_node->var_value->flags & MAYBE_NUM) == 0) IGNORECASE = (force_string(IGNORECASE_node->var_value)->stlen > 0); else IGNORECASE = (force_number(IGNORECASE_node->var_value) != 0.0); - } else if ((IGNORECASE_node->var_value->flags & (NUM|NUMBER)) != 0) + } else if ((IGNORECASE_node->var_value->flags & (NUMCUR|NUMBER)) != 0) IGNORECASE = (force_number(IGNORECASE_node->var_value) != 0.0); else IGNORECASE = FALSE; /* shouldn't happen */ - set_FS_if_not_FIELDWIDTHS(); + + set_RS(); /* set_RS() calls set_FS() if need be, for us */ } /* set_BINMODE --- set translation mode (OS/2, DOS, others) */ @@ -1970,7 +2038,7 @@ fmt_ok(NODE *n) { NODE *tmp = force_string(n); - char *p = tmp->stptr; + const char *p = tmp->stptr; if (*p++ != '%') return 0; @@ -2047,27 +2115,39 @@ void set_LINT() { +#ifndef NO_LINT int old_lint = do_lint; - if ((LINT_node->var_value->flags & (STRING|STR)) != 0) { + if ((LINT_node->var_value->flags & (STRING|STRCUR)) != 0) { if ((LINT_node->var_value->flags & MAYBE_NUM) == 0) { - char *lintval; + const char *lintval; size_t lintlen; do_lint = (force_string(LINT_node->var_value)->stlen > 0); lintval = LINT_node->var_value->stptr; lintlen = LINT_node->var_value->stlen; if (do_lint) { + do_lint = LINT_ALL; if (lintlen == 5 && strncmp(lintval, "fatal", 5) == 0) lintfunc = r_fatal; + else if (lintlen == 7 && strncmp(lintval, "invalid", 7) == 0) + do_lint = LINT_INVALID; else lintfunc = warning; } else lintfunc = warning; - } else - do_lint = (force_number(LINT_node->var_value) != 0.0); - } else if ((LINT_node->var_value->flags & (NUM|NUMBER)) != 0) { - do_lint = (force_number(LINT_node->var_value) != 0.0); + } else { + if (force_number(LINT_node->var_value) != 0.0) + do_lint = LINT_ALL; + else + do_lint = FALSE; + lintfunc = warning; + } + } else if ((LINT_node->var_value->flags & (NUMCUR|NUMBER)) != 0) { + if (force_number(LINT_node->var_value) != 0.0) + do_lint = LINT_ALL; + else + do_lint = FALSE; lintfunc = warning; } else do_lint = FALSE; /* shouldn't happen */ @@ -2076,8 +2156,9 @@ lintfunc = warning; /* explicitly use warning() here, in case lintfunc == r_fatal */ - if (old_lint != do_lint && old_lint) + if (old_lint != do_lint && old_lint && do_lint == FALSE) warning(_("turning off `--lint' due to assignment to `LINT'")); +#endif /* ! NO_LINT */ } /* set_TEXTDOMAIN --- update TEXTDOMAIN variable when TEXTDOMAIN assigned to */ @@ -2104,16 +2185,13 @@ NODE * assign_val(NODE **lhs_p, NODE *rhs) { - NODE *save; - if (rhs != *lhs_p) { - save = *lhs_p; + /* + * Since we know that the nodes are different, + * we can do the unref() before the dupnode(). + */ + unref(*lhs_p); *lhs_p = dupnode(rhs); - unref(save); - - /* this check really doesn't belong here, but I don't have a better place */ - if (lhs_p == & NF_node->var_value && NF_node->var_value->numbr < 0) - fatal(_("NF set to negative value")); } return *lhs_p; } @@ -2137,11 +2215,11 @@ comp_func(const void *p1, const void *p2) { size_t len1, len2; - char *str1, *str2; - NODE *t1, *t2; + const char *str1, *str2; + const NODE *t1, *t2; - t1 = *((NODE **) p1); - t2 = *((NODE **) p2); + t1 = *((const NODE *const *) p1); + t2 = *((const NODE *const *) p2); /* t1 = force_string(t1); @@ -2155,7 +2233,7 @@ /* Array indexes are strings, compare as such, always! */ if (len1 == len2 || len1 < len2) - return strncmp(str1, str2, len1); + return memcmp(str1, str2, len1); else - return strncmp(str1, str2, len2); + return memcmp(str1, str2, len2); } diff -urN gawk-3.1.1/ext.c gawk-3.1.2/ext.c --- gawk-3.1.1/ext.c 2002-04-16 14:48:16.000000000 +0300 +++ gawk-3.1.2/ext.c 2003-02-04 14:12:26.000000000 +0200 @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 1995 - 2001 the Free Software Foundation, Inc. + * Copyright (C) 1995 - 2001, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -114,6 +114,7 @@ getnode(p); p->type = Node_param_list; + p->flags |= FUNC; p->rnode = NULL; p->param = name; p->param_cnt = count; @@ -125,7 +126,7 @@ getnode(b); b->type = Node_builtin; - b->proc = func; + b->builtin = func; b->subnode = p; b->source_line = __LINE__; b->source_file = __FILE__; @@ -177,10 +178,10 @@ NODE * do_ext(NODE *tree) { - char *emsg = _("Operation Not Supported"); + const char *emsg = _("Operation Not Supported"); unref(ERRNO_node->var_value); - ERRNO_node->var_value = make_string(emsg, strlen(emsg)); + ERRNO_node->var_value = make_string((char *) emsg, strlen(emsg)); return tmp_number((AWKNUM) -1); } #endif diff -urN gawk-3.1.1/extension/fork.c gawk-3.1.2/extension/fork.c --- gawk-3.1.1/extension/fork.c 2001-01-21 17:52:05.000000000 +0200 +++ gawk-3.1.2/extension/fork.c 2002-08-21 14:49:13.000000000 +0300 @@ -24,7 +24,6 @@ */ #include "awk.h" -#include /* do_fork --- provide dynamically loaded fork() builtin for gawk */ diff -urN gawk-3.1.1/field.c gawk-3.1.2/field.c --- gawk-3.1.1/field.c 2002-04-16 14:57:25.000000000 +0300 +++ gawk-3.1.2/field.c 2003-02-25 13:27:06.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -60,6 +60,8 @@ NODE **fields_arr; /* array of pointers to the field nodes */ int field0_valid; /* $(>0) has not been changed yet */ int default_FS; /* TRUE when FS == " " */ +Regexp *FS_re_yes_case = NULL; +Regexp *FS_re_no_case = NULL; Regexp *FS_regexp = NULL; static NODE *Null_field = NULL; @@ -84,7 +86,7 @@ getnode(Null_field); *Null_field = *Nnull_string; Null_field->flags |= (SCALAR|FIELD); - Null_field->flags &= ~(NUM|NUMBER|MAYBE_NUM|PERM); + Null_field->flags &= ~(NUMCUR|NUMBER|MAYBE_NUM|PERM); field0_valid = TRUE; } @@ -112,7 +114,7 @@ set_field(long num, char *str, long len, - NODE *dummy) /* not used -- just to make interface same as set_element */ + NODE *dummy ATTRIBUTE_UNUSED) /* just to make interface same as set_element */ { register NODE *n; @@ -121,7 +123,7 @@ n = fields_arr[num]; n->stptr = str; n->stlen = len; - n->flags = (STR|STRING|MAYBE_NUM|SCALAR|FIELD); + n->flags = (STRCUR|STRING|MAYBE_NUM|SCALAR|FIELD); } /* rebuild_record --- Someone assigned a value to $(something). @@ -193,8 +195,8 @@ if ((fields_arr[i]->flags & FIELD) == 0) { *n = *Null_field; n->stlen = fields_arr[i]->stlen; - if ((fields_arr[i]->flags & (NUM|NUMBER)) != 0) { - n->flags |= (fields_arr[i]->flags & (NUM|NUMBER)); + if ((fields_arr[i]->flags & (NUMCUR|NUMBER)) != 0) { + n->flags |= (fields_arr[i]->flags & (NUMCUR|NUMBER)); n->numbr = fields_arr[i]->numbr; } } else { @@ -226,17 +228,62 @@ * but better correct than fast. */ void -set_record(char *buf, /* ignored if ! freeold */ - int cnt, /* ignored if ! freeold */ - int freeold) +set_record(const char *buf, int cnt) { - register int i; NODE *n; static char *databuf; static unsigned long databuf_size; #define INITIAL_SIZE 512 #define MAX_SIZE ((unsigned long) ~0) /* maximally portable ... */ + reset_record(); + + /* buffer management: */ + if (databuf_size == 0) { /* first time */ + emalloc(databuf, char *, INITIAL_SIZE, "set_record"); + databuf_size = INITIAL_SIZE; + memset(databuf, '\0', INITIAL_SIZE); + + } + /* + * Make sure there's enough room. Since we sometimes need + * to place a sentinel at the end, we make sure + * databuf_size is > cnt after allocation. + */ + if (cnt >= databuf_size) { + while (cnt >= databuf_size && databuf_size <= MAX_SIZE) + databuf_size *= 2; + erealloc(databuf, char *, databuf_size, "set_record"); + memset(databuf, '\0', databuf_size); + } + /* copy the data */ + memcpy(databuf, buf, cnt); + + /* manage field 0: */ + unref(fields_arr[0]); + getnode(n); + n->stptr = databuf; + n->stlen = cnt; + n->stref = 1; + n->type = Node_val; + n->stfmt = -1; + n->flags = (STRING|STRCUR|MAYBE_NUM|SCALAR|FIELD); + fields_arr[0] = n; + +#undef INITIAL_SIZE +#undef MAX_SIZE +} + +/* reset_record --- start over again with current $0 */ + +void +reset_record() +{ + register int i; + NODE *n; + + (void) force_string(fields_arr[0]); + NF = -1; for (i = 1; i <= parse_high_water; i++) { unref(fields_arr[i]); @@ -247,61 +294,15 @@ parse_high_water = 0; /* - * $0 = $0 should resplit using the current value of FS, thus, - * this is executed orthogonally to the value of freeold. + * $0 = $0 should resplit using the current value of FS. */ if (resave_fs) { resave_fs = FALSE; unref(save_FS); save_FS = dupnode(FS_node->var_value); } - if (freeold) { - /* buffer management: */ - if (databuf_size == 0) { /* first time */ - emalloc(databuf, char *, INITIAL_SIZE, "set_record"); - databuf_size = INITIAL_SIZE; - memset(databuf, '\0', INITIAL_SIZE); - - } - /* - * Make sure there's enough room. Since we sometimes need - * to place a sentinel at the end, we make sure - * databuf_size is > cnt after allocation. - */ - if (cnt >= databuf_size) { - while (cnt >= databuf_size && databuf_size <= MAX_SIZE) - databuf_size *= 2; - erealloc(databuf, char *, databuf_size, "set_record"); - memset(databuf, '\0', databuf_size); - } - /* copy the data */ - memcpy(databuf, buf, cnt); - /* manage field 0: */ - unref(fields_arr[0]); - getnode(n); - n->stptr = databuf; - n->stlen = cnt; - n->stref = 1; - n->type = Node_val; - n->stfmt = -1; - n->flags = (STRING|STR|MAYBE_NUM|SCALAR|FIELD); - fields_arr[0] = n; - } - fields_arr[0]->flags |= MAYBE_NUM; field0_valid = TRUE; - -#undef INITIAL_SIZE -#undef MAX_SIZE -} - -/* reset_record --- start over again with current $0 */ - -void -reset_record() -{ - (void) force_string(fields_arr[0]); - set_record(fields_arr[0]->stptr, fields_arr[0]->stlen, FALSE); } /* set_NF --- handle what happens to $0 and fields when NF is changed */ @@ -316,6 +317,9 @@ NF = (long) force_number(NF_node->var_value); + if (NF < 0) + fatal(_("NF set to negative value")); + if (NF > nf_high_water) grow_fields_arr(NF); if (parse_high_water < NF) { @@ -348,7 +352,7 @@ re_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, - NODE *fs, + NODE *fs ATTRIBUTE_UNUSED, Regexp *rp, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) @@ -360,7 +364,7 @@ #ifdef MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs; - if (MB_CUR_MAX > 1) + if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); #endif @@ -378,7 +382,7 @@ && nf < up_to) { if (REEND(rp, scan) == RESTART(rp, scan)) { /* null match */ #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { mbclen = mbrlen(scan, end-scan, &mbs); if ((mbclen == 1) || (mbclen == (size_t) -1) || (mbclen == (size_t) -2) || (mbclen == 0)) { @@ -424,7 +428,7 @@ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, - Regexp *rp, + Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) { @@ -491,7 +495,7 @@ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, - Regexp *rp, + Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) { @@ -554,8 +558,8 @@ null_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, - NODE *fs, - Regexp *rp, + NODE *fs ATTRIBUTE_UNUSED, + Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) { @@ -569,7 +573,7 @@ return nf; #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { + if (gawk_mb_cur_max > 1) { mbstate_t mbs; memset(&mbs, 0, sizeof(mbstate_t)); for (; nf < up_to && scan < end;) { @@ -603,7 +607,7 @@ char **buf, /* on input: string to parse; on output: point to start next */ int len, NODE *fs, - Regexp *rp, + Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) { @@ -612,12 +616,11 @@ register long nf = parse_high_water; register char *field; register char *end = scan + len; - int onecase; char sav; #ifdef MBS_SUPPORT size_t mbclen = 0; mbstate_t mbs; - if (MB_CUR_MAX > 1) + if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); #endif @@ -631,10 +634,6 @@ else fschar = fs->stptr[0]; - onecase = (IGNORECASE && ISALPHA(fschar)); - if (onecase) - fschar = casetable[(unsigned char) fschar]; - /* before doing anything save the char at *end */ sav = *end; /* because it will be destroyed now: */ @@ -642,35 +641,21 @@ for (; nf < up_to;) { field = scan; - if (onecase) { - while (casetable[(unsigned char) *scan] != fschar) #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { - mbclen = mbrlen(scan, end-scan, &mbs); - if ((mbclen == 1) || (mbclen == (size_t) -1) - || (mbclen == (size_t) -2) || (mbclen == 0)) { - /* We treat it as a singlebyte character. */ - mbclen = 1; - } - scan += mbclen; - } else -#endif - scan++; - } else { - while (*scan != fschar) -#ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { - mbclen = mbrlen(scan, end-scan, &mbs); - if ((mbclen == 1) || (mbclen == (size_t) -1) - || (mbclen == (size_t) -2) || (mbclen == 0)) { - /* We treat it as a singlebyte character. */ - mbclen = 1; - } - scan += mbclen; - } else + if (gawk_mb_cur_max > 1) { + while (*scan != fschar) { + mbclen = mbrlen(scan, end-scan, &mbs); + if ((mbclen == 1) || (mbclen == (size_t) -1) + || (mbclen == (size_t) -2) || (mbclen == 0)) { + /* We treat it as a singlebyte character. */ + mbclen = 1; + } + scan += mbclen; + } + } else #endif - scan++; - } + while (*scan != fschar) + scan++; (*set)(++nf, field, (long)(scan - field), n); if (scan == end) break; @@ -691,15 +676,15 @@ /* * fw_parse_field --- field parsing using FIELDWIDTHS spec * - * This is called both from get_field() and from do_split() - * via (*parse_field)(). This variation is for fields are fixed widths. + * This is called from get_field() via (*parse_field)(). + * This variation is for fields are fixed widths. */ static long fw_parse_field(long up_to, /* parse only up to this field number */ char **buf, /* on input: string to parse; on output: point to start next */ int len, - NODE *fs, - Regexp *rp, + NODE *fs ATTRIBUTE_UNUSED, + Regexp *rp ATTRIBUTE_UNUSED, Setfunc set, /* routine to set the value of the parsed field */ NODE *n) { @@ -816,30 +801,15 @@ NODE * do_split(NODE *tree) { - NODE *src, *arr, *sep, *tmp; - NODE *fs; + NODE *src, *arr, *sep, *fs, *src2, *fs2, *tmp; char *s; long (*parseit) P((long, char **, int, NODE *, Regexp *, Setfunc, NODE *)); Regexp *rp = NULL; - /* - * do dupnode(), to avoid problems like - * x = split(a[1], a, "blah") - * since we assoc_clear the array. gack. - * this also gives us complete call by value semantics. - */ - tmp = tree_eval(tree->lnode); - src = dupnode(tmp); - free_temp(tmp); + src = force_string(tree_eval(tree->lnode)); arr = tree->rnode->lnode; - if (tree->rnode->rnode != NULL) - sep = tree->rnode->rnode->lnode; /* 3rd arg */ - else - sep = NULL; - - (void) force_string(src); if (arr->type == Node_param_list) arr = stack_ptr[arr->param_cnt]; @@ -848,25 +818,33 @@ if (arr->type != Node_var && arr->type != Node_var_array) fatal(_("split: second argument is not an array")); arr->type = Node_var_array; - assoc_clear(arr); + + sep = tree->rnode->rnode->lnode; /* 3rd arg */ if (src->stlen == 0) { /* * Skip the work if first arg is the null string. - * Check after clearing the array, to preserve - * correct semantics. */ - tmp = tmp_number((AWKNUM) 0); - goto out; + free_temp(src); + /* + * Evaluate sep if it may have side effects. + */ + if ((sep->re_flags & (FS_DFLT|CONST)) == 0) + free_temp(tree_eval(sep->re_exp)); + /* + * And now you can safely turn off the array. + */ + assoc_clear(arr); + return tmp_number((AWKNUM) 0); } - if ((sep->re_flags & FS_DFLT) != 0 && ! using_FIELDWIDTHS()) { + if ((sep->re_flags & FS_DFLT) != 0 && ! using_FIELDWIDTHS() && ! RS_is_null) { parseit = parse_field; fs = force_string(FS_node->var_value); rp = FS_regexp; } else { - tmp = force_string(tree_eval(sep->re_exp)); - if (tmp->stlen == 0) { + fs = force_string(tree_eval(sep->re_exp)); + if (fs->stlen == 0) { static short warned = FALSE; parseit = null_parse_field; @@ -875,8 +853,8 @@ warned = TRUE; lintwarn(_("split: null string for third arg is a gawk extension")); } - } else if (tmp->stlen == 1 && (sep->re_flags & CONST) == 0) { - if (tmp->stptr[0] == ' ') { + } else if (fs->stlen == 1 && (sep->re_flags & CONST) == 0) { + if (fs->stptr[0] == ' ') { if (do_posix) parseit = posix_def_parse_field; else @@ -887,15 +865,27 @@ parseit = re_parse_field; rp = re_update(sep); } - fs = tmp; } - s = src->stptr; - tmp = tmp_number((AWKNUM) (*parseit)(HUGE, &s, (int) src->stlen, - fs, rp, set_element, arr)); -out: - unref(src); - free_temp(sep); + /* + * do dupnode(), to avoid problems like + * x = split(a["LINE"], a, a["FS"]) + * since we assoc_clear the array. gack. + * this also gives us complete call by value semantics. + */ + src2 = dupnode(src); + free_temp(src); + + fs2 = dupnode(fs); + free_temp(fs); + + assoc_clear(arr); + + s = src2->stptr; + tmp = tmp_number((AWKNUM) (*parseit)(HUGE, &s, (int) src2->stlen, + fs2, rp, set_element, arr)); + unref(src2); + unref(fs2); return tmp; } @@ -907,7 +897,7 @@ register char *scan; char *end; register int i; - static int fw_alloc = 1; + static int fw_alloc = 4; static int warned = FALSE; extern double strtod(); @@ -948,13 +938,6 @@ update_PROCINFO("FS", "FIELDWIDTHS"); } -void -set_FS_if_not_FIELDWIDTHS() -{ - if (parse_field != fw_parse_field) - set_FS(); -} - /* set_FS --- handle things when FS is assigned to */ void @@ -964,6 +947,7 @@ NODE *fs; static NODE *save_fs = NULL; static NODE *save_rs = NULL; + int remake_re = TRUE; /* * If changing the way fields are split, obey least-suprise @@ -972,21 +956,46 @@ if (fields_arr != NULL) (void) get_field(HUGE - 1, 0); - if (! (save_fs && cmp_nodes(FS_node->var_value, save_fs) == 0 - && save_rs && cmp_nodes(RS_node->var_value, save_rs) == 0)) { - unref(save_fs); - save_fs = dupnode(FS_node->var_value); - unref(save_rs); - save_rs = dupnode(RS_node->var_value); - resave_fs = TRUE; - if (FS_regexp) { - refree(FS_regexp); - FS_regexp = NULL; + /* It's possible that only IGNORECASE changed, or FS = FS */ + /* + * This comparison can't use cmp_nodes(), which pays attention + * to IGNORECASE, and that's not what we want. + */ + if (save_fs + && FS_node->var_value->stlen == save_fs->stlen + && STREQN(FS_node->var_value->stptr, save_fs->stptr, save_fs->stlen) + && save_rs + && RS_node->var_value->stlen == save_rs->stlen + && STREQN(RS_node->var_value->stptr, save_rs->stptr, save_rs->stlen)) { + if (FS_regexp != NULL) + FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); + + /* FS = FS */ + if (! using_FIELDWIDTHS()) + return; + else { + remake_re = FALSE; + goto choose_fs_function; } } + + unref(save_fs); + save_fs = dupnode(FS_node->var_value); + unref(save_rs); + save_rs = dupnode(RS_node->var_value); + resave_fs = TRUE; + if (FS_regexp != NULL) { + refree(FS_re_yes_case); + refree(FS_re_no_case); + FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; + } + + +choose_fs_function: buf[0] = '\0'; default_FS = FALSE; fs = force_string(FS_node->var_value); + if (! do_traditional && fs->stlen == 0) { static short warned = FALSE; @@ -996,14 +1005,18 @@ warned = TRUE; lintwarn(_("null string for `FS' is a gawk extension")); } - } else if (fs->stlen > 1) + } else if (fs->stlen > 1) { parse_field = re_parse_field; - else if (RS_is_null) { + } else if (RS_is_null) { + /* we know that fs->stlen <= 1 */ parse_field = sc_parse_field; if (fs->stlen == 1) { if (fs->stptr[0] == ' ') { default_FS = TRUE; strcpy(buf, "[ \t\n]+"); + } else if (fs->stptr[0] == '\\') { + /* yet another special case */ + strcpy(buf, "[\\\\\n]"); } else if (fs->stptr[0] != '\n') sprintf(buf, "[%c\n]", fs->stptr[0]); } @@ -1012,25 +1025,44 @@ parse_field = posix_def_parse_field; else parse_field = def_parse_field; - if (fs->stptr[0] == ' ' && fs->stlen == 1) - default_FS = TRUE; - else if (fs->stptr[0] != ' ' && fs->stlen == 1) { - if (! ISALPHA(fs->stptr[0]) || ! IGNORECASE) - parse_field = sc_parse_field; + + if (fs->stlen == 1) { + if (fs->stptr[0] == ' ') + default_FS = TRUE; else if (fs->stptr[0] == '\\') - /* yet another special case */ + /* same special case */ strcpy(buf, "[\\\\]"); else - sprintf(buf, "[%c]", fs->stptr[0]); + parse_field = sc_parse_field; } } - if (buf[0] != '\0') { - FS_regexp = make_regexp(buf, strlen(buf), IGNORECASE, TRUE); - parse_field = re_parse_field; - } else if (parse_field == re_parse_field) { - FS_regexp = make_regexp(fs->stptr, fs->stlen, IGNORECASE, TRUE); - } else - FS_regexp = NULL; + if (remake_re) { + if (FS_regexp != NULL) { + refree(FS_re_yes_case); + refree(FS_re_no_case); + FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; + } + + if (buf[0] != '\0') { + FS_re_yes_case = make_regexp(buf, strlen(buf), FALSE); + FS_re_no_case = make_regexp(buf, strlen(buf), TRUE); + FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); + parse_field = re_parse_field; + } else if (parse_field == re_parse_field) { + FS_re_yes_case = make_regexp(fs->stptr, fs->stlen, FALSE); + FS_re_no_case = make_regexp(fs->stptr, fs->stlen, TRUE); + FS_regexp = (IGNORECASE ? FS_re_no_case : FS_re_yes_case); + } else + FS_re_yes_case = FS_re_no_case = FS_regexp = NULL; + } + + /* + * For FS = "c", we don't use IGNORECASE. But we must use + * re_parse_field to get the character and the newline as + * field separators. + */ + if (fs->stlen == 1 && parse_field == re_parse_field) + FS_regexp = FS_re_yes_case; update_PROCINFO("FS", "FS"); } diff -urN gawk-3.1.1/fixvers gawk-3.1.2/fixvers --- gawk-3.1.1/fixvers 2002-04-28 17:19:58.000000000 +0300 +++ gawk-3.1.2/fixvers 2002-10-29 10:50:47.000000000 +0200 @@ -22,7 +22,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -line=`grep AM_INIT_AUTOMAKE configure.in` +line=`grep '^AM_INIT_AUTOMAKE' configure.in` case $1 in -v) diff -urN gawk-3.1.1/gawkmisc.c gawk-3.1.2/gawkmisc.c --- gawk-3.1.1/gawkmisc.c 2002-04-16 14:57:38.000000000 +0300 +++ gawk-3.1.2/gawkmisc.c 2003-02-04 14:12:49.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. diff -urN gawk-3.1.1/gettext.h gawk-3.1.2/gettext.h --- gawk-3.1.1/gettext.h 2002-02-19 18:36:34.000000000 +0200 +++ gawk-3.1.2/gettext.h 2002-10-28 10:16:13.000000000 +0200 @@ -22,11 +22,26 @@ /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS +/* ADR: Need this so gcc -g without -O works. */ +#ifdef HAVE_LOCALE_H +#include +#endif /* HAVE_LOCALE_H */ + /* Get declarations of GNU message catalog functions. */ # include #else +/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which + chokes if dcgettext is defined as a macro. So include it now, to make + later inclusions of a NOP. We don't include + as well because people using "gettext.h" will not include , + and also including would fail on SunOS 4, whereas + is OK. */ +#if defined(__sun) +# include +#endif + /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. diff -urN gawk-3.1.1/install-sh gawk-3.1.2/install-sh --- gawk-3.1.1/install-sh 1994-12-23 05:52:54.000000000 +0200 +++ gawk-3.1.2/install-sh 2003-03-06 11:11:50.000000000 +0200 @@ -1,15 +1,27 @@ #!/bin/sh # # install - install a program, script, or datafile -# This comes from X11R5. +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. -# +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script @@ -29,7 +41,7 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -tranformbasename="" +transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" @@ -44,7 +56,7 @@ while [ x"$1" != x ]; do case $1 in - -c) instcmd="$cpprog" + -c) instcmd=$cpprog shift continue;; @@ -67,7 +79,7 @@ shift continue;; - -s) stripcmd="$stripprog" + -s) stripcmd=$stripprog shift continue;; @@ -94,127 +106,132 @@ if [ x"$src" = x ] then - echo "install: no input file specified" + echo "$0: no input file specified" >&2 exit 1 else - true + : fi if [ x"$dir_arg" != x ]; then dst=$src src="" - - if [ -d $dst ]; then + + if [ -d "$dst" ]; then instcmd=: + chmodcmd="" else - instcmd=mkdir + instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad +# might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. - if [ -f $src -o -d $src ] + if [ -f "$src" ] || [ -d "$src" ] then - true + : else - echo "install: $src does not exist" + echo "$0: $src does not exist" >&2 exit 1 fi - + if [ x"$dst" = x ] then - echo "install: no destination specified" + echo "$0: no destination specified" >&2 exit 1 else - true + : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic - if [ -d $dst ] + if [ -d "$dst" ] then - dst="$dst"/`basename $src` + dst=$dst/`basename "$src"` else - true + : fi fi ## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" +defaultIFS=' + ' +IFS="${IFS-$defaultIFS}" -oIFS="${IFS}" +oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" +set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" + pathcomp=$pathcomp$1 shift - if [ ! -d "${pathcomp}" ] ; + if [ ! -d "$pathcomp" ] ; then - $mkdirprog "${pathcomp}" + $mkdirprog "$pathcomp" else - true + : fi - pathcomp="${pathcomp}/" + pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then - $doit $instcmd $dst && + $doit $instcmd "$dst" && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] + if [ x"$transformarg" = x ] then - dstfile=`basename $dst` + dstfile=`basename "$dst"` else - dstfile=`basename $dst $transformbasename | + dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename - if [ x"$dstfile" = x ] + if [ x"$dstfile" = x ] then - dstfile=`basename $dst` + dstfile=`basename "$dst"` else - true + : fi -# Make a temp file name in the proper directory. +# Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# + rmtmp=$dstdir/#rm.$$# -# Move or copy the file name to the temp name +# Trap to clean up temp files at exit. - $doit $instcmd $src $dsttmp && + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 - trap "rm -f ${dsttmp}" 0 && +# Move or copy the file name to the temp name + + $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits @@ -222,17 +239,38 @@ # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + +# Now remove or move aside any old file at destination location. We try this +# two ways since rm can't unlink itself on some systems and the destination +# file might be busy for other reasons. In this case, the final cleanup +# might fail but the new file should still install successfully. + +{ + if [ -f "$dstdir/$dstfile" ] + then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || + $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || + { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi +} && # Now rename the file to the real destination. - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && +# The final little trick to "correctly" pass the exit status to the exit trap. -exit 0 +{ + (exit 0); exit +} diff -urN gawk-3.1.1/intl/ChangeLog gawk-3.1.2/intl/ChangeLog --- gawk-3.1.1/intl/ChangeLog 2002-05-01 16:41:58.000000000 +0300 +++ gawk-3.1.2/intl/ChangeLog 2002-09-19 11:00:07.000000000 +0300 @@ -1,8 +1,4 @@ -Wed May 1 16:41:32 2002 Arnold D. Robbins +2002-08-06 GNU - * Release 3.1.1: Release tar file made. - -2002-04-24 GNU - - * Version 0.11.2 released. + * Version 0.11.5 released. diff -urN gawk-3.1.1/intl/VERSION gawk-3.1.2/intl/VERSION --- gawk-3.1.1/intl/VERSION 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/VERSION 2002-09-19 11:00:07.000000000 +0300 @@ -1 +1 @@ -GNU gettext library from gettext-0.11.2 +GNU gettext library from gettext-0.11.5 diff -urN gawk-3.1.1/intl/bindtextdom.c gawk-3.1.2/intl/bindtextdom.c --- gawk-3.1.1/intl/bindtextdom.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/bindtextdom.c 2002-09-19 11:00:07.000000000 +0300 @@ -45,8 +45,8 @@ names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC -# define _nl_default_dirname _nl_default_dirname__ -# define _nl_domain_bindings _nl_domain_bindings__ +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ @@ -77,8 +77,8 @@ # define strdup(str) __strdup (str) # endif #else -# define BINDTEXTDOMAIN bindtextdomain__ -# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__ +# define BINDTEXTDOMAIN libintl_bindtextdomain +# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset #endif /* Prototypes for local functions. */ diff -urN gawk-3.1.1/intl/config.charset gawk-3.1.2/intl/config.charset --- gawk-3.1.1/intl/config.charset 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/config.charset 2002-09-19 11:00:07.000000000 +0300 @@ -34,7 +34,7 @@ # ASCII, ANSI_X3.4-1968 glibc solaris freebsd # ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes # ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes -# ISO-8859-3 glibc yes +# ISO-8859-3 glibc solaris yes # ISO-8859-4 osf solaris freebsd yes # ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes # ISO-8859-6 glibc aix hpux solaris yes @@ -42,9 +42,11 @@ # ISO-8859-8 glibc aix hpux osf solaris yes # ISO-8859-9 glibc aix hpux irix osf solaris yes # ISO-8859-13 glibc +# ISO-8859-14 glibc # ISO-8859-15 glibc aix osf solaris freebsd # KOI8-R glibc solaris freebsd yes # KOI8-U glibc freebsd yes +# KOI8-T glibc # CP437 dos # CP775 dos # CP850 aix osf dos @@ -58,35 +60,38 @@ # CP865 dos # CP866 freebsd dos # CP869 dos -# CP874 win32 dos +# CP874 woe32 dos # CP922 aix -# CP932 aix win32 dos +# CP932 aix woe32 dos # CP943 aix -# CP949 osf win32 dos -# CP950 win32 dos +# CP949 osf woe32 dos +# CP950 woe32 dos # CP1046 aix # CP1124 aix +# CP1125 dos # CP1129 aix -# CP1250 win32 -# CP1251 glibc win32 -# CP1252 aix win32 -# CP1253 win32 -# CP1254 win32 -# CP1255 win32 -# CP1256 win32 -# CP1257 win32 +# CP1250 woe32 +# CP1251 glibc woe32 +# CP1252 aix woe32 +# CP1253 woe32 +# CP1254 woe32 +# CP1255 glibc woe32 +# CP1256 woe32 +# CP1257 woe32 # GB2312 glibc aix hpux irix solaris freebsd yes # EUC-JP glibc aix hpux irix osf solaris freebsd yes # EUC-KR glibc aix hpux irix osf solaris freebsd yes # EUC-TW glibc aix hpux irix osf solaris # BIG5 glibc aix hpux osf solaris freebsd yes -# BIG5-HKSCS glibc -# GBK aix osf win32 dos -# GB18030 glibc +# BIG5-HKSCS glibc solaris +# GBK glibc aix osf solaris woe32 dos +# GB18030 glibc solaris # SHIFT_JIS hpux osf solaris freebsd yes -# JOHAB glibc win32 +# JOHAB glibc solaris woe32 # TIS-620 glibc aix hpux osf solaris # VISCII glibc yes +# TCVN5712-1 glibc +# GEORGIAN-PS glibc # HP-ROMAN8 hpux # HP-ARABIC8 hpux # HP-GREEK8 hpux @@ -217,6 +222,7 @@ echo "646 ASCII" echo "ISO8859-1 ISO-8859-1" echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-3 ISO-8859-3" echo "ISO8859-4 ISO-8859-4" echo "ISO8859-5 ISO-8859-5" echo "ISO8859-6 ISO-8859-6" @@ -226,9 +232,13 @@ echo "ISO8859-15 ISO-8859-15" echo "koi8-r KOI8-R" echo "BIG5 BIG5" + echo "Big5-HKSCS BIG5-HKSCS" echo "gb2312 GB2312" + echo "GBK GBK" + echo "GB18030 GB18030" echo "cns11643 EUC-TW" echo "5601 EUC-KR" + echo "ko_KR.johap92 JOHAB" echo "eucJP EUC-JP" echo "PCK SHIFT_JIS" echo "TIS620.2533 TIS-620" @@ -300,7 +310,7 @@ echo "# country is not the one your DOS machine actually uses, just" echo "# correct it in this file, and send a mail to" echo "# Juan Manuel Guerrero " - echo "# and Bruno Haible ." + echo "# and Bruno Haible ." echo "#" echo "C ASCII" # ISO-8859-1 languages @@ -412,6 +422,8 @@ echo "mk_MK CP866" # not CP855 ?? echo "ru CP866" echo "ru_RU CP866" + echo "uk CP1125" + echo "uk_UA CP1125" # ISO-8859-6 languages echo "ar CP864" echo "ar_AE CP864" diff -urN gawk-3.1.1/intl/dcgettext.c gawk-3.1.2/intl/dcgettext.c --- gawk-3.1.1/intl/dcgettext.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/dcgettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -37,8 +37,8 @@ # define DCGETTEXT __dcgettext # define DCIGETTEXT __dcigettext #else -# define DCGETTEXT dcgettext__ -# define DCIGETTEXT dcigettext__ +# define DCGETTEXT libintl_dcgettext +# define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY diff -urN gawk-3.1.1/intl/dcigettext.c gawk-3.1.2/intl/dcigettext.c --- gawk-3.1.1/intl/dcigettext.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/dcigettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -64,6 +64,20 @@ #include +#ifdef _LIBC + /* Guess whether integer division by zero raises signal SIGFPE. + Set to 1 only if you know for sure. In case of doubt, set to 0. */ +# if defined __alpha__ || defined __arm__ || defined __i386__ \ + || defined __m68k__ || defined __s390__ +# define INTDIV0_RAISES_SIGFPE 1 +# else +# define INTDIV0_RAISES_SIGFPE 0 +# endif +#endif +#if !INTDIV0_RAISES_SIGFPE +# include +#endif + #if defined HAVE_SYS_PARAM_H || defined _LIBC # include #endif @@ -102,10 +116,10 @@ names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC -# define _nl_default_default_domain _nl_default_default_domain__ -# define _nl_current_default_domain _nl_current_default_domain__ -# define _nl_default_dirname _nl_default_dirname__ -# define _nl_domain_bindings _nl_domain_bindings__ +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings #endif /* Some compilers, like SunOS4 cc, don't have offsetof in . */ @@ -292,6 +306,7 @@ some additional code emulating it. */ #ifdef HAVE_ALLOCA /* Nothing has to be done. */ +# define freea(p) /* nothing */ # define ADD_BLOCK(list, address) /* nothing */ # define FREE_BLOCKS(list) /* nothing */ #else @@ -316,11 +331,13 @@ while (list != NULL) { \ struct block_list *old = list; \ list = list->next; \ + free (old->address); \ free (old); \ } \ } while (0) # undef alloca # define alloca(size) (malloc (size)) +# define freea(p) free (p) #endif /* have alloca */ @@ -344,7 +361,7 @@ #ifdef _LIBC # define DCIGETTEXT __dcigettext #else -# define DCIGETTEXT dcigettext__ +# define DCIGETTEXT libintl_dcigettext #endif /* Lock variable to protect the global data in the gettext implementation. */ @@ -446,6 +463,7 @@ search->category = category; foundp = (struct known_translation_t **) tfind (search, &root, transcmp); + freea (search); if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr) { /* Now deal with plural. */ @@ -679,6 +697,7 @@ size_t *lengthp; { struct loaded_domain *domain; + nls_uint32 nstrings; size_t act; char *result; size_t resultlen; @@ -691,8 +710,10 @@ domain = (struct loaded_domain *) domain_file->data; + nstrings = domain->nstrings; + /* Locate the MSGID and its translation. */ - if (domain->hash_size > 2 && domain->hash_tab != NULL) + if (domain->hash_tab != NULL) { /* Use the hashing table. */ nls_uint32 len = strlen (msgid); @@ -702,22 +723,30 @@ while (1) { - nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]); + nls_uint32 nstr = + W (domain->must_swap_hash_tab, domain->hash_tab[idx]); if (nstr == 0) /* Hash table entry is empty. */ return NULL; - /* Compare msgid with the original string at index nstr-1. + nstr--; + + /* Compare msgid with the original string at index nstr. We compare the lengths with >=, not ==, because plural entries are represented by strings with an embedded NUL. */ - if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len - && (strcmp (msgid, - domain->data + W (domain->must_swap, - domain->orig_tab[nstr - 1].offset)) - == 0)) + if (nstr < nstrings + ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len + && (strcmp (msgid, + domain->data + W (domain->must_swap, + domain->orig_tab[nstr].offset)) + == 0) + : domain->orig_sysdep_tab[nstr - nstrings].length > len + && (strcmp (msgid, + domain->orig_sysdep_tab[nstr - nstrings].pointer) + == 0)) { - act = nstr - 1; + act = nstr; goto found; } @@ -735,7 +764,7 @@ size_t top, bottom; bottom = 0; - top = domain->nstrings; + top = nstrings; while (bottom < top) { int cmp_val; @@ -758,9 +787,17 @@ found: /* The translation was found at index ACT. If we have to convert the string to use a different character set, this is the time. */ - result = ((char *) domain->data - + W (domain->must_swap, domain->trans_tab[act].offset)); - resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; + if (act < nstrings) + { + result = (char *) + (domain->data + W (domain->must_swap, domain->trans_tab[act].offset)); + resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; + } + else + { + result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer; + resultlen = domain->trans_sysdep_tab[act - nstrings].length; + } #if defined _LIBC || HAVE_ICONV if (domain->codeset_cntr @@ -793,8 +830,9 @@ NULs. */ if (domain->conv_tab == NULL - && ((domain->conv_tab = (char **) calloc (domain->nstrings, - sizeof (char *))) + && ((domain->conv_tab = + (char **) calloc (nstrings + domain->n_sysdep_strings, + sizeof (char *))) == NULL)) /* Mark that we didn't succeed allocating a table. */ domain->conv_tab = (char **) -1; diff -urN gawk-3.1.1/intl/dcngettext.c gawk-3.1.2/intl/dcngettext.c --- gawk-3.1.1/intl/dcngettext.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/dcngettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -37,8 +37,8 @@ # define DCNGETTEXT __dcngettext # define DCIGETTEXT __dcigettext #else -# define DCNGETTEXT dcngettext__ -# define DCIGETTEXT dcigettext__ +# define DCNGETTEXT libintl_dcngettext +# define DCIGETTEXT libintl_dcigettext #endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY diff -urN gawk-3.1.1/intl/dgettext.c gawk-3.1.2/intl/dgettext.c --- gawk-3.1.1/intl/dgettext.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/dgettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -39,8 +39,8 @@ # define DGETTEXT __dgettext # define DCGETTEXT INTUSE(__dcgettext) #else -# define DGETTEXT dgettext__ -# define DCGETTEXT dcgettext__ +# define DGETTEXT libintl_dgettext +# define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current diff -urN gawk-3.1.1/intl/dngettext.c gawk-3.1.2/intl/dngettext.c --- gawk-3.1.1/intl/dngettext.c 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/dngettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -39,8 +39,8 @@ # define DNGETTEXT __dngettext # define DCNGETTEXT INTUSE(__dcngettext) #else -# define DNGETTEXT dngettext__ -# define DCNGETTEXT dcngettext__ +# define DNGETTEXT libintl_dngettext +# define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the DOMAINNAME message catalog of the current diff -urN gawk-3.1.1/intl/eval-plural.h gawk-3.1.2/intl/eval-plural.h --- gawk-3.1.1/intl/eval-plural.h 2002-04-28 17:01:51.000000000 +0300 +++ gawk-3.1.2/intl/eval-plural.h 2002-09-19 11:00:07.000000000 +0300 @@ -68,8 +68,16 @@ case mult: return leftarg * rightarg; case divide: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif return leftarg / rightarg; case module: +#if !INTDIV0_RAISES_SIGFPE + if (rightarg == 0) + raise (SIGFPE); +#endif return leftarg % rightarg; case plus: return leftarg + rightarg; diff -urN gawk-3.1.1/intl/gettext.c gawk-3.1.2/intl/gettext.c --- gawk-3.1.1/intl/gettext.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/gettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -44,8 +44,8 @@ # define GETTEXT __gettext # define DCGETTEXT INTUSE(__dcgettext) #else -# define GETTEXT gettext__ -# define DCGETTEXT dcgettext__ +# define GETTEXT libintl_gettext +# define DCGETTEXT libintl_dcgettext #endif /* Look up MSGID in the current default message catalog for the current diff -urN gawk-3.1.1/intl/gettextP.h gawk-3.1.2/intl/gettextP.h --- gawk-3.1.1/intl/gettextP.h 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/gettextP.h 2002-09-19 11:00:07.000000000 +0300 @@ -76,18 +76,50 @@ #endif +/* In-memory representation of system dependent string. */ +struct sysdep_string_desc +{ + /* Length of addressed string, including the trailing NUL. */ + size_t length; + /* Pointer to addressed string. */ + const char *pointer; +}; + /* The representation of an opened message catalog. */ struct loaded_domain { + /* Pointer to memory containing the .mo file. */ const char *data; + /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */ int use_mmap; + /* Size of mmap()ed memory. */ size_t mmap_size; + /* 1 if the .mo file uses a different endianness than this machine. */ int must_swap; + /* Pointer to additional malloc()ed memory. */ + void *malloced; + + /* Number of static strings pairs. */ nls_uint32 nstrings; - struct string_desc *orig_tab; - struct string_desc *trans_tab; + /* Pointer to descriptors of original strings in the file. */ + const struct string_desc *orig_tab; + /* Pointer to descriptors of translated strings in the file. */ + const struct string_desc *trans_tab; + + /* Number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Pointer to descriptors of original sysdep strings. */ + const struct sysdep_string_desc *orig_sysdep_tab; + /* Pointer to descriptors of translated sysdep strings. */ + const struct sysdep_string_desc *trans_sysdep_tab; + + /* Size of hash table. */ nls_uint32 hash_size; - nls_uint32 *hash_tab; + /* Pointer to hash table. */ + const nls_uint32 *hash_tab; + /* 1 if the hash table uses a different endianness than this machine. */ + int must_swap_hash_tab; + int codeset_cntr; #ifdef _LIBC __gconv_t conv; @@ -176,28 +208,33 @@ extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname, const char *__codeset)); #else -extern char *gettext__ PARAMS ((const char *__msgid)); -extern char *dgettext__ PARAMS ((const char *__domainname, - const char *__msgid)); -extern char *dcgettext__ PARAMS ((const char *__domainname, - const char *__msgid, int __category)); -extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2, - unsigned long int __n)); -extern char *dngettext__ PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n)); -extern char *dcngettext__ PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category)); -extern char *dcigettext__ PARAMS ((const char *__domainname, - const char *__msgid1, const char *__msgid2, - int __plural, unsigned long int __n, - int __category)); -extern char *textdomain__ PARAMS ((const char *__domainname)); -extern char *bindtextdomain__ PARAMS ((const char *__domainname, - const char *__dirname)); -extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname, - const char *__codeset)); +extern char *libintl_gettext PARAMS ((const char *__msgid)); +extern char *libintl_dgettext PARAMS ((const char *__domainname, + const char *__msgid)); +extern char *libintl_dcgettext PARAMS ((const char *__domainname, + const char *__msgid, int __category)); +extern char *libintl_ngettext PARAMS ((const char *__msgid1, + const char *__msgid2, + unsigned long int __n)); +extern char *libintl_dngettext PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + unsigned long int __n)); +extern char *libintl_dcngettext PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + unsigned long int __n, + int __category)); +extern char *libintl_dcigettext PARAMS ((const char *__domainname, + const char *__msgid1, + const char *__msgid2, + int __plural, unsigned long int __n, + int __category)); +extern char *libintl_textdomain PARAMS ((const char *__domainname)); +extern char *libintl_bindtextdomain PARAMS ((const char *__domainname, + const char *__dirname)); +extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname, + const char *__codeset)); #endif /* @@ begin of epilog @@ */ diff -urN gawk-3.1.1/intl/gmo.h gawk-3.1.2/intl/gmo.h --- gawk-3.1.1/intl/gmo.h 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/gmo.h 2002-09-19 11:00:07.000000000 +0300 @@ -1,5 +1,5 @@ /* Description of GNU message catalog format: general file layout. - Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995, 1997, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -75,26 +75,74 @@ nls_uint32 magic; /* The revision number of the file format. */ nls_uint32 revision; + + /* The following are only used in .mo files with major revision 0. */ + /* The number of strings pairs. */ nls_uint32 nstrings; /* Offset of table with start offsets of original strings. */ nls_uint32 orig_tab_offset; - /* Offset of table with start offsets of translation strings. */ + /* Offset of table with start offsets of translated strings. */ nls_uint32 trans_tab_offset; - /* Size of hashing table. */ + /* Size of hash table. */ nls_uint32 hash_tab_size; - /* Offset of first hashing entry. */ + /* Offset of first hash table entry. */ nls_uint32 hash_tab_offset; + + /* The following are only used in .mo files with minor revision >= 1. */ + + /* The number of system dependent segments. */ + nls_uint32 n_sysdep_segments; + /* Offset of table describing system dependent segments. */ + nls_uint32 sysdep_segments_offset; + /* The number of system dependent strings pairs. */ + nls_uint32 n_sysdep_strings; + /* Offset of table with start offsets of original sysdep strings. */ + nls_uint32 orig_sysdep_tab_offset; + /* Offset of table with start offsets of translated sysdep strings. */ + nls_uint32 trans_sysdep_tab_offset; }; +/* Descriptor for static string contained in the binary .mo file. */ struct string_desc { - /* Length of addressed string. */ + /* Length of addressed string, not including the trailing NUL. */ + nls_uint32 length; + /* Offset of string in file. */ + nls_uint32 offset; +}; + +/* The following are only used in .mo files with minor revision >= 1. */ + +/* Descriptor for system dependent string segment. */ +struct sysdep_segment +{ + /* Length of addressed string, including the trailing NUL. */ nls_uint32 length; /* Offset of string in file. */ nls_uint32 offset; }; +/* Descriptor for system dependent string. */ +struct sysdep_string +{ + /* Offset of static string segments in file. */ + nls_uint32 offset; + /* Alternating sequence of static and system dependent segments. + The last segment is a static segment, including the trailing NUL. */ + struct segment_pair + { + /* Size of static segment. */ + nls_uint32 segsize; + /* Reference to system dependent string segment, or ~0 at the end. */ + nls_uint32 sysdepref; + } segments[1]; +}; + +/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF, + regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */ +#define SEGMENTS_END ((nls_uint32) ~0) + /* @@ begin of epilog @@ */ #endif /* gettext.h */ diff -urN gawk-3.1.1/intl/intl-compat.c gawk-3.1.2/intl/intl-compat.c --- gawk-3.1.1/intl/intl-compat.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/intl-compat.c 2002-09-19 11:00:07.000000000 +0300 @@ -1,6 +1,6 @@ /* intl-compat.c - Stub functions to call gettext functions from GNU gettext Library. - Copyright (C) 1995, 2000, 2001 Software Foundation, Inc. + Copyright (C) 1995, 2000-2002 Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -21,52 +21,17 @@ # include #endif +#define _INTL_REDIRECT_MACROS #include "libgnuintl.h" #include "gettextP.h" /* @@ end of prolog @@ */ -/* This file redirects the gettext functions (without prefix or suffix) to - those defined in the included GNU gettext library (with "__" suffix). - It is compiled into libintl when the included GNU gettext library is - configured --with-included-gettext. - - This redirection works also in the case that the system C library or - the system libintl library contain gettext/textdomain/... functions. - If it didn't, we would need to add preprocessor level redirections to - libgnuintl.h of the following form: - -# define gettext gettext__ -# define dgettext dgettext__ -# define dcgettext dcgettext__ -# define ngettext ngettext__ -# define dngettext dngettext__ -# define dcngettext dcngettext__ -# define textdomain textdomain__ -# define bindtextdomain bindtextdomain__ -# define bind_textdomain_codeset bind_textdomain_codeset__ - - How does this redirection work? There are two cases. - A. When libintl.a is linked into an executable, it works because - functions defined in the executable always override functions in - the shared libraries. - B. When libintl.so is used, it works because - 1. those systems defining gettext/textdomain/... in the C library - (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are - ELF systems and define these symbols as weak, thus explicitly - letting other shared libraries override it. - 2. those systems defining gettext/textdomain/... in a standalone - libintl.so library (namely, Solaris 2.3 and newer) have this - shared library in /usr/lib, and the linker will search /usr/lib - *after* the directory where the GNU gettext library is installed. - - A third case, namely when libintl.a is linked into a shared library - whose name is not libintl.so, is not supported. In this case, on - Solaris, when -lintl precedes the linker option for the shared library - containing GNU gettext, the system's gettext would indeed override - the GNU gettext. Anyone doing this kind of stuff must be clever enough - to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker - command line. */ +/* This file redirects the gettext functions (without prefix) to those + defined in the included GNU libintl library (with "libintl_" prefix). + It is compiled into libintl in order to make the AM_GNU_GETTEXT test + of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which + has the redirections primarily in the include file. */ #undef gettext @@ -84,7 +49,7 @@ gettext (msgid) const char *msgid; { - return gettext__ (msgid); + return libintl_gettext (msgid); } @@ -93,7 +58,7 @@ const char *domainname; const char *msgid; { - return dgettext__ (domainname, msgid); + return libintl_dgettext (domainname, msgid); } @@ -103,7 +68,7 @@ const char *msgid; int category; { - return dcgettext__ (domainname, msgid, category); + return libintl_dcgettext (domainname, msgid, category); } @@ -113,7 +78,7 @@ const char *msgid2; unsigned long int n; { - return ngettext__ (msgid1, msgid2, n); + return libintl_ngettext (msgid1, msgid2, n); } @@ -124,7 +89,7 @@ const char *msgid2; unsigned long int n; { - return dngettext__ (domainname, msgid1, msgid2, n); + return libintl_dngettext (domainname, msgid1, msgid2, n); } @@ -136,7 +101,7 @@ unsigned long int n; int category; { - return dcngettext__ (domainname, msgid1, msgid2, n, category); + return libintl_dcngettext (domainname, msgid1, msgid2, n, category); } @@ -144,7 +109,7 @@ textdomain (domainname) const char *domainname; { - return textdomain__ (domainname); + return libintl_textdomain (domainname); } @@ -153,7 +118,7 @@ const char *domainname; const char *dirname; { - return bindtextdomain__ (domainname, dirname); + return libintl_bindtextdomain (domainname, dirname); } @@ -162,5 +127,5 @@ const char *domainname; const char *codeset; { - return bind_textdomain_codeset__ (domainname, codeset); + return libintl_bind_textdomain_codeset (domainname, codeset); } diff -urN gawk-3.1.1/intl/l10nflist.c gawk-3.1.2/intl/l10nflist.c --- gawk-3.1.1/intl/l10nflist.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/l10nflist.c 2002-09-19 11:00:07.000000000 +0300 @@ -62,6 +62,24 @@ # endif #endif +/* Pathname support. + ISSLASH(C) tests whether C is a directory separator character. + IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not, + it may be concatenated to a directory pathname. + */ +#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__ + /* Win32, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +# define HAS_DEVICE(P) \ + ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \ + && (P)[1] == ':') +# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P)) +#else + /* Unix */ +# define ISSLASH(C) ((C) == '/') +# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0]) +#endif + /* Define function which are usually not available. */ #if !defined _LIBC && !defined HAVE___ARGZ_COUNT @@ -185,12 +203,18 @@ int do_allocate; { char *abs_filename; - struct loaded_l10nfile *last = NULL; + struct loaded_l10nfile **lastp; struct loaded_l10nfile *retval; char *cp; + size_t dirlist_count; size_t entries; int cnt; + /* If LANGUAGE contains an absolute directory specification, we ignore + DIRLIST. */ + if (IS_ABSOLUTE_PATH (language)) + dirlist_len = 0; + /* Allocate room for the full file name. */ abs_filename = (char *) malloc (dirlist_len + strlen (language) @@ -208,7 +232,7 @@ + (((mask & CEN_SPONSOR) != 0 || (mask & CEN_REVISION) != 0) ? (1 + ((mask & CEN_SPONSOR) != 0 - ? strlen (sponsor) + 1 : 0) + ? strlen (sponsor) : 0) + ((mask & CEN_REVISION) != 0 ? strlen (revision) + 1 : 0)) : 0) + 1 + strlen (filename) + 1); @@ -216,14 +240,16 @@ if (abs_filename == NULL) return NULL; - retval = NULL; - last = NULL; - /* Construct file name. */ - memcpy (abs_filename, dirlist, dirlist_len); - __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR); - cp = abs_filename + (dirlist_len - 1); - *cp++ = '/'; + cp = abs_filename; + if (dirlist_len > 0) + { + memcpy (cp, dirlist, dirlist_len); + __argz_stringify (cp, dirlist_len, PATH_SEPARATOR); + cp += dirlist_len; + cp[-1] = '/'; + } + cp = stpcpy (cp, language); if ((mask & TERRITORY) != 0) @@ -270,7 +296,7 @@ /* Look in list of already loaded domains whether it is already available. */ - last = NULL; + lastp = l10nfile_list; for (retval = *l10nfile_list; retval != NULL; retval = retval->next) if (retval->filename != NULL) { @@ -285,7 +311,7 @@ break; } - last = retval; + lastp = &retval->next; } if (retval != NULL || do_allocate == 0) @@ -294,48 +320,66 @@ return retval; } - retval = (struct loaded_l10nfile *) - malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len) - * (1 << pop (mask)) - * sizeof (struct loaded_l10nfile *))); + dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1); + + /* Allocate a new loaded_l10nfile. */ + retval = + (struct loaded_l10nfile *) + malloc (sizeof (*retval) + + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0)) + * sizeof (struct loaded_l10nfile *))); if (retval == NULL) return NULL; retval->filename = abs_filename; - retval->decided = (__argz_count (dirlist, dirlist_len) != 1 + + /* We set retval->data to NULL here; it is filled in later. + Setting retval->decided to 1 here means that retval does not + correspond to a real file (dirlist_count > 1) or is not worth + looking up (if an unnormalized codeset was specified). */ + retval->decided = (dirlist_count > 1 || ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0)); retval->data = NULL; - if (last == NULL) - { - retval->next = *l10nfile_list; - *l10nfile_list = retval; - } - else - { - retval->next = last->next; - last->next = retval; - } + retval->next = *lastp; + *lastp = retval; entries = 0; - /* If the DIRLIST is a real list the RETVAL entry corresponds not to - a real file. So we have to use the DIRLIST separation mechanism - of the inner loop. */ - cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; - for (; cnt >= 0; --cnt) + /* Recurse to fill the inheritance list of RETVAL. + If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL + entry does not correspond to a real file; retval->filename contains + colons. In this case we loop across all elements of DIRLIST and + across all bit patterns dominated by MASK. + If the DIRLIST is a single directory or entirely redundant (i.e. + DIRLIST_COUNT == 1), we loop across all bit patterns dominated by + MASK, excluding MASK itself. + In either case, we loop down from MASK to 0. This has the effect + that the extra bits in the locale name are dropped in this order: + first the modifier, then the territory, then the codeset, then the + normalized_codeset. */ + for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt) if ((cnt & ~mask) == 0 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0) && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0)) { - /* Iterate over all elements of the DIRLIST. */ - char *dir = NULL; + if (dirlist_count > 1) + { + /* Iterate over all elements of the DIRLIST. */ + char *dir = NULL; - while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) - != NULL) + while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir)) + != NULL) + retval->successor[entries++] + = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, + cnt, language, territory, codeset, + normalized_codeset, modifier, special, + sponsor, revision, filename, 1); + } + else retval->successor[entries++] - = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt, - language, territory, codeset, + = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, + cnt, language, territory, codeset, normalized_codeset, modifier, special, sponsor, revision, filename, 1); } diff -urN gawk-3.1.1/intl/libgnuintl.h gawk-3.1.2/intl/libgnuintl.h --- gawk-3.1.1/intl/libgnuintl.h 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/libgnuintl.h 2003-02-04 13:21:44.000000000 +0200 @@ -36,11 +36,15 @@ implementation of gettext. */ #define __USE_GNU_GETTEXT 1 +/* Provide information about the supported file formats. Returns the + maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 ? 1 : -1) + /* Resolve a platform specific conflict on DJGPP. GNU gettext takes precedence over _conio_gettext. */ #ifdef __DJGPP__ # undef gettext -# define gettext gettext #endif /* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers @@ -57,78 +61,232 @@ extern "C" { #endif + +/* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + +/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if __GNUC__ >= 2 && (defined __STDC__ || defined __cplusplus) && !(defined __APPLE_CC__) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif +/* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + /* Look up MSGID in the current default message catalog for the current LC_MESSAGES locale. If not found, returns MSGID itself (the default text). */ -extern char *gettext _INTL_PARAMS ((const char *__msgid)); +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_gettext (const char *__msgid); +static inline char *gettext (const char *__msgid) +{ + return libintl_gettext (__msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif +extern char *gettext _INTL_PARAMS ((const char *__msgid)) + _INTL_ASM (libintl_gettext); +#endif /* Look up MSGID in the DOMAINNAME message catalog for the current LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dgettext (const char *__domainname, const char *__msgid); +static inline char *dgettext (const char *__domainname, const char *__msgid) +{ + return libintl_dgettext (__domainname, __msgid); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif extern char *dgettext _INTL_PARAMS ((const char *__domainname, - const char *__msgid)); + const char *__msgid)) + _INTL_ASM (libintl_dgettext); +#endif /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, + int __category); +static inline char *dcgettext (const char *__domainname, const char *__msgid, + int __category) +{ + return libintl_dcgettext (__domainname, __msgid, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif extern char *dcgettext _INTL_PARAMS ((const char *__domainname, const char *__msgid, - int __category)); + int __category)) + _INTL_ASM (libintl_dcgettext); +#endif /* Similar to `gettext' but select the plural form corresponding to the number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n); +static inline char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) +{ + return libintl_ngettext (__msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif extern char *ngettext _INTL_PARAMS ((const char *__msgid1, const char *__msgid2, - unsigned long int __n)); + unsigned long int __n)) + _INTL_ASM (libintl_ngettext); +#endif /* Similar to `dgettext' but select the plural form corresponding to the number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n); +static inline char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) +{ + return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif extern char *dngettext _INTL_PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, - unsigned long int __n)); + unsigned long int __n)) + _INTL_ASM (libintl_dngettext); +#endif /* Similar to `dcgettext' but select the plural form corresponding to the number N. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category); +static inline char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) +{ + return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif extern char *dcngettext _INTL_PARAMS ((const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, - int __category)); + int __category)) + _INTL_ASM (libintl_dcngettext); +#endif /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */ -extern char *textdomain _INTL_PARAMS ((const char *__domainname)); +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_textdomain (const char *__domainname); +static inline char *textdomain (const char *__domainname) +{ + return libintl_textdomain (__domainname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif +extern char *textdomain _INTL_PARAMS ((const char *__domainname)) + _INTL_ASM (libintl_textdomain); +#endif /* Specify that the DOMAINNAME message catalog will be found in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bindtextdomain (const char *__domainname, + const char *__dirname); +static inline char *bindtextdomain (const char *__domainname, + const char *__dirname) +{ + return libintl_bindtextdomain (__domainname, __dirname); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname, - const char *__dirname)); + const char *__dirname)) + _INTL_ASM (libintl_bindtextdomain); +#endif /* Specify the character encoding in which the messages from the DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE +extern char *libintl_bind_textdomain_codeset (const char *__domainname, + const char *__codeset); +static inline char *bind_textdomain_codeset (const char *__domainname, + const char *__codeset) +{ + return libintl_bind_textdomain_codeset (__domainname, __codeset); +} +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname, - const char *__codeset)); - - -/* Optimized version of the functions above. */ -#if defined __OPTIMIZED -/* These are macros, but could also be inline functions. */ - -# define gettext(msgid) \ - dgettext (NULL, msgid) - -# define dgettext(domainname, msgid) \ - dcgettext (domainname, msgid, LC_MESSAGES) - -# define ngettext(msgid1, msgid2, n) \ - dngettext (NULL, msgid1, msgid2, n) - -# define dngettext(domainname, msgid1, msgid2, n) \ - dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES) - -#endif /* Optimizing. */ + const char *__codeset)) + _INTL_ASM (libintl_bind_textdomain_codeset); +#endif #ifdef __cplusplus diff -urN gawk-3.1.1/intl/loadinfo.h gawk-3.1.2/intl/loadinfo.h --- gawk-3.1.1/intl/loadinfo.h 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/loadinfo.h 2002-09-19 11:00:07.000000000 +0300 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1996-1999, 2000-2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -92,6 +92,20 @@ extern const char *_nl_normalize_codeset PARAMS ((const char *codeset, size_t name_len)); +/* Lookup a locale dependent file. + *L10NFILE_LIST denotes a pool of lookup results of locale dependent + files of the same kind, sorted in decreasing order of ->filename. + DIRLIST and DIRLIST_LEN are an argz list of directories in which to + look, containing at least one directory (i.e. DIRLIST_LEN > 0). + MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER, + SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as + produced by _nl_explode_name(). FILENAME is the filename suffix. + The return value is the lookup result, either found in *L10NFILE_LIST, + or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL. + If the return value is non-NULL, it is added to *L10NFILE_LIST, and + its ->next field denotes the chaining inside *L10NFILE_LIST, and + furthermore its ->successor[] field contains a list of other lookup + results from which this lookup result inherits. */ extern struct loaded_l10nfile * _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list, const char *dirlist, size_t dirlist_len, int mask, @@ -102,11 +116,29 @@ const char *sponsor, const char *revision, const char *filename, int do_allocate)); - +/* Lookup the real locale name for a locale alias NAME, or NULL if + NAME is not a locale alias (but possibly a real locale name). + The return value is statically allocated and must not be freed. */ extern const char *_nl_expand_alias PARAMS ((const char *name)); -/* normalized_codeset is dynamically allocated and has to be freed by - the caller. */ +/* Split a locale name NAME into its pieces: language, modifier, + territory, codeset, special, sponsor, revision. + NAME gets destructively modified: NUL bytes are inserted here and + there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY, + *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a + pointer into the old NAME string, or NULL. *NORMALIZED_CODESET + gets assigned the expanded *CODESET, if it is different from *CODESET; + this one is dynamically allocated and has to be freed by the caller. + The return value is a bitmask, where each bit corresponds to one + filled-in value: + XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER, + TERRITORY for *TERRITORY, + XPG_CODESET for *CODESET, + XPG_NORM_CODESET for *NORMALIZED_CODESET, + CEN_SPECIAL for *SPECIAL, + CEN_SPONSOR for *SPONSOR, + CEN_REVISION for *REVISION. + */ extern int _nl_explode_name PARAMS ((char *name, const char **language, const char **modifier, const char **territory, @@ -116,6 +148,9 @@ const char **sponsor, const char **revision)); +/* Split a locale name NAME into a leading language part and all the + rest. Return a pointer to the first character after the language, + i.e. to the first byte of the rest. */ extern char *_nl_find_language PARAMS ((const char *name)); #endif /* loadinfo.h */ diff -urN gawk-3.1.1/intl/loadmsgcat.c gawk-3.1.2/intl/loadmsgcat.c --- gawk-3.1.1/intl/loadmsgcat.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/loadmsgcat.c 2002-09-19 11:00:07.000000000 +0300 @@ -1,5 +1,5 @@ /* Load needed message catalogs. - Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -71,14 +71,380 @@ # undef HAVE_MMAP #endif +#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC +# include +#endif +#if defined HAVE_INTTYPES_H || defined _LIBC +# include +#endif + #include "gmo.h" #include "gettextP.h" +#include "hash-string.h" #include "plural-exp.h" #ifdef _LIBC # include "../locale/localeinfo.h" #endif +/* Provide fallback values for macros that ought to be defined in . + Note that our fallback values need not be literal strings, because we don't + use them with preprocessor string concatenation. */ +#if !defined PRId8 || PRI_MACROS_BROKEN +# undef PRId8 +# define PRId8 "d" +#endif +#if !defined PRIi8 || PRI_MACROS_BROKEN +# undef PRIi8 +# define PRIi8 "i" +#endif +#if !defined PRIo8 || PRI_MACROS_BROKEN +# undef PRIo8 +# define PRIo8 "o" +#endif +#if !defined PRIu8 || PRI_MACROS_BROKEN +# undef PRIu8 +# define PRIu8 "u" +#endif +#if !defined PRIx8 || PRI_MACROS_BROKEN +# undef PRIx8 +# define PRIx8 "x" +#endif +#if !defined PRIX8 || PRI_MACROS_BROKEN +# undef PRIX8 +# define PRIX8 "X" +#endif +#if !defined PRId16 || PRI_MACROS_BROKEN +# undef PRId16 +# define PRId16 "d" +#endif +#if !defined PRIi16 || PRI_MACROS_BROKEN +# undef PRIi16 +# define PRIi16 "i" +#endif +#if !defined PRIo16 || PRI_MACROS_BROKEN +# undef PRIo16 +# define PRIo16 "o" +#endif +#if !defined PRIu16 || PRI_MACROS_BROKEN +# undef PRIu16 +# define PRIu16 "u" +#endif +#if !defined PRIx16 || PRI_MACROS_BROKEN +# undef PRIx16 +# define PRIx16 "x" +#endif +#if !defined PRIX16 || PRI_MACROS_BROKEN +# undef PRIX16 +# define PRIX16 "X" +#endif +#if !defined PRId32 || PRI_MACROS_BROKEN +# undef PRId32 +# define PRId32 "d" +#endif +#if !defined PRIi32 || PRI_MACROS_BROKEN +# undef PRIi32 +# define PRIi32 "i" +#endif +#if !defined PRIo32 || PRI_MACROS_BROKEN +# undef PRIo32 +# define PRIo32 "o" +#endif +#if !defined PRIu32 || PRI_MACROS_BROKEN +# undef PRIu32 +# define PRIu32 "u" +#endif +#if !defined PRIx32 || PRI_MACROS_BROKEN +# undef PRIx32 +# define PRIx32 "x" +#endif +#if !defined PRIX32 || PRI_MACROS_BROKEN +# undef PRIX32 +# define PRIX32 "X" +#endif +#if !defined PRId64 || PRI_MACROS_BROKEN +# undef PRId64 +# define PRId64 (sizeof (long) == 8 ? "ld" : "lld") +#endif +#if !defined PRIi64 || PRI_MACROS_BROKEN +# undef PRIi64 +# define PRIi64 (sizeof (long) == 8 ? "li" : "lli") +#endif +#if !defined PRIo64 || PRI_MACROS_BROKEN +# undef PRIo64 +# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo") +#endif +#if !defined PRIu64 || PRI_MACROS_BROKEN +# undef PRIu64 +# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu") +#endif +#if !defined PRIx64 || PRI_MACROS_BROKEN +# undef PRIx64 +# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx") +#endif +#if !defined PRIX64 || PRI_MACROS_BROKEN +# undef PRIX64 +# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX") +#endif +#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN +# undef PRIdLEAST8 +# define PRIdLEAST8 "d" +#endif +#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN +# undef PRIiLEAST8 +# define PRIiLEAST8 "i" +#endif +#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN +# undef PRIoLEAST8 +# define PRIoLEAST8 "o" +#endif +#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN +# undef PRIuLEAST8 +# define PRIuLEAST8 "u" +#endif +#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN +# undef PRIxLEAST8 +# define PRIxLEAST8 "x" +#endif +#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN +# undef PRIXLEAST8 +# define PRIXLEAST8 "X" +#endif +#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN +# undef PRIdLEAST16 +# define PRIdLEAST16 "d" +#endif +#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN +# undef PRIiLEAST16 +# define PRIiLEAST16 "i" +#endif +#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN +# undef PRIoLEAST16 +# define PRIoLEAST16 "o" +#endif +#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN +# undef PRIuLEAST16 +# define PRIuLEAST16 "u" +#endif +#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN +# undef PRIxLEAST16 +# define PRIxLEAST16 "x" +#endif +#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN +# undef PRIXLEAST16 +# define PRIXLEAST16 "X" +#endif +#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN +# undef PRIdLEAST32 +# define PRIdLEAST32 "d" +#endif +#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN +# undef PRIiLEAST32 +# define PRIiLEAST32 "i" +#endif +#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN +# undef PRIoLEAST32 +# define PRIoLEAST32 "o" +#endif +#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN +# undef PRIuLEAST32 +# define PRIuLEAST32 "u" +#endif +#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN +# undef PRIxLEAST32 +# define PRIxLEAST32 "x" +#endif +#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN +# undef PRIXLEAST32 +# define PRIXLEAST32 "X" +#endif +#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN +# undef PRIdLEAST64 +# define PRIdLEAST64 PRId64 +#endif +#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN +# undef PRIiLEAST64 +# define PRIiLEAST64 PRIi64 +#endif +#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN +# undef PRIoLEAST64 +# define PRIoLEAST64 PRIo64 +#endif +#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN +# undef PRIuLEAST64 +# define PRIuLEAST64 PRIu64 +#endif +#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN +# undef PRIxLEAST64 +# define PRIxLEAST64 PRIx64 +#endif +#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN +# undef PRIXLEAST64 +# define PRIXLEAST64 PRIX64 +#endif +#if !defined PRIdFAST8 || PRI_MACROS_BROKEN +# undef PRIdFAST8 +# define PRIdFAST8 "d" +#endif +#if !defined PRIiFAST8 || PRI_MACROS_BROKEN +# undef PRIiFAST8 +# define PRIiFAST8 "i" +#endif +#if !defined PRIoFAST8 || PRI_MACROS_BROKEN +# undef PRIoFAST8 +# define PRIoFAST8 "o" +#endif +#if !defined PRIuFAST8 || PRI_MACROS_BROKEN +# undef PRIuFAST8 +# define PRIuFAST8 "u" +#endif +#if !defined PRIxFAST8 || PRI_MACROS_BROKEN +# undef PRIxFAST8 +# define PRIxFAST8 "x" +#endif +#if !defined PRIXFAST8 || PRI_MACROS_BROKEN +# undef PRIXFAST8 +# define PRIXFAST8 "X" +#endif +#if !defined PRIdFAST16 || PRI_MACROS_BROKEN +# undef PRIdFAST16 +# define PRIdFAST16 "d" +#endif +#if !defined PRIiFAST16 || PRI_MACROS_BROKEN +# undef PRIiFAST16 +# define PRIiFAST16 "i" +#endif +#if !defined PRIoFAST16 || PRI_MACROS_BROKEN +# undef PRIoFAST16 +# define PRIoFAST16 "o" +#endif +#if !defined PRIuFAST16 || PRI_MACROS_BROKEN +# undef PRIuFAST16 +# define PRIuFAST16 "u" +#endif +#if !defined PRIxFAST16 || PRI_MACROS_BROKEN +# undef PRIxFAST16 +# define PRIxFAST16 "x" +#endif +#if !defined PRIXFAST16 || PRI_MACROS_BROKEN +# undef PRIXFAST16 +# define PRIXFAST16 "X" +#endif +#if !defined PRIdFAST32 || PRI_MACROS_BROKEN +# undef PRIdFAST32 +# define PRIdFAST32 "d" +#endif +#if !defined PRIiFAST32 || PRI_MACROS_BROKEN +# undef PRIiFAST32 +# define PRIiFAST32 "i" +#endif +#if !defined PRIoFAST32 || PRI_MACROS_BROKEN +# undef PRIoFAST32 +# define PRIoFAST32 "o" +#endif +#if !defined PRIuFAST32 || PRI_MACROS_BROKEN +# undef PRIuFAST32 +# define PRIuFAST32 "u" +#endif +#if !defined PRIxFAST32 || PRI_MACROS_BROKEN +# undef PRIxFAST32 +# define PRIxFAST32 "x" +#endif +#if !defined PRIXFAST32 || PRI_MACROS_BROKEN +# undef PRIXFAST32 +# define PRIXFAST32 "X" +#endif +#if !defined PRIdFAST64 || PRI_MACROS_BROKEN +# undef PRIdFAST64 +# define PRIdFAST64 PRId64 +#endif +#if !defined PRIiFAST64 || PRI_MACROS_BROKEN +# undef PRIiFAST64 +# define PRIiFAST64 PRIi64 +#endif +#if !defined PRIoFAST64 || PRI_MACROS_BROKEN +# undef PRIoFAST64 +# define PRIoFAST64 PRIo64 +#endif +#if !defined PRIuFAST64 || PRI_MACROS_BROKEN +# undef PRIuFAST64 +# define PRIuFAST64 PRIu64 +#endif +#if !defined PRIxFAST64 || PRI_MACROS_BROKEN +# undef PRIxFAST64 +# define PRIxFAST64 PRIx64 +#endif +#if !defined PRIXFAST64 || PRI_MACROS_BROKEN +# undef PRIXFAST64 +# define PRIXFAST64 PRIX64 +#endif +#if !defined PRIdMAX || PRI_MACROS_BROKEN +# undef PRIdMAX +# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") +#endif +#if !defined PRIiMAX || PRI_MACROS_BROKEN +# undef PRIiMAX +# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli") +#endif +#if !defined PRIoMAX || PRI_MACROS_BROKEN +# undef PRIoMAX +# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") +#endif +#if !defined PRIuMAX || PRI_MACROS_BROKEN +# undef PRIuMAX +# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") +#endif +#if !defined PRIxMAX || PRI_MACROS_BROKEN +# undef PRIxMAX +# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") +#endif +#if !defined PRIXMAX || PRI_MACROS_BROKEN +# undef PRIXMAX +# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX") +#endif +#if !defined PRIdPTR || PRI_MACROS_BROKEN +# undef PRIdPTR +# define PRIdPTR \ + (sizeof (void *) == sizeof (long) ? "ld" : \ + sizeof (void *) == sizeof (int) ? "d" : \ + "lld") +#endif +#if !defined PRIiPTR || PRI_MACROS_BROKEN +# undef PRIiPTR +# define PRIiPTR \ + (sizeof (void *) == sizeof (long) ? "li" : \ + sizeof (void *) == sizeof (int) ? "i" : \ + "lli") +#endif +#if !defined PRIoPTR || PRI_MACROS_BROKEN +# undef PRIoPTR +# define PRIoPTR \ + (sizeof (void *) == sizeof (long) ? "lo" : \ + sizeof (void *) == sizeof (int) ? "o" : \ + "llo") +#endif +#if !defined PRIuPTR || PRI_MACROS_BROKEN +# undef PRIuPTR +# define PRIuPTR \ + (sizeof (void *) == sizeof (long) ? "lu" : \ + sizeof (void *) == sizeof (int) ? "u" : \ + "llu") +#endif +#if !defined PRIxPTR || PRI_MACROS_BROKEN +# undef PRIxPTR +# define PRIxPTR \ + (sizeof (void *) == sizeof (long) ? "lx" : \ + sizeof (void *) == sizeof (int) ? "x" : \ + "llx") +#endif +#if !defined PRIXPTR || PRI_MACROS_BROKEN +# undef PRIXPTR +# define PRIXPTR \ + (sizeof (void *) == sizeof (long) ? "lX" : \ + sizeof (void *) == sizeof (int) ? "X" : \ + "llX") +#endif + /* @@ end of prolog @@ */ #ifdef _LIBC @@ -118,12 +484,274 @@ # define O_BINARY 0 #endif + +/* Prototypes for local functions. Needed to ensure compiler checking of + function argument counts despite of K&R C function definition syntax. */ +static const char *get_sysdep_segment_value PARAMS ((const char *name)); + + /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr; +/* Expand a system dependent string segment. Return NULL if unsupported. */ +static const char * +get_sysdep_segment_value (name) + const char *name; +{ + /* Test for an ISO C 99 section 7.8.1 format string directive. + Syntax: + P R I { d | i | o | u | x | X } + { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */ + /* We don't use a table of 14 times 6 'const char *' strings here, because + data relocations cost startup time. */ + if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I') + { + if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u' + || name[3] == 'x' || name[3] == 'X') + { + if (name[4] == '8' && name[5] == '\0') + { + if (name[3] == 'd') + return PRId8; + if (name[3] == 'i') + return PRIi8; + if (name[3] == 'o') + return PRIo8; + if (name[3] == 'u') + return PRIu8; + if (name[3] == 'x') + return PRIx8; + if (name[3] == 'X') + return PRIX8; + abort (); + } + if (name[4] == '1' && name[5] == '6' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId16; + if (name[3] == 'i') + return PRIi16; + if (name[3] == 'o') + return PRIo16; + if (name[3] == 'u') + return PRIu16; + if (name[3] == 'x') + return PRIx16; + if (name[3] == 'X') + return PRIX16; + abort (); + } + if (name[4] == '3' && name[5] == '2' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId32; + if (name[3] == 'i') + return PRIi32; + if (name[3] == 'o') + return PRIo32; + if (name[3] == 'u') + return PRIu32; + if (name[3] == 'x') + return PRIx32; + if (name[3] == 'X') + return PRIX32; + abort (); + } + if (name[4] == '6' && name[5] == '4' && name[6] == '\0') + { + if (name[3] == 'd') + return PRId64; + if (name[3] == 'i') + return PRIi64; + if (name[3] == 'o') + return PRIo64; + if (name[3] == 'u') + return PRIu64; + if (name[3] == 'x') + return PRIx64; + if (name[3] == 'X') + return PRIX64; + abort (); + } + if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A' + && name[7] == 'S' && name[8] == 'T') + { + if (name[9] == '8' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST8; + if (name[3] == 'i') + return PRIiLEAST8; + if (name[3] == 'o') + return PRIoLEAST8; + if (name[3] == 'u') + return PRIuLEAST8; + if (name[3] == 'x') + return PRIxLEAST8; + if (name[3] == 'X') + return PRIXLEAST8; + abort (); + } + if (name[9] == '1' && name[10] == '6' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST16; + if (name[3] == 'i') + return PRIiLEAST16; + if (name[3] == 'o') + return PRIoLEAST16; + if (name[3] == 'u') + return PRIuLEAST16; + if (name[3] == 'x') + return PRIxLEAST16; + if (name[3] == 'X') + return PRIXLEAST16; + abort (); + } + if (name[9] == '3' && name[10] == '2' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST32; + if (name[3] == 'i') + return PRIiLEAST32; + if (name[3] == 'o') + return PRIoLEAST32; + if (name[3] == 'u') + return PRIuLEAST32; + if (name[3] == 'x') + return PRIxLEAST32; + if (name[3] == 'X') + return PRIXLEAST32; + abort (); + } + if (name[9] == '6' && name[10] == '4' && name[11] == '\0') + { + if (name[3] == 'd') + return PRIdLEAST64; + if (name[3] == 'i') + return PRIiLEAST64; + if (name[3] == 'o') + return PRIoLEAST64; + if (name[3] == 'u') + return PRIuLEAST64; + if (name[3] == 'x') + return PRIxLEAST64; + if (name[3] == 'X') + return PRIXLEAST64; + abort (); + } + } + if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S' + && name[7] == 'T') + { + if (name[8] == '8' && name[9] == '\0') + { + if (name[3] == 'd') + return PRIdFAST8; + if (name[3] == 'i') + return PRIiFAST8; + if (name[3] == 'o') + return PRIoFAST8; + if (name[3] == 'u') + return PRIuFAST8; + if (name[3] == 'x') + return PRIxFAST8; + if (name[3] == 'X') + return PRIXFAST8; + abort (); + } + if (name[8] == '1' && name[9] == '6' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST16; + if (name[3] == 'i') + return PRIiFAST16; + if (name[3] == 'o') + return PRIoFAST16; + if (name[3] == 'u') + return PRIuFAST16; + if (name[3] == 'x') + return PRIxFAST16; + if (name[3] == 'X') + return PRIXFAST16; + abort (); + } + if (name[8] == '3' && name[9] == '2' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST32; + if (name[3] == 'i') + return PRIiFAST32; + if (name[3] == 'o') + return PRIoFAST32; + if (name[3] == 'u') + return PRIuFAST32; + if (name[3] == 'x') + return PRIxFAST32; + if (name[3] == 'X') + return PRIXFAST32; + abort (); + } + if (name[8] == '6' && name[9] == '4' && name[10] == '\0') + { + if (name[3] == 'd') + return PRIdFAST64; + if (name[3] == 'i') + return PRIiFAST64; + if (name[3] == 'o') + return PRIoFAST64; + if (name[3] == 'u') + return PRIuFAST64; + if (name[3] == 'x') + return PRIxFAST64; + if (name[3] == 'X') + return PRIXFAST64; + abort (); + } + } + if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdMAX; + if (name[3] == 'i') + return PRIiMAX; + if (name[3] == 'o') + return PRIoMAX; + if (name[3] == 'u') + return PRIuMAX; + if (name[3] == 'x') + return PRIxMAX; + if (name[3] == 'X') + return PRIXMAX; + abort (); + } + if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R' + && name[7] == '\0') + { + if (name[3] == 'd') + return PRIdPTR; + if (name[3] == 'i') + return PRIiPTR; + if (name[3] == 'o') + return PRIoPTR; + if (name[3] == 'u') + return PRIuPTR; + if (name[3] == 'x') + return PRIxPTR; + if (name[3] == 'X') + return PRIXPTR; + abort (); + } + } + } + /* Other system dependent strings are not valid. */ + return NULL; +} + /* Initialize the codeset dependent parts of an opened message catalog. Return the header entry. */ const char * @@ -216,19 +844,23 @@ we want to use transliteration. */ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ || _LIBICONV_VERSION >= 0x0105 - len = strlen (outcharset); - { - char *tmp = (char *) alloca (len + 10 + 1); - memcpy (tmp, outcharset, len); - memcpy (tmp + len, "//TRANSLIT", 10 + 1); - outcharset = tmp; - } -# endif - domain->conv = iconv_open (outcharset, charset); -# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \ - || _LIBICONV_VERSION >= 0x0105 - freea (outcharset); + if (strchr (outcharset, '/') == NULL) + { + char *tmp; + + len = strlen (outcharset); + tmp = (char *) alloca (len + 10 + 1); + memcpy (tmp, outcharset, len); + memcpy (tmp + len, "//TRANSLIT", 10 + 1); + outcharset = tmp; + + domain->conv = iconv_open (outcharset, charset); + + freea (outcharset); + } + else # endif + domain->conv = iconv_open (outcharset, charset); # endif # endif @@ -278,6 +910,7 @@ struct mo_file_header *data = (struct mo_file_header *) -1; int use_mmap = 0; struct loaded_domain *domain; + int revision; const char *nullentry; domain_file->decided = 1; @@ -385,22 +1018,257 @@ domain->use_mmap = use_mmap; domain->mmap_size = size; domain->must_swap = data->magic != _MAGIC; + domain->malloced = NULL; /* Fill in the information about the available tables. */ - switch (W (domain->must_swap, data->revision)) + revision = W (domain->must_swap, data->revision); + /* We support only the major revision 0. */ + switch (revision >> 16) { case 0: domain->nstrings = W (domain->must_swap, data->nstrings); - domain->orig_tab = (struct string_desc *) + domain->orig_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->orig_tab_offset)); - domain->trans_tab = (struct string_desc *) + domain->trans_tab = (const struct string_desc *) ((char *) data + W (domain->must_swap, data->trans_tab_offset)); domain->hash_size = W (domain->must_swap, data->hash_tab_size); - domain->hash_tab = (nls_uint32 *) - ((char *) data + W (domain->must_swap, data->hash_tab_offset)); + domain->hash_tab = + (domain->hash_size > 2 + ? (const nls_uint32 *) + ((char *) data + W (domain->must_swap, data->hash_tab_offset)) + : NULL); + domain->must_swap_hash_tab = domain->must_swap; + + /* Now dispatch on the minor revision. */ + switch (revision & 0xffff) + { + case 0: + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + break; + case 1: + default: + { + nls_uint32 n_sysdep_strings; + + if (domain->hash_tab == NULL) + /* This is invalid. These minor revisions need a hash table. */ + goto invalid; + + n_sysdep_strings = + W (domain->must_swap, data->n_sysdep_strings); + if (n_sysdep_strings > 0) + { + nls_uint32 n_sysdep_segments; + const struct sysdep_segment *sysdep_segments; + const char **sysdep_segment_values; + const nls_uint32 *orig_sysdep_tab; + const nls_uint32 *trans_sysdep_tab; + size_t memneed; + char *mem; + struct sysdep_string_desc *inmem_orig_sysdep_tab; + struct sysdep_string_desc *inmem_trans_sysdep_tab; + nls_uint32 *inmem_hash_tab; + unsigned int i; + + /* Get the values of the system dependent segments. */ + n_sysdep_segments = + W (domain->must_swap, data->n_sysdep_segments); + sysdep_segments = (const struct sysdep_segment *) + ((char *) data + + W (domain->must_swap, data->sysdep_segments_offset)); + sysdep_segment_values = + alloca (n_sysdep_segments * sizeof (const char *)); + for (i = 0; i < n_sysdep_segments; i++) + { + const char *name = + (char *) data + + W (domain->must_swap, sysdep_segments[i].offset); + nls_uint32 namelen = + W (domain->must_swap, sysdep_segments[i].length); + + if (!(namelen > 0 && name[namelen - 1] == '\0')) + { + freea (sysdep_segment_values); + goto invalid; + } + + sysdep_segment_values[i] = get_sysdep_segment_value (name); + } + + orig_sysdep_tab = (const nls_uint32 *) + ((char *) data + + W (domain->must_swap, data->orig_sysdep_tab_offset)); + trans_sysdep_tab = (const nls_uint32 *) + ((char *) data + + W (domain->must_swap, data->trans_sysdep_tab_offset)); + + /* Compute the amount of additional memory needed for the + system dependent strings and the augmented hash table. */ + memneed = 2 * n_sysdep_strings + * sizeof (struct sysdep_string_desc) + + domain->hash_size * sizeof (nls_uint32); + for (i = 0; i < 2 * n_sysdep_strings; i++) + { + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + i < n_sysdep_strings + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i - n_sysdep_strings])); + size_t need = 0; + const struct segment_pair *p = sysdep_string->segments; + + if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END) + for (p = sysdep_string->segments;; p++) + { + nls_uint32 sysdepref; + + need += W (domain->must_swap, p->segsize); + + sysdepref = W (domain->must_swap, p->sysdepref); + if (sysdepref == SEGMENTS_END) + break; + + if (sysdepref >= n_sysdep_segments) + { + /* Invalid. */ + freea (sysdep_segment_values); + goto invalid; + } + + need += strlen (sysdep_segment_values[sysdepref]); + } + + memneed += need; + } + + /* Allocate additional memory. */ + mem = (char *) malloc (memneed); + if (mem == NULL) + goto invalid; + + domain->malloced = mem; + inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); + inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem; + mem += n_sysdep_strings * sizeof (struct sysdep_string_desc); + inmem_hash_tab = (nls_uint32 *) mem; + mem += domain->hash_size * sizeof (nls_uint32); + + /* Compute the system dependent strings. */ + for (i = 0; i < 2 * n_sysdep_strings; i++) + { + const struct sysdep_string *sysdep_string = + (const struct sysdep_string *) + ((char *) data + + W (domain->must_swap, + i < n_sysdep_strings + ? orig_sysdep_tab[i] + : trans_sysdep_tab[i - n_sysdep_strings])); + const char *static_segments = + (char *) data + + W (domain->must_swap, sysdep_string->offset); + const struct segment_pair *p = sysdep_string->segments; + + /* Concatenate the segments, and fill + inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and + inmem_trans_sysdep_tab[i-n_sysdep_strings] (for + i >= n_sysdep_strings). */ + + if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END) + { + /* Only one static segment. */ + inmem_orig_sysdep_tab[i].length = + W (domain->must_swap, p->segsize); + inmem_orig_sysdep_tab[i].pointer = static_segments; + } + else + { + inmem_orig_sysdep_tab[i].pointer = mem; + + for (p = sysdep_string->segments;; p++) + { + nls_uint32 segsize = + W (domain->must_swap, p->segsize); + nls_uint32 sysdepref = + W (domain->must_swap, p->sysdepref); + size_t n; + + if (segsize > 0) + { + memcpy (mem, static_segments, segsize); + mem += segsize; + static_segments += segsize; + } + + if (sysdepref == SEGMENTS_END) + break; + + n = strlen (sysdep_segment_values[sysdepref]); + memcpy (mem, sysdep_segment_values[sysdepref], n); + mem += n; + } + + inmem_orig_sysdep_tab[i].length = + mem - inmem_orig_sysdep_tab[i].pointer; + } + } + + /* Compute the augmented hash table. */ + for (i = 0; i < domain->hash_size; i++) + inmem_hash_tab[i] = + W (domain->must_swap_hash_tab, domain->hash_tab[i]); + for (i = 0; i < n_sysdep_strings; i++) + { + const char *msgid = inmem_orig_sysdep_tab[i].pointer; + nls_uint32 hash_val = hash_string (msgid); + nls_uint32 idx = hash_val % domain->hash_size; + nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2)); + + for (;;) + { + if (inmem_hash_tab[idx] == 0) + { + /* Hash table entry is empty. Use it. */ + inmem_hash_tab[idx] = 1 + domain->nstrings + i; + break; + } + + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + } + } + + freea (sysdep_segment_values); + + domain->n_sysdep_strings = n_sysdep_strings; + domain->orig_sysdep_tab = inmem_orig_sysdep_tab; + domain->trans_sysdep_tab = inmem_trans_sysdep_tab; + + domain->hash_tab = inmem_hash_tab; + domain->must_swap_hash_tab = 0; + } + else + { + domain->n_sysdep_strings = 0; + domain->orig_sysdep_tab = NULL; + domain->trans_sysdep_tab = NULL; + } + } + break; + } break; default: /* This is an invalid revision. */ + invalid: + /* This is an invalid .mo file. */ + if (domain->malloced) + free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) munmap ((caddr_t) data, size); @@ -433,6 +1301,9 @@ _nl_free_domain_conv (domain); + if (domain->malloced) + free (domain->malloced); + # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) munmap ((caddr_t) domain->data, domain->mmap_size); diff -urN gawk-3.1.1/intl/localcharset.c gawk-3.1.2/intl/localcharset.c --- gawk-3.1.1/intl/localcharset.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/localcharset.c 2002-09-19 11:00:07.000000000 +0300 @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Written by Bruno Haible . */ +/* Written by Bruno Haible . */ #ifdef HAVE_CONFIG_H # include @@ -82,6 +82,11 @@ # define getc getc_unlocked #endif +#ifdef __cplusplus +/* When compiling with "gcc -x c++", produce a function with C linkage. */ +extern "C" const char * locale_charset (void); +#endif + /* The following static variable is declared 'volatile' to avoid a possible multithread problem in the function get_charset_aliases. If we are running in a threaded environment, and if two threads initialize @@ -201,7 +206,20 @@ # if defined WIN32 cp = "CP936" "\0" "GBK" "\0" - "CP1361" "\0" "JOHAB" "\0"; + "CP1361" "\0" "JOHAB" "\0" + "CP20127" "\0" "ASCII" "\0" + "CP20866" "\0" "KOI8-R" "\0" + "CP21866" "\0" "KOI8-RU" "\0" + "CP28591" "\0" "ISO-8859-1" "\0" + "CP28592" "\0" "ISO-8859-2" "\0" + "CP28593" "\0" "ISO-8859-3" "\0" + "CP28594" "\0" "ISO-8859-4" "\0" + "CP28595" "\0" "ISO-8859-5" "\0" + "CP28596" "\0" "ISO-8859-6" "\0" + "CP28597" "\0" "ISO-8859-7" "\0" + "CP28598" "\0" "ISO-8859-8" "\0" + "CP28599" "\0" "ISO-8859-9" "\0" + "CP28605" "\0" "ISO-8859-15" "\0"; # endif #endif @@ -267,7 +285,7 @@ static char buf[2 + 10 + 1]; - /* Win32 has a function returning the locale's codepage as a number. */ + /* Woe32 has a function returning the locale's codepage as a number. */ sprintf (buf, "CP%u", GetACP ()); codeset = buf; @@ -341,5 +359,11 @@ break; } + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; + return codeset; } diff -urN gawk-3.1.1/intl/localename.c gawk-3.1.2/intl/localename.c --- gawk-3.1.1/intl/localename.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/localename.c 2002-09-19 11:00:07.000000000 +0300 @@ -65,6 +65,9 @@ # ifndef LANG_CATALAN # define LANG_CATALAN 0x03 # endif +# ifndef LANG_DIVEHI +# define LANG_DIVEHI 0x65 +# endif # ifndef LANG_ESTONIAN # define LANG_ESTONIAN 0x25 # endif @@ -74,6 +77,9 @@ # ifndef LANG_FARSI # define LANG_FARSI 0x29 # endif +# ifndef LANG_GALICIAN +# define LANG_GALICIAN 0x56 +# endif # ifndef LANG_GEORGIAN # define LANG_GEORGIAN 0x37 # endif @@ -101,6 +107,9 @@ # ifndef LANG_KONKANI # define LANG_KONKANI 0x57 # endif +# ifndef LANG_KYRGYZ +# define LANG_KYRGYZ 0x40 +# endif # ifndef LANG_LATVIAN # define LANG_LATVIAN 0x26 # endif @@ -122,6 +131,9 @@ # ifndef LANG_MARATHI # define LANG_MARATHI 0x4e # endif +# ifndef LANG_MONGOLIAN +# define LANG_MONGOLIAN 0x50 +# endif # ifndef LANG_NEPALI # define LANG_NEPALI 0x61 # endif @@ -143,9 +155,15 @@ # ifndef LANG_SLOVAK # define LANG_SLOVAK 0x1b # endif +# ifndef LANG_SORBIAN +# define LANG_SORBIAN 0x2e +# endif # ifndef LANG_SWAHILI # define LANG_SWAHILI 0x41 # endif +# ifndef LANG_SYRIAC +# define LANG_SYRIAC 0x5a +# endif # ifndef LANG_TAMIL # define LANG_TAMIL 0x49 # endif @@ -428,10 +446,15 @@ /* Split into language and territory part. */ primary = PRIMARYLANGID (langid); sub = SUBLANGID (langid); + + /* Dispatch on language. + See also http://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see http://www.ethnologue.com/ . */ switch (primary) { case LANG_AFRIKAANS: return "af_ZA"; case LANG_ALBANIAN: return "sq_AL"; + case 0x5e: /* AMHARIC */ return "am_ET"; case LANG_ARABIC: switch (sub) { @@ -468,7 +491,10 @@ case LANG_BELARUSIAN: return "be_BY"; case LANG_BENGALI: return "bn_IN"; case LANG_BULGARIAN: return "bg_BG"; + case 0x55: /* BURMESE */ return "my_MM"; + case 0x53: /* CAMBODIAN */ return "km_KH"; case LANG_CATALAN: return "ca_ES"; + case 0x5c: /* CHEROKEE */ return "chr_US"; case LANG_CHINESE: switch (sub) { @@ -489,20 +515,22 @@ */ switch (sub) { - /* FIXME: How to distinguish Croatian and Latin Serbian locales? */ + case SUBLANG_DEFAULT: return "hr_HR"; case SUBLANG_SERBIAN_LATIN: return "sr_YU"; case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic"; - default: return "hr_HR"; } + return "hr"; case LANG_CZECH: return "cs_CZ"; case LANG_DANISH: return "da_DK"; + case LANG_DIVEHI: return "div_MV"; case LANG_DUTCH: switch (sub) { case SUBLANG_DUTCH: return "nl_NL"; - case SUBLANG_DUTCH_BELGIAN: return "nl_BE"; + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; } return "nl"; + case 0x66: /* EDO */ return "bin_NG"; case LANG_ENGLISH: switch (sub) { @@ -533,13 +561,23 @@ switch (sub) { case SUBLANG_FRENCH: return "fr_FR"; - case SUBLANG_FRENCH_BELGIAN: return "fr_BE"; + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; case SUBLANG_FRENCH_SWISS: return "fr_CH"; case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; case SUBLANG_FRENCH_MONACO: return "fr_MC"; } return "fr"; + case 0x62: /* FRISIAN */ return "fy_NL"; + case 0x67: /* FULFULDE */ return "ful_NG"; + case 0x3c: /* GAELIC */ + switch (sub) + { + case 0x01: /* SCOTTISH */ return "gd_GB"; + case 0x02: /* IRISH */ return "ga_IE"; + } + return "C"; + case LANG_GALICIAN: return "gl_ES"; case LANG_GEORGIAN: return "ka_GE"; case LANG_GERMAN: switch (sub) @@ -552,12 +590,21 @@ } return "de"; case LANG_GREEK: return "el_GR"; + case 0x74: /* GUARANI */ return "gn_PY"; case LANG_GUJARATI: return "gu_IN"; + case 0x68: /* HAUSA */ return "ha_NG"; + case 0x75: /* HAWAIIAN */ + /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) + or Hawaii Creole English ("cpe_US", 600000 speakers)? */ + return "cpe_US"; case LANG_HEBREW: return "he_IL"; case LANG_HINDI: return "hi_IN"; case LANG_HUNGARIAN: return "hu_HU"; + case 0x69: /* IBIBIO */ return "nic_NG"; case LANG_ICELANDIC: return "is_IS"; + case 0x70: /* IGBO */ return "ibo_NG"; case LANG_INDONESIAN: return "id_ID"; + case 0x5d: /* INUKTITUT */ return "iu_CA"; case LANG_ITALIAN: switch (sub) { @@ -567,6 +614,7 @@ return "it"; case LANG_JAPANESE: return "ja_JP"; case LANG_KANNADA: return "kn_IN"; + case 0x71: /* KANURI */ return "kau_NG"; case LANG_KASHMIRI: switch (sub) { @@ -579,6 +627,9 @@ /* FIXME: Adjust this when such locales appear on Unix. */ return "kok_IN"; case LANG_KOREAN: return "ko_KR"; + case LANG_KYRGYZ: return "ky_KG"; + case 0x54: /* LAO */ return "lo_LA"; + case 0x76: /* LATIN */ return "la_VA"; case LANG_LATVIAN: return "lv_LV"; case LANG_LITHUANIAN: return "lt_LT"; case LANG_MACEDONIAN: return "mk_MK"; @@ -590,10 +641,13 @@ } return "ms"; case LANG_MALAYALAM: return "ml_IN"; + case 0x3a: /* MALTESE */ return "mt_MT"; case LANG_MANIPURI: /* FIXME: Adjust this when such locales appear on Unix. */ return "mni_IN"; case LANG_MARATHI: return "mr_IN"; + case LANG_MONGOLIAN: + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ case LANG_NEPALI: switch (sub) { @@ -609,6 +663,10 @@ } return "no"; case LANG_ORIYA: return "or_IN"; + case 0x72: /* OROMO */ return "om_ET"; + case 0x79: /* PAPIAMENTU */ return "pap_AN"; + case 0x63: /* PASHTO */ + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ case LANG_POLISH: return "pl_PL"; case LANG_PORTUGUESE: switch (sub) @@ -620,13 +678,17 @@ } return "pt"; case LANG_PUNJABI: return "pa_IN"; + case 0x17: /* RHAETO-ROMANCE */ return "rm_CH"; case LANG_ROMANIAN: return "ro_RO"; case LANG_RUSSIAN: return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */ + case 0x3b: /* SAMI */ return "se_NO"; case LANG_SANSKRIT: return "sa_IN"; case LANG_SINDHI: return "sd"; + case 0x5b: /* SINHALESE */ return "si_LK"; case LANG_SLOVAK: return "sk_SK"; case LANG_SLOVENIAN: return "sl_SI"; + case 0x77: /* SOMALI */ return "so_SO"; case LANG_SORBIAN: /* FIXME: Adjust this when such locales appear on Unix. */ return "wen_DE"; @@ -656,7 +718,8 @@ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; } return "es"; - case LANG_SWAHILI: return "sw"; + case 0x30: /* SUTU */ return "bnt_TZ"; + case LANG_SWAHILI: return "sw_KE"; case LANG_SWEDISH: switch (sub) { @@ -664,12 +727,20 @@ case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; } return "sv"; + case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ + case 0x64: /* TAGALOG */ return "tl_PH"; + case 0x28: /* TAJIK */ return "tg_TJ"; + case 0x5f: /* TAMAZIGHT */ return "ber_MA"; case LANG_TAMIL: return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ - case LANG_TATAR: return "tt"; + case LANG_TATAR: return "tt_RU"; case LANG_TELUGU: return "te_IN"; case LANG_THAI: return "th_TH"; + case 0x51: /* TIBETAN */ return "bo_CN"; + case 0x73: /* TIGRINYA */ return "ti_ET"; + case 0x31: /* TSONGA */ return "ts_ZA"; case LANG_TURKISH: return "tr_TR"; + case 0x42: /* TURKMEN */ return "tk_TM"; case LANG_UKRAINIAN: return "uk_UA"; case LANG_URDU: switch (sub) @@ -686,7 +757,14 @@ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; } return "uz"; + case 0x33: /* VENDA */ return "ven_ZA"; case LANG_VIETNAMESE: return "vi_VN"; + case 0x52: /* WELSH */ return "cy_GB"; + case 0x34: /* XHOSA */ return "xh_ZA"; + case 0x78: /* YI */ return "sit_CN"; + case 0x3d: /* YIDDISH */ return "yi_IL"; + case 0x6a: /* YORUBA */ return "yo_NG"; + case 0x35: /* ZULU */ return "zu_ZA"; default: return "C"; } diff -urN gawk-3.1.1/intl/ngettext.c gawk-3.1.2/intl/ngettext.c --- gawk-3.1.1/intl/ngettext.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/ngettext.c 2002-09-19 11:00:07.000000000 +0300 @@ -46,8 +46,8 @@ # define NGETTEXT __ngettext # define DCNGETTEXT INTUSE(__dcngettext) #else -# define NGETTEXT ngettext__ -# define DCNGETTEXT dcngettext__ +# define NGETTEXT libintl_ngettext +# define DCNGETTEXT libintl_dcngettext #endif /* Look up MSGID in the current default message catalog for the current diff -urN gawk-3.1.1/intl/os2compat.c gawk-3.1.2/intl/os2compat.c --- gawk-3.1.1/intl/os2compat.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/os2compat.c 2002-09-19 11:00:07.000000000 +0300 @@ -39,7 +39,7 @@ } /* A fixed size buffer. */ -char _nl_default_dirname__[MAXPATHLEN+1]; +char libintl_nl_default_dirname[MAXPATHLEN+1]; char *_nlos2_libdir = NULL; char *_nlos2_localealiaspath = NULL; @@ -94,5 +94,5 @@ } if (strlen (_nlos2_localedir) <= MAXPATHLEN) - strcpy (_nl_default_dirname__, _nlos2_localedir); + strcpy (libintl_nl_default_dirname, _nlos2_localedir); } diff -urN gawk-3.1.1/intl/plural-exp.h gawk-3.1.2/intl/plural-exp.h --- gawk-3.1.1/intl/plural-exp.h 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/plural-exp.h 2002-09-19 11:00:07.000000000 +0300 @@ -98,10 +98,10 @@ # define GERMANIC_PLURAL __gettext_germanic_plural # define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural #elif defined (IN_LIBINTL) -# define FREE_EXPRESSION gettext_free_exp__ -# define PLURAL_PARSE gettextparse__ -# define GERMANIC_PLURAL gettext_germanic_plural__ -# define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__ +# define FREE_EXPRESSION libintl_gettext_free_exp +# define PLURAL_PARSE libintl_gettextparse +# define GERMANIC_PLURAL libintl_gettext_germanic_plural +# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural #else # define FREE_EXPRESSION free_plural_expression # define PLURAL_PARSE parse_plural_expression diff -urN gawk-3.1.1/intl/textdomain.c gawk-3.1.2/intl/textdomain.c --- gawk-3.1.1/intl/textdomain.c 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/intl/textdomain.c 2002-09-19 11:00:07.000000000 +0300 @@ -44,8 +44,8 @@ names than the internal variables in GNU libc, otherwise programs using libintl.a cannot be linked statically. */ #if !defined _LIBC -# define _nl_default_default_domain _nl_default_default_domain__ -# define _nl_current_default_domain _nl_current_default_domain__ +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain #endif /* @@ end of prolog @@ */ @@ -67,7 +67,7 @@ # define strdup(str) __strdup (str) # endif #else -# define TEXTDOMAIN textdomain__ +# define TEXTDOMAIN libintl_textdomain #endif /* Lock variable to protect the global data in the gettext implementation. */ diff -urN gawk-3.1.1/io.c gawk-3.1.2/io.c --- gawk-3.1.1/io.c 2002-04-16 14:57:44.000000000 +0300 +++ gawk-3.1.2/io.c 2003-02-25 12:32:30.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1976, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -30,10 +30,6 @@ #include #endif /* HAVE_SYS_PARAM_H */ -#ifdef HAVE_SYS_WAIT_H -#include -#endif /* HAVE_SYS_WAIT_H */ - #ifndef O_RDONLY #include #endif @@ -41,6 +37,13 @@ #define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) #endif +#ifdef HAVE_TERMIOS_H +#include +#endif +#ifdef HAVE_STROPTS_H +#include +#endif + #ifdef HAVE_SOCKETS #ifdef HAVE_SYS_SOCKET_H #include @@ -88,6 +91,12 @@ #include #endif +#if defined(GAWK_AIX) +#undef TANDEM /* AIX defines this in one of its header files */ +#undef MSDOS /* For good measure, */ +#undef WIN32 /* yes, I'm paranoid */ +#endif + #if defined(MSDOS) || defined(WIN32) || defined(TANDEM) #define PIPES_SIMULATED #endif @@ -103,18 +112,24 @@ #ifndef PIPES_SIMULATED static int wait_any P((int interesting)); #endif -static IOBUF *gawk_popen P((char *cmd, struct redirect *rp)); +static IOBUF *gawk_popen P((const char *cmd, struct redirect *rp)); static IOBUF *iop_open P((const char *file, const char *how, IOBUF *buf)); static IOBUF *iop_alloc P((int fd, const char *name, IOBUF *buf)); static int gawk_pclose P((struct redirect *rp)); static int do_pathopen P((const char *file)); -static int get_a_record P((char **out, IOBUF *iop, int rs, Regexp *RSre, int *errcode)); static int str2mode P((const char *mode)); static void spec_setup P((IOBUF *iop, int len, int allocate)); static int specfdopen P((IOBUF *iop, const char *name, const char *mode)); static int pidopen P((IOBUF *iop, const char *name, const char *mode)); static int useropen P((IOBUF *iop, const char *name, const char *mode)); -static int two_way_open P((char *str, struct redirect *rp)); +static int two_way_open P((const char *str, struct redirect *rp)); +static int pty_vs_pipe P((const char *command)); + +static int rs1_get_a_record P((char **out, IOBUF *iop, int rs, Regexp *RSre, int *errcode)); +static int rsnull_get_a_record P((char **out, IOBUF *iop, int rs, Regexp *RSre, int *errcode)); +static int rsre_get_a_record P((char **out, IOBUF *iop, int rs, Regexp *RSre, int *errcode)); + +static int (*get_a_record)P((char **out, IOBUF *iop, int rs, Regexp *RSre, int *errcode)) = rs1_get_a_record; #if defined(HAVE_POPEN_H) #include "popen.h" @@ -122,6 +137,8 @@ static struct redirect *red_head = NULL; static NODE *RS; +static Regexp *RS_re_yes_case; +static Regexp *RS_re_no_case; static Regexp *RS_regexp; int RS_is_null; @@ -135,9 +152,9 @@ static jmp_buf filebuf; /* for do_nextfile() */ -#if defined(MSDOS) || defined(OS2) || defined(__EMX__) +#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__EMX__) static const char * -binmode(char *mode) +binmode(const char *mode) { switch (mode[0]) { case 'r': @@ -193,7 +210,7 @@ return NULL; } if (curfile != NULL) { - if (curfile->cnt == EOF) { + if ((curfile->flag & IOP_AT_EOF) != 0 && curfile->off >= curfile->dataend) { (void) iop_close(curfile); curfile = NULL; } else @@ -208,7 +225,7 @@ unref(ARGIND_node->var_value); ARGIND_node->var_value = make_number((AWKNUM) i); } - if (! arg_assign(arg->stptr)) { + if (! arg_assign(arg->stptr, FALSE)) { files++; fname = arg->stptr; curfile = iop_open(fname, binmode("r"), &mybuf); @@ -268,15 +285,20 @@ register int cnt; int retval = 0; - if ((cnt = iop->cnt) != EOF) + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) + cnt = EOF; + else if ((iop->flag & IOP_CLOSED) != 0) + cnt = EOF; + else cnt = get_a_record(&begin, iop, RS->stptr[0], RS_regexp, NULL); + if (cnt == EOF) { cnt = 0; retval = 1; } else { NR += 1; FNR += 1; - set_record(begin, cnt, TRUE); + set_record(begin, cnt); } return retval; @@ -293,6 +315,9 @@ return 0; errno = 0; + iop->flag &= ~IOP_AT_EOF; + iop->flag |= IOP_CLOSED; /* there may be dangling pointers */ + iop->dataend = NULL; #ifdef _CRAY /* Work around bug in UNICOS popen */ if (iop->fd < 3) @@ -303,8 +328,7 @@ if ((iop->flag & IOP_IS_INTERNAL) != 0) { iop->off = iop->buf; iop->end = iop->buf + strlen(iop->buf); - iop->cnt = 0; - iop->secsiz = 0; + iop->count = 0; return 0; } @@ -327,16 +351,25 @@ */ if (iop->buf) { if ((fields_arr[0]->stptr >= iop->buf) - && (fields_arr[0]->stptr < (iop->buf + iop->secsiz + iop->size))) { + && (fields_arr[0]->stptr < (iop->buf + iop->size))) { NODE *t; t = make_string(fields_arr[0]->stptr, fields_arr[0]->stlen); unref(fields_arr[0]); fields_arr[0] = t; - reset_record(); + /* + * 1/27/2003: This used to be here: + * + * reset_record(); + * + * Don't do that; reset_record() throws away all fields, + * saves FS etc. We just need to make sure memory isn't + * corrupted and that references to $0 and fields work. + */ } free(iop->buf); + iop->buf = NULL; } if ((iop->flag & IOP_NOFREE_OBJ) == 0) free((char *) iop); @@ -351,13 +384,29 @@ { IOBUF *iop; extern int exiting; + int rval1, rval2, rval3; (void) setjmp(filebuf); /* for `nextfile' */ while ((iop = nextfile(FALSE)) != NULL) { + /* + * This was: if (inrec(iop) == 0) while (interpret(expression_value) && inrec(iop) == 0) continue; + * Now expand it out for ease of debugging. + */ + rval1 = inrec(iop); + if (rval1 == 0) { + for (;;) { + rval2 = rval3 = -1; /* for debugging */ + rval2 = interpret(expression_value); + if (rval2 != 0) + rval3 = inrec(iop); + if (rval2 == 0 || rval3 != 0) + break; + } + } if (exiting) break; } @@ -365,10 +414,10 @@ /* redflags2str --- turn redirection flags into a string, for debugging */ -char * +const char * redflags2str(int flags) { - static struct flagtab redtab[] = { + static const struct flagtab redtab[] = { { RED_FILE, "RED_FILE" }, { RED_PIPE, "RED_PIPE" }, { RED_READ, "RED_READ" }, @@ -377,6 +426,7 @@ { RED_NOBUF, "RED_NOBUF" }, { RED_EOF, "RED_EOF" }, { RED_TWOWAY, "RED_TWOWAY" }, + { RED_PTY, "RED_PTY" }, { RED_SOCKET, "RED_SOCKET" }, { RED_TCP, "RED_TCP" }, { 0, NULL } @@ -434,7 +484,7 @@ break; } tmp = tree_eval(tree->subnode); - if (do_lint && (tmp->flags & STR) == 0) + if (do_lint && (tmp->flags & STRCUR) == 0) lintwarn(_("expression in `%s' redirection only has numeric value"), what); tmp = force_string(tmp); @@ -459,12 +509,12 @@ for (rp = red_head; rp != NULL; rp = rp->next) { if (strlen(rp->value) == tmp->stlen && STREQN(rp->value, str, tmp->stlen) - && ((rp->flag & ~(RED_NOBUF|RED_EOF)) == tflag + && ((rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)) == tflag || (outflag != 0 && (rp->flag & (RED_FILE|RED_WRITE)) == outflag))) { - int rpflag = (rp->flag & ~(RED_NOBUF|RED_EOF)); - int newflag = (tflag & ~(RED_NOBUF|RED_EOF)); + int rpflag = (rp->flag & ~(RED_NOBUF|RED_EOF|RED_PTY)); + int newflag = (tflag & ~(RED_NOBUF|RED_EOF|RED_PTY)); if (do_lint && rpflag != newflag) lintwarn( @@ -538,7 +588,7 @@ break; case Node_redirect_twoway: direction = "to/from"; - if (!two_way_open(str, rp)) { + if (! two_way_open(str, rp)) { #ifdef HAVE_SOCKETS /* multiple messages make life easier for translators */ if (STREQN(str, "/inet/", 6)) @@ -572,8 +622,8 @@ rp->fp = fdopen(fd, binmode("a")); else #endif - rp->fp = fdopen(fd, (char *) mode); - rp->mode = (char *) mode; + rp->fp = fdopen(fd, (const char *) mode); + rp->mode = (const char *) mode; /* don't leak file descriptors */ if (rp->fp == NULL) close(fd); @@ -641,7 +691,7 @@ /* getredirect --- find the struct redirect for this file or pipe */ struct redirect * -getredirect(char *str, int len) +getredirect(const char *str, int len) { struct redirect *rp; @@ -762,6 +812,11 @@ if ((rp->flag & RED_TCP) != 0) (void) shutdown(fileno(rp->fp), SHUT_WR); #endif /* HAVE_SOCKETS */ + + if ((rp->flag & RED_PTY) != 0) { + fwrite("\004\n", sizeof("\004\n") - 1, 1, rp->fp); + fflush(rp->fp); + } status = fclose(rp->fp); rp->fp = NULL; } @@ -974,8 +1029,8 @@ #ifdef HAVE_SOCKETS /* socketopen --- open a socket and set it into connected state */ -int -socketopen(enum inet_prot type, int localport, int remoteport, char *remotehostname) +static int +socketopen(enum inet_prot type, int localport, int remoteport, const char *remotehostname) { struct hostent *hp = gethostbyname(remotehostname); struct sockaddr_in local_addr, remote_addr; @@ -1278,8 +1333,7 @@ iop->buf[len] = '\0'; /* just in case */ } iop->off = iop->buf; - iop->cnt = 0; - iop->secsiz = 0; + iop->count = 0; iop->size = len; iop->end = iop->buf + len; iop->fd = -1; @@ -1318,7 +1372,7 @@ /* pidopen --- "open" /dev/pid, /dev/ppid, and /dev/pgrpid */ static int -pidopen(IOBUF *iop, const char *name, const char *mode) +pidopen(IOBUF *iop, const char *name, const char *mode ATTRIBUTE_UNUSED) { char tbuf[BUFSIZ]; int i; @@ -1351,7 +1405,7 @@ */ static int -useropen(IOBUF *iop, const char *name, const char *mode) +useropen(IOBUF *iop, const char *name ATTRIBUTE_UNUSED, const char *mode ATTRIBUTE_UNUSED) { char tbuf[BUFSIZ], *cp; int i; @@ -1446,8 +1500,10 @@ /* two_way_open --- open a two way communications channel */ static int -two_way_open(char *str, struct redirect *rp) +two_way_open(const char *str, struct redirect *rp) { + static int no_ptys = FALSE; + #ifdef HAVE_SOCKETS /* case 1: socket */ if (STREQN(str, "/inet/", 6)) { @@ -1506,8 +1562,210 @@ } #endif /* HAVE_PORTALS */ +#ifdef HAVE_TERMIOS_H + /* case 2: use ptys for two-way communications to child */ + if (! no_ptys && pty_vs_pipe(str)) { + static int initialized = FALSE; + static char first_pty_letter; +#ifdef HAVE_GRANTPT + static int have_dev_ptmx; +#endif + char slavenam[32]; + char c; + int master, dup_master; + int slave; + int save_errno; + pid_t pid; + struct stat statb; + struct termios st; + + if (! initialized) { + initialized = TRUE; +#ifdef HAVE_GRANTPT + have_dev_ptmx = (stat("/dev/ptmx", &statb) >= 0); +#endif + c = 'p'; + do { + sprintf(slavenam, "/dev/pty%c0", c); + if (stat(slavenam, &statb) >= 0) { + first_pty_letter = c; + break; + } + if (++c > 'z') + c = 'a'; + } while (c != 'p'); + } + +#ifdef HAVE_GRANTPT + if (have_dev_ptmx) { + master = open("/dev/ptmx", O_RDWR); + if (master >= 0) { + char *tem; + + grantpt(master); + unlockpt(master); + tem = ptsname(master); + if (tem != NULL) { + strcpy(slavenam, tem); + goto got_the_pty; + } + (void) close(master); + } + } +#endif + + if (first_pty_letter) { + /* + * Assume /dev/ptyXNN and /dev/ttyXN naming system. + * The FIRST_PTY_LETTER gives the first X to try. We try in the + * sequence FIRST_PTY_LETTER, .., 'z', 'a', .., FIRST_PTY_LETTER. + * Is this worthwhile, or just over-zealous? + */ + c = first_pty_letter; + do { + int i; + for (i = 0; i < 16; i++) { + sprintf(slavenam, "/dev/pty%c%x", c, i); + if (stat(slavenam, &statb) < 0) { + no_ptys = TRUE; /* bypass all this next time */ + goto use_pipes; + } + + if ((master = open(slavenam, O_RDWR)) >= 0) { + slavenam[sizeof("/dev/") - 1] = 't'; + if (access(slavenam, R_OK | W_OK) == 0) + goto got_the_pty; + close(master); + } + } + if (++c > 'z') + c = 'a'; + } while (c != first_pty_letter); + } else + no_ptys = TRUE; + + /* Couldn't find a pty. Fall back to using pipes. */ + goto use_pipes; + + got_the_pty: + if ((slave = open(slavenam, O_RDWR)) < 0) { + fatal(_("could not open `%s', mode `%s'"), + slavenam, "r+"); + } + +#ifdef I_PUSH + /* + * Push the necessary modules onto the slave to + * get terminal semantics. + */ + ioctl(slave, I_PUSH, "ptem"); + ioctl(slave, I_PUSH, "ldterm"); +#endif + +#ifdef TIOCSCTTY + ioctl(slave, TIOCSCTTY, 0); +#endif + tcgetattr(slave, &st); + st.c_iflag &= ~(ISTRIP | IGNCR | INLCR | IXOFF); + st.c_iflag |= (ICRNL | IGNPAR | BRKINT | IXON); + st.c_oflag &= ~OPOST; + st.c_cflag &= ~CSIZE; + st.c_cflag |= CREAD | CS8 | CLOCAL; + st.c_lflag &= ~(ECHO | ECHOE | ECHOK | NOFLSH | TOSTOP); + st.c_lflag |= ISIG; +#if 0 + st.c_cc[VMIN] = 1; + st.c_cc[VTIME] = 0; +#endif + + /* Set some control codes to default values */ +#ifdef VINTR + st.c_cc[VINTR] = '\003'; /* ^c */ +#endif +#ifdef VQUIT + st.c_cc[VQUIT] = '\034'; /* ^| */ +#endif +#ifdef VERASE + st.c_cc[VERASE] = '\177'; /* ^? */ +#endif +#ifdef VKILL + st.c_cc[VKILL] = '\025'; /* ^u */ +#endif +#ifdef VEOF + st.c_cc[VEOF] = '\004'; /* ^d */ +#endif + tcsetattr(slave, TCSANOW, &st); + + switch (pid = fork ()) { + case 0: + /* Child process */ + if (close(master) == -1) + fatal(_("close of master pty failed (%s)"), strerror(errno)); + if (close(1) == -1) + fatal(_("close of stdout in child failed (%s)"), + strerror(errno)); + if (dup(slave) != 1) + fatal(_("moving slave pty to stdout in child failed (dup: %s)"), strerror(errno)); + if (close(0) == -1) + fatal(_("close of stdin in child failed (%s)"), + strerror(errno)); + if (dup(slave) != 0) + fatal(_("moving slave pty to stdin in child failed (dup: %s)"), strerror(errno)); + if (close(slave)) + fatal(_("close of slave pty failed (%s)"), strerror(errno)); + + /* stderr does NOT get dup'ed onto child's stdout */ + + signal(SIGPIPE, SIG_DFL); + + execl("/bin/sh", "sh", "-c", str, NULL); + _exit(127); + + case -1: + save_errno = errno; + close(master); + errno = save_errno; + return FALSE; + + } + + /* parent */ + if (close(slave)) + fatal(_("close of slave pty failed (%s)"), strerror(errno)); + + rp->pid = pid; + rp->iop = iop_alloc(master, str, NULL); + if (rp->iop == NULL) { + (void) close(master); + (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ + return FALSE; + } + + /* + * Force read and write ends of two-way connection to + * be different fd's so they can be closed independently. + */ + if ((dup_master = dup(master)) < 0 + || (rp->fp = fdopen(dup_master, "w")) == NULL) { + iop_close(rp->iop); + rp->iop = NULL; + (void) close(master); + (void) kill(pid, SIGKILL); /* overkill? (pardon pun) */ + if (dup_master > 0) + (void) close(dup_master); + return FALSE; + } + rp->flag |= RED_PTY; + os_close_on_exec(master, str, "pipe", "from"); + os_close_on_exec(dup_master, str, "pipe", "to"); + first_pty_letter = '\0'; /* reset for next command */ + return TRUE; + } +#endif /* HAVE_TERMIOS_H */ + +use_pipes: #ifndef PIPES_SIMULATED /* real pipes */ - /* case 2: two way pipe to a child process */ + /* case 3: two way pipe to a child process */ { int ptoc[2], ctop[2]; int pid; @@ -1610,7 +1868,7 @@ fatal(_("close of pipe failed (%s)"), strerror(errno)); /* stderr does NOT get dup'ed onto child's stdout */ execl("/bin/sh", "sh", "-c", str, NULL); - _exit(127); + _exit(errno == ENOENT ? 127 : 126); } #endif /* NOT __EMX__ */ @@ -1666,7 +1924,7 @@ static int wait_any(int interesting) /* pid of interest, if any */ { - RETSIGTYPE (*hstat)(), (*istat)(), (*qstat)(); + RETSIGTYPE (*hstat) P((int)), (*istat) P((int)), (*qstat) P((int)); int pid; int status = 0; struct redirect *redp; @@ -1703,7 +1961,7 @@ /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * -gawk_popen(char *cmd, struct redirect *rp) +gawk_popen(const char *cmd, struct redirect *rp) { int p[2]; register int pid; @@ -1755,7 +2013,7 @@ if (close(p[0]) == -1 || close(p[1]) == -1) fatal(_("close of pipe failed (%s)"), strerror(errno)); execl("/bin/sh", "sh", "-c", cmd, NULL); - _exit(127); + _exit(errno == ENOENT ? 127 : 126); } #endif /* NOT __EMX__ */ @@ -1785,10 +2043,10 @@ /* process previously found, return stored status */ if (rp->pid == -1) - return (rp->status >> 8) + ((rp->status &0xFF) ? 128 + (rp->status & 0xF) : 0); + return rp->status; rp->status = wait_any(rp->pid); rp->pid = -1; - return (rp->status >> 8) + ((rp->status &0xFF) ? 128 + (rp->status & 0xF) : 0); + return rp->status; } #else /* PIPES_SIMULATED */ @@ -1803,7 +2061,7 @@ /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * -gawk_popen(char *cmd, struct redirect *rp) +gawk_popen(const char *cmd, struct redirect *rp) { FILE *current; @@ -1849,7 +2107,7 @@ /* gawk_popen --- open an IOBUF on a child process */ static IOBUF * -gawk_popen(char *cmd, struct redirect *rp) +gawk_popen(const char *cmd, struct redirect *rp) { extern char *strdup P((const char *)); int current; @@ -1956,7 +2214,7 @@ FNR++; } if (tree->lnode == NULL) /* no optional var. */ - set_record(s, cnt, TRUE); + set_record(s, cnt); else { /* assignment to variable */ Func_ptr after_assign = NULL; NODE **lhs; @@ -2078,7 +2336,7 @@ int bufsize = 8192; void -fatal(char *s) +fatal(const char *s) { printf("%s\n", s); exit(1); @@ -2090,25 +2348,30 @@ static IOBUF * iop_alloc(int fd, const char *name, IOBUF *iop) { - struct stat sbuf; + struct stat sbuf; - if (fd == INVALID_HANDLE) - return NULL; - if (iop == NULL) - emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); + if (fd == INVALID_HANDLE) + return NULL; + if (iop == NULL) + emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc"); + memset(iop, '\0', sizeof(IOBUF)); + iop->flag = 0; + if (isatty(fd)) + iop->flag |= IOP_IS_TTY; + iop->readsize = iop->size = optimal_bufsize(fd, & sbuf); + iop->sbuf = sbuf; + if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) + lintwarn(_("data file `%s' is empty"), name); + errno = 0; + iop->fd = fd; + iop->count = iop->total = iop->scanoff = 0; + iop->name = name; + emalloc(iop->buf, char *, iop->size += 2, "iop_alloc"); + iop->off = iop->buf; + iop->dataend = NULL; + iop->end = iop->buf + iop->size; iop->flag = 0; - if (isatty(fd)) - iop->flag |= IOP_IS_TTY; - iop->size = optimal_bufsize(fd, & sbuf); - if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0) - lintwarn(_("data file `%s' is empty"), name); - iop->secsiz = -2; - errno = 0; - iop->fd = fd; - iop->off = iop->buf = NULL; - iop->cnt = 0; - iop->name = name; - return iop; + return iop; } #define set_RT_to_null() \ @@ -2119,379 +2382,857 @@ (void)(! do_traditional && (unref(RT_node->var_value), \ RT_node->var_value = make_string(str, len))) -/* - * get_a_record: - * Get the next record. Uses a "split buffer" where the latter part is - * the normal read buffer and the head part is an "overflow" area that is used - * when a record spans the end of the normal buffer, in which case the first - * part of the record is copied into the overflow area just before the - * normal buffer. Thus, the eventual full record can be returned as a - * contiguous area of memory with a minimum of copying. The overflow area - * is expanded as needed, so that records are unlimited in length. - * We also mark both the end of the buffer and the end of the read() with - * a sentinel character (the current record separator) so that the inside - * loop can run as a single test. - * - * Note that since we know or can compute the end of the read and the end - * of the buffer, the sentinel character does not get in the way of regexp - * based searching, since we simply search up to that character, but not - * including it. - */ - -static int -get_a_record(char **out, /* pointer to pointer to data */ - IOBUF *iop, /* input IOP */ - register int grRS, /* first char in RS->stptr */ - Regexp *RSre, /* regexp for RS */ - int *errcode) /* pointer to error variable */ -{ - register char *bp = iop->off; - char *bufend; - char *start = iop->off; /* beginning of record */ - int rs; - static Regexp *RS_null_re = NULL; - Regexp *rsre = NULL; - int continuing = FALSE, continued = FALSE; /* used for re matching */ - int onecase; -#ifdef MBS_SUPPORT - size_t mbclen = 0; - mbstate_t mbs; -#endif +/* grow must increase size of buffer, set end, make sure off and dataend point at */ +/* right spot. */ +/* */ +/* */ +/* = */ +/* grow_iop_buffer --- grow the buffer */ -#ifdef TANDEM - char *mend; -#endif +static void +grow_iop_buffer(IOBUF *iop) +{ + size_t valid = iop->dataend - iop->off; + size_t off = iop->off - iop->buf; + size_t newsize; -#ifdef TANDEM -#define not_past_end() (bp < mend) -#else -#define not_past_end() (1) -#endif + /* + * Lop off original extra two bytes, double the size, + * add them back. + */ + newsize = ((iop->size - 2) * 2) + 2; - /* first time through */ - if (RS_null_re == NULL) { - RS_null_re = make_regexp("\n\n+", 3, TRUE, TRUE); - if (RS_null_re == NULL) - fatal(_("internal error: file `%s', line %d\n"), - __FILE__, __LINE__); - } + /* Check for overflow */ + if (newsize <= iop->size) + fatal(_("could not allocate more input memory")); - if (iop->cnt == EOF) { /* previous read hit EOF */ - *out = NULL; - set_RT_to_null(); - return EOF; - } + /* Make sure there's room for a disk block */ + if (newsize - valid < iop->readsize) + newsize += iop->readsize + 2; -#ifdef TANDEM - if (MRL) - mend = start + MRL; - else - mend = (char *) LONG_MAX; -#endif + /* Check for overflow, again */ + if (newsize <= iop->size) + fatal(_("could not allocate more input memory")); - if (RS_is_null) /* special case: RS == "" */ - rs = '\n'; - else - rs = (char) grRS; + iop->size = newsize; + erealloc(iop->buf, char *, iop->size, "grow_iop_buffer"); + iop->off = iop->buf + off; + iop->dataend = iop->off + valid; + iop->end = iop->buf + iop->size; +} - onecase = (IGNORECASE && ISALPHA(rs)); - if (onecase) - rs = casetable[(unsigned char) rs]; - - /* set up sentinel */ - if (iop->buf) { - bufend = iop->buf + iop->size + iop->secsiz; - *bufend = rs; /* add sentinel to buffer */ - } else - bufend = NULL; +/* = */ +static int +rs1_get_a_record(char **out, /* pointer to pointer to data */ + IOBUF *iop, /* input IOP */ + register int grRS, /* first char in RS->stptr */ + Regexp *RSre ATTRIBUTE_UNUSED, /* regexp for RS */ + int *errcode) /* pointer to error variable */ +{ + /* We need a pointer into the buffer. */ + /* */ + /* = */ + register char *bp; + long retval; +#ifdef MBS_SUPPORT + size_t mbclen = 0; + mbstate_t mbs; +#endif - for (;;) { /* break on end of record, read error or EOF */ -/* buffer mgmt, chunk #1 */ - /* - * Following code is entered on the first call of this routine - * for a new iop, or when we scan to the end of the buffer. - * In the latter case, we copy the current partial record to - * the space preceding the normal read buffer. If necessary, - * we expand this space. This is done so that we can return - * the record as a contiguous area of memory. - */ - if ((iop->flag & IOP_IS_INTERNAL) == 0 && bp >= bufend) { - char *oldbuf = NULL; - char *oldsplit = iop->buf + iop->secsiz; - long len; /* record length so far */ - - len = bp - start; - if (len > iop->secsiz) { - /* expand secondary buffer */ - if (iop->secsiz == -2) - iop->secsiz = 256; - while (len > iop->secsiz) - iop->secsiz *= 2; - oldbuf = iop->buf; - emalloc(iop->buf, char *, - iop->size+iop->secsiz+2, "get_a_record"); - bufend = iop->buf + iop->size + iop->secsiz; - *bufend = rs; - } - if (len > 0) { - char *newsplit = iop->buf + iop->secsiz; - if (start < oldsplit) { - memcpy(newsplit - len, start, - oldsplit - start); - memcpy(newsplit - (bp - oldsplit), - oldsplit, bp - oldsplit); - } else - memcpy(newsplit - len, start, len); - } - bp = iop->end = iop->off = iop->buf + iop->secsiz; - start = bp - len; -#ifdef TANDEM - if (MRL) - mend = start + MRL; -#endif - if (oldbuf != NULL) { - free(oldbuf); - oldbuf = NULL; - } - } -/* buffer mgmt, chunk #2 */ - /* - * Following code is entered whenever we have no more data to - * scan. In most cases this will read into the beginning of - * the main buffer, but in some cases (terminal, pipe etc.) - * we may be doing smallish reads into more advanced positions. - */ - if (bp >= iop->end) { - if ((iop->flag & IOP_IS_INTERNAL) != 0) { - iop->cnt = EOF; - break; - } - iop->cnt = read(iop->fd, iop->end, bufend - iop->end); - if (iop->cnt == -1) { - if (! do_traditional && errcode != NULL) { - *errcode = errno; - iop->cnt = EOF; - break; - } else - fatal(_("error reading input file `%s': %s"), - iop->name, strerror(errno)); - } else if (iop->cnt == 0) { - /* - * hit EOF before matching RS, so end - * the record and set RT to "" - */ - iop->cnt = EOF; - /* see comments below about this test */ - if (! continuing) { - set_RT_to_null(); - break; - } - } - if (iop->cnt != EOF) { - iop->end += iop->cnt; - *iop->end = rs; /* reset the sentinel */ - } - } -/* buffers are now setup and filled with data */ -/* search for RS, #1, regexp based, or RS = "" */ - /* - * Attempt to simplify the code a bit. The case where - * RS = "" can also be described by a regexp, RS = "\n\n+". - * The buffer managment and searching code can thus now - * use a common case (the one for regexps) both when RS is - * a regexp, and when RS = "". This particularly benefits - * us for keeping track of how many newlines were matched - * in order to set RT. - */ - if (! do_traditional && RSre != NULL) /* regexp */ - rsre = RSre; - else if (RS_is_null) /* RS = "" */ - rsre = RS_null_re; - else - rsre = NULL; + /* The main code first checks if there was an EOF last */ + /* time around, and then sets up the pointers. */ + /* */ + /* */ + /* = */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + /* First time around, set it to point to start of current record. */ + /* */ + /* */ + /* = */ + bp = iop->off; + + /* Most of the work is a for loop that expands the buffer, */ + /* and fills it, until the rs character is found. */ + /* */ + /* */ + /* = */ + for (;;) { + /* = */ + if (/* If there's data in the buffer, and we're pointing at the end of it, */ + /* grow the buffer. */ + /* */ + /* */ + /* = */ + (iop->flag & IOP_AT_EOF) == 0 && + iop->dataend != NULL && bp >= iop->dataend) { + if (iop->off > iop->buf) { + /* Moving the data requires remembering how far off the */ + /* dataend pointer was and the bp pointer too. */ + /* */ + /* = */ + size_t dataend_off = iop->dataend - iop->off; + memmove(iop->buf, iop->off, dataend_off); + iop->off = iop->buf; + bp = iop->dataend = iop->buf + dataend_off; + + /* = */ + bp = iop->dataend; + } else { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + } + } + + /* no data in buffer or ran out of data */ + if ((iop->flag & IOP_AT_EOF) == 0 && (iop->dataend == NULL || bp >= iop->dataend)) { + iop->scanoff = bp - iop->off; + if (iop->dataend == NULL) { + iop->dataend = iop->buf; /* first read */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) + iop->dataend += strlen(iop->buf); + } + /* Use read to put more data into the buffer. If we've read */ + /* as many characters as in the file, don't try to read more. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + } else if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + else { +#define min(x, y) (x < y ? x : y) + /* subtract one in read count to leave room for sentinel */ + size_t room_left = iop->end - iop->dataend - 1; + size_t amt_to_read = min(iop->readsize, room_left); + + if (amt_to_read < iop->readsize) { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + /* recalculate amt_to_read */ + room_left = iop->end - iop->dataend - 1; + amt_to_read = min(iop->readsize, room_left); + } + while (amt_to_read + iop->readsize < room_left) + amt_to_read += iop->readsize; + + iop->count = read(iop->fd, iop->dataend, amt_to_read); + if (iop->count == -1) { + if (! do_traditional && errcode != NULL) { + *errcode = errno; + iop->flag |= IOP_AT_EOF; + break; + } else + fatal(_("error reading input file `%s': %s"), + iop->name, strerror(errno)); + } else if (iop->count == 0) { + /* + * hit EOF before matching RS, so end + * the record and set RT to "" + */ + iop->flag |= IOP_AT_EOF; + } + else { + iop->dataend += iop->count; + iop->total += iop->count; + if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + /* reset the sentinel */ + /* = */ + *iop->dataend = grRS; + + + } + } + + bp = iop->off + iop->scanoff; + } - /* - * Look for regexp match of RS. Non-match conditions are: - * 1. No match at all - * 2. Match of a null string - * 3. Match ends at exact end of buffer - * Number 3 is subtle; we have to add more to the buffer - * in case the match would have extended further into the - * file, since regexp match by definition always matches the - * longest possible match. - * - * It is even more subtle than you might think. Suppose - * the re matches at exactly the end of file. We don't know - * that until we try to add more to the buffer. Thus, we - * set a flag to indicate, that if eof really does happen, - * don't break early. - * - * Still more subtlety. Suppose RS is a multi-character regexp, - * but it doesn't have the metacharacters that would let it - * match an arbitrary number of characters. So it's an exact - * string match. We need to check for this, in the case where - * there is an exact match at the end, and NOT read more - * data. Otherwise, this might bite us for an interactive - * networking program that uses CR-LF as the line terminator. - */ - continuing = FALSE; - if (rsre != NULL) { - again: - /* cases 1 and 2 are simple, just keep going */ - if (research(rsre, start, 0, iop->end - start, TRUE) == -1 - || RESTART(rsre, start) == REEND(rsre, start)) { - /* - * Leading newlines at the beginning of the file - * should be ignored. Whew! - */ - if (RS_is_null && *start == '\n') { - /* - * have to catch the case of a - * single newline at the front of - * the record, which the regex - * doesn't. gurr. - */ - while (*start == '\n' && start < iop->end) - start++; - goto again; - } - bp = iop->end; - continue; - } - /* case 3, regex match at exact end */ - if (start + REEND(rsre, start) >= iop->end) { - if (iop->cnt != EOF) { - /* - * Only do the test if not at EOF - */ - int isstring; - - isstring = reisstring(RS->stptr, - RS->stlen, rsre, start); - if (isstring == FALSE) { - bp = iop->end; - continuing = continued = TRUE; - continue; - } - } - } - /* got a match! */ - /* - * Leading newlines at the beginning of the file - * should be ignored. Whew! - */ - if (RS_is_null && *start == '\n') { - /* - * have to catch the case of a - * single newline at the front of - * the record, which the regex - * doesn't. gurr. - */ - while (*start == '\n' && start < iop->end) - start++; - /* if file is nothing but newlines, no record found */ - if (iop->cnt == EOF && start >= iop->end) { - *out = NULL; - set_RT_to_null(); - return EOF; - } - goto again; - } - bp = start + RESTART(rsre, start); - set_RT(bp, REEND(rsre, start) - RESTART(rsre, start)); - *bp = '\0'; - iop->off = start + REEND(rsre, start); - break; - } -/* search for RS, #2, RS = */ -#ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1) { - int len = iop->end - bp + 1; - int found = 0; - memset(&mbs, 0, sizeof(mbstate_t)); - do { - if (onecase ? casetable[(int) *bp] == rs : *bp == rs) - found = 1; - mbclen = mbrlen(bp, len, &mbs); - if ((mbclen == 1) || (mbclen == (size_t) -1) - || (mbclen == (size_t) -2) || (mbclen == 0)) { - /* We treat it as a singlebyte character. */ - mbclen = 1; - } - len -= mbclen; - bp += mbclen; - } while (len > 0 && !found); - } else -#endif - if (onecase) { - while (casetable[(unsigned char) *bp++] != rs && not_past_end()) - continue; - } else { - while (*bp++ != rs && not_past_end()) - continue; - } - set_RT(bp - 1, 1); + /* = */ + *iop->dataend = grRS; - if (bp <= iop->end) - break; - else - bp--; - if ((iop->flag & IOP_IS_INTERNAL) != 0) - iop->cnt = bp - start; - } - if (iop->cnt == EOF - && (((iop->flag & IOP_IS_INTERNAL) != 0) - || (start == bp && ! continued))) { - *out = NULL; - set_RT_to_null(); - return EOF; - } - - if (do_traditional || rsre == NULL) { - iop->off = bp; - bp--; - if (onecase ? casetable[(unsigned char) *bp] != rs : *bp != rs) - bp++; - if (MRL == 0) - *bp = '\0'; - } else if (RS_is_null && iop->cnt == EOF) { - /* - * special case, delete trailing newlines, - * should never be more than one. - */ - while (bp[-1] == '\n') - bp--; - *bp = '\0'; - } - *out = start; - return bp - start; -} + /* search for rs */ +#ifdef MBS_SUPPORT + if (gawk_mb_cur_max > 1) { + int len = iop->end - bp + 1; + int found = 0; + memset(&mbs, 0, sizeof(mbstate_t)); + do { + if (*bp == grRS) + found = 1; + mbclen = mbrlen(bp, len, &mbs); + if ((mbclen == 1) || (mbclen == (size_t) -1) + || (mbclen == (size_t) -2) || (mbclen == 0)) { + /* We treat it as a singlebyte character. */ + mbclen = 1; + } + len -= mbclen; + bp += mbclen; + } while (len > 0 && ! found); + } else +#endif + while (*bp++ != grRS) + continue; + + /* At the end of the loop, if the rs char is found in the buffer, */ + /* break. Otherwise, back the pointer up and then check for EOF. */ + /* If an internal file, break. */ + /* If EOF, break. */ + /* */ + /* */ + /* = */ + /* bp is one past newline that marks end of record */ + if (bp <= iop->dataend) /* found it in the buffer, not the sentinel */ + break; + + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + break; + } + + if ((iop->flag & IOP_AT_EOF) != 0) + break; + + /* bp points one past sentinel, back it up for buffer management code */ + bp--; + + /* hit end of data in buffer, continue around to find more */ + } + + /* Once out of the loop, either we hit EOF, or we found the */ + /* character. */ + /* */ + /* */ + /* = */ + /* now out of loop: either we hit EOF, or we found rs */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + + /* found rs, return the record */ + *out = iop->off; + retval = bp - iop->off - 1; + iop->off = bp; /* set up for next time */ + + /* set RT */ + set_RT(bp - 1, 1); + + return retval; +} +/* This next part deals with the case of RS = "". The goal is to */ +/* 1. skip any leading newlines */ +/* 2. scan through for multiple newlines */ +/* 3. If hit the end of the buffer, shuffle things down and refill */ +/* and keep going. */ +/* */ +/* */ +/* = */ +static int +rsnull_get_a_record(char **out, /* pointer to pointer to data */ + IOBUF *iop, /* input IOP */ + register int grRS, /* first char in RS->stptr */ + Regexp *RSre ATTRIBUTE_UNUSED, /* regexp for RS */ + int *errcode) /* pointer to error variable */ +{ + /* We will need at least a buffer pointer so that hopefully */ + /* some of the litprog code can be reused. */ + /* */ + /* */ + /* = */ + register char *bp; + long retval; + /* 2. Start scanning the buffer for newlines. If we hit one, look for another; */ + /* we need at least 2 successive newlines to terminate the record. */ + /* */ + /* If we find two, save the location of the first one so we can set RT */ + /* correctly. Then continue scanning; if we hit the end of the buffer, */ + /* we may need to save our state in order to expand the buffer. */ + /* */ + /* If we hit the end of the buffer without seeing any newlines, then */ + /* we need to save grow the buffer and keep going. */ + /* */ + /* */ + /* = */ + size_t firstnl = 0; + int restarting = FALSE; + char *rt_start = NULL; + + + /* ensure real sentinel value */ + grRS = '\n'; + + /* Much of the code is similar to the rs1 case: */ + /* */ + /* */ + /* = */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + /* First time around, set it to point to start of current record. */ + /* */ + /* */ + /* = */ + bp = iop->off; + + /* The main loop is similar but not identical. */ + /* */ + /* */ + /* = */ + for (;;) { + /* = */ + if (/* If there's data in the buffer, and we're pointing at the end of it, */ + /* grow the buffer. */ + /* */ + /* */ + /* = */ + (iop->flag & IOP_AT_EOF) == 0 && + iop->dataend != NULL && bp >= iop->dataend) { + if (iop->off > iop->buf) { + /* Moving the data requires remembering how far off the */ + /* dataend pointer was and the bp pointer too. */ + /* */ + /* = */ + size_t dataend_off = iop->dataend - iop->off; + memmove(iop->buf, iop->off, dataend_off); + iop->off = iop->buf; + bp = iop->dataend = iop->buf + dataend_off; + + /* = */ + bp = iop->dataend; + } else { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + } + } + + /* no data in buffer or ran out of data */ + if ((iop->flag & IOP_AT_EOF) == 0 && (iop->dataend == NULL || bp >= iop->dataend)) { + iop->scanoff = bp - iop->off; + if (iop->dataend == NULL) { + iop->dataend = iop->buf; /* first read */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) + iop->dataend += strlen(iop->buf); + } + /* Use read to put more data into the buffer. If we've read */ + /* as many characters as in the file, don't try to read more. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + } else if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + else { +#define min(x, y) (x < y ? x : y) + /* subtract one in read count to leave room for sentinel */ + size_t room_left = iop->end - iop->dataend - 1; + size_t amt_to_read = min(iop->readsize, room_left); + + if (amt_to_read < iop->readsize) { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + /* recalculate amt_to_read */ + room_left = iop->end - iop->dataend - 1; + amt_to_read = min(iop->readsize, room_left); + } + while (amt_to_read + iop->readsize < room_left) + amt_to_read += iop->readsize; + + iop->count = read(iop->fd, iop->dataend, amt_to_read); + if (iop->count == -1) { + if (! do_traditional && errcode != NULL) { + *errcode = errno; + iop->flag |= IOP_AT_EOF; + break; + } else + fatal(_("error reading input file `%s': %s"), + iop->name, strerror(errno)); + } else if (iop->count == 0) { + /* + * hit EOF before matching RS, so end + * the record and set RT to "" + */ + iop->flag |= IOP_AT_EOF; + } + else { + iop->dataend += iop->count; + iop->total += iop->count; + if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + /* reset the sentinel */ + /* = */ + *iop->dataend = grRS; + + + } + } + + bp = iop->off + iop->scanoff; + } + + /* = */ + *iop->dataend = grRS; + + + + /* The 2.15.6 logic doesn't seem to do the trick, let's do it */ + /* ourselves. We need to handle the following things. */ + /* */ + /* 1. Skip any leading newlines in front of the record, they don't count. */ + /* NOT leading whitespace, just newlines. See the comment, too. */ + /* */ + /* */ + /* = */ + /* + * skip any newlines at the front of the buffer, + * either in front of first record, or after previous + * record, e.g. if RS changed in the middle + * (see test/nulrsend) + */ + if (*bp == '\n') { + while (bp < iop->dataend && *bp == '\n') + bp++; + if (bp == iop->dataend) { + if ((iop->flag & IOP_AT_EOF) == 0) + continue; /* fill buffer, there's LOTS of leading newlines */ + else { + /* bug out early */ + iop->off = iop->dataend; + *out = NULL; + set_RT_to_null(); + return EOF; + } + } else { + iop->off = bp; + } + } + /* = */ + /* + * This code entered if we previously hit the first + * newline at exactly the end of the buffer. + */ + if (firstnl && restarting) { + restarting = FALSE; + /* + * back up to just before first newline so following + * logic always works. + */ + bp = iop->off + firstnl - 1; + firstnl = 0; + } + + /* we make use of the sentinel, so we don't have to check bp < iop->dataend */ + more: + while (*bp++ != '\n') + continue; + + if (bp >= iop->dataend && (iop->flag & IOP_AT_EOF) == 0) /* end of buffer */ + continue; /* refill, start over */ + else if (bp == (iop->dataend - 1) && (iop->flag & IOP_AT_EOF) == 0) { + /* one newline exactly at end, AND not at EOF */ + firstnl = bp - iop->off; + restarting = TRUE; + bp++; + continue; /* refill, earlier logic catches */ + } + + /* found one newline */ + if (*bp != '\n' && bp < iop->dataend) + goto more; /* only one */ + + rt_start = bp - 1; /* prev char was first newline, *bp is second */ + while (bp < iop->dataend && *bp == '\n') + bp++; + + if (bp >= iop->dataend && (iop->flag & IOP_AT_EOF) == 0) { + firstnl = bp - iop->off; + restarting = TRUE; + continue; + } else + break; /* got the record, done */ + + + + /* Here's the logic when the record has been identified. */ + /* */ + /* */ + /* = */ + + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + break; + } + + if ((iop->flag & IOP_AT_EOF) != 0) + break; + + + /* hit end of data in buffer, continue around to find more */ + } + + /* = */ + /* now out of loop: either we hit EOF, or we found rs */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + + set_RT(rt_start, bp - rt_start); + + /* found rs, return the record */ + *out = iop->off; + retval = rt_start - iop->off; + iop->off = bp; /* set up for next time */ + + return retval; +} +/* Now the hardest part, regex separated records. */ +/* */ +/* */ +/* = */ +static int +rsre_get_a_record(char **out, /* pointer to pointer to data */ + IOBUF *iop, /* input IOP */ + register int grRS, /* first char in RS->stptr */ + Regexp *RSre, /* regexp for RS */ + int *errcode) /* pointer to error variable */ +{ + /* Local vars are similar: */ + /* */ + /* */ + /* = */ + register char *bp; + long retval; + size_t restart = 0, reend = 0; + int set_res = FALSE; + + + /* And the basic code is also similar: */ + /* */ + /* */ + /* = */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + /* First time around, set it to point to start of current record. */ + /* */ + /* */ + /* = */ + bp = iop->off; + + + /* Here is the main loop: */ + /* */ + /* */ + /* = */ + for (;;) { + /* = */ + if (/* If there's data in the buffer, and we're pointing at the end of it, */ + /* grow the buffer. */ + /* */ + /* */ + /* = */ + (iop->flag & IOP_AT_EOF) == 0 && + iop->dataend != NULL && bp >= iop->dataend) { + if (iop->off > iop->buf) { + /* Moving the data requires remembering how far off the */ + /* dataend pointer was and the bp pointer too. */ + /* */ + /* = */ + size_t dataend_off = iop->dataend - iop->off; + memmove(iop->buf, iop->off, dataend_off); + iop->off = iop->buf; + bp = iop->dataend = iop->buf + dataend_off; + + /* = */ + bp = iop->dataend; + } else { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + } + } + + /* no data in buffer or ran out of data */ + if ((iop->flag & IOP_AT_EOF) == 0 && (iop->dataend == NULL || bp >= iop->dataend)) { + iop->scanoff = bp - iop->off; + if (iop->dataend == NULL) { + iop->dataend = iop->buf; /* first read */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) + iop->dataend += strlen(iop->buf); + } + /* Use read to put more data into the buffer. If we've read */ + /* as many characters as in the file, don't try to read more. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + } else if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + else { +#define min(x, y) (x < y ? x : y) + /* subtract one in read count to leave room for sentinel */ + size_t room_left = iop->end - iop->dataend - 1; + size_t amt_to_read = min(iop->readsize, room_left); + + if (amt_to_read < iop->readsize) { + /* = */ + iop->scanoff = bp - iop->off; + grow_iop_buffer(iop); + bp = iop->off + iop->scanoff; + /* recalculate amt_to_read */ + room_left = iop->end - iop->dataend - 1; + amt_to_read = min(iop->readsize, room_left); + } + while (amt_to_read + iop->readsize < room_left) + amt_to_read += iop->readsize; + + iop->count = read(iop->fd, iop->dataend, amt_to_read); + if (iop->count == -1) { + if (! do_traditional && errcode != NULL) { + *errcode = errno; + iop->flag |= IOP_AT_EOF; + break; + } else + fatal(_("error reading input file `%s': %s"), + iop->name, strerror(errno)); + } else if (iop->count == 0) { + /* + * hit EOF before matching RS, so end + * the record and set RT to "" + */ + iop->flag |= IOP_AT_EOF; + } + else { + iop->dataend += iop->count; + iop->total += iop->count; + if (S_ISREG(iop->sbuf.st_mode) && iop->total >= iop->sbuf.st_size) + iop->flag |= IOP_AT_EOF; + /* reset the sentinel */ + /* = */ + *iop->dataend = grRS; + + + } + } + + bp = iop->off + iop->scanoff; + } + + /* not needed for rsre, but doesn't hurt: */ + /* = */ + *iop->dataend = grRS; + + + + /* The hard part is the logic for regex matching. */ + /* Start by searching the buffer for a match. Cases: */ + /* */ + /* 1. No match */ + /* if not eof then */ + /* grow buffer, add more data, try again */ + /* else */ + /* set RT to null */ + /* return the record */ + /* endif */ + /* */ + /* = */ + /* case 1, no match */ + if (research(RSre, iop->off, 0, iop->dataend - iop->off, TRUE) == -1) { + if ((iop->flag & IOP_AT_EOF) == 0) { + bp = iop->dataend; + continue; + } else { + *out = iop->off; + retval = iop->dataend - iop->off; + iop->off = iop->dataend; + set_RT_to_null(); + return retval; + } + } + /* 1a. Save the match info in variables for debugging, */ + /* and readability. */ + /* */ + /* */ + /* = */ + restart = RESTART(RSre, iop->off); + reend = REEND(RSre, iop->off); + set_res = TRUE; + + /* 2. Match entirely within the bounds of the buffer: */ + /* fill in RT */ + /* break from loop to return record */ + /* */ + /* */ + /* = */ + /* case 2 is simple, just keep going */ + if (restart == reend) { + bp = iop->dataend; + continue; + } + /* 3. Match exactly at end: */ + /* if not eof and re is not a simple string match */ + /* grow buffer, add more data, try again */ + /* else */ + /* break from loop to set RT and return record */ + /* fi */ + /* */ + /* */ + /* = */ + if (iop->off + reend >= iop->dataend) { + if ((iop->flag & IOP_AT_EOF) == 0 + && ! reisstring(RS->stptr, RS->stlen, RSre, iop->off)) { + bp = iop->dataend; + continue; + } else { + break; + } + } + /* 4. Match within xxx bytes of end & maybe islong re: */ + /* if not eof */ + /* grow buffer, add mor data, try again */ + /* else */ + /* fill in RT */ + /* break from loop to return record */ + /* fi */ + /* */ + /* */ + /* = */ + /* + * case 4, match succeeded, but there may be more in + * the next input buffer. + * + * Consider an RS of xyz(abc)? where the + * exact end of the buffer is xyza and the + * next two, unread, characters are bc. + * + * This matches the "xyz" and ends up putting the + * "abc" into the front of the next record. Ooops. + * + * The remaybelong() function looks to see if the + * regex contains one of: + * ? |. This is a very + * simple heuristic, but in combination with the + * "end of match within a few bytes of end of buffer" + * check, should keep things reasonable. + */ + + /* + * XXX: The reisstring and remaybelong tests should + * really be done once when RS is assigned to and + * then tested as flags here. Maybe one day. + */ + + /* succession of tests is easier to trace in GDB. */ + if ((iop->flag & IOP_AT_EOF) == 0) { + if (remaybelong(RS->stptr, RS->stlen)) { + char *matchend = iop->off + reend; + + if (iop->dataend - matchend < RS->stlen) { + bp = iop->dataend; + continue; + } + } + } + + + + /* Here is the end loop logic. */ + /* */ + /* */ + /* = */ + if (bp <= iop->dataend) { + break; + } else + bp--; + + if ((iop->flag & IOP_IS_INTERNAL) != 0) { + iop->flag |= IOP_AT_EOF; + break; + } + + if ((iop->flag & IOP_AT_EOF) != 0) + break; + + + /* hit end of data in buffer, continue around to find more */ + } + /* And the end of function logic: */ + /* */ + /* */ + /* = */ + /* now out of loop: either we hit EOF, or we found rs */ + /* Upon EOF, set RT to null, set pointer to null, return EOF. */ + /* We don't do this unless we've also run out of data. */ + /* */ + /* */ + /* = */ + if ((iop->flag & IOP_AT_EOF) != 0 && iop->off >= iop->dataend) { + *out = NULL; + set_RT_to_null(); + return EOF; + } + + /* found rs, return the record */ + + assert(set_res); + /* set RT before adjusting pointers in iop. */ + set_RT(iop->off + restart, reend - restart); + + *out = iop->off; + retval = (iop->off + restart) - iop->off; + iop->off += reend; -#ifdef TEST -int -main(int argc, char *argv[]) -{ - IOBUF *iop; - char *out; - int cnt; - char rs[2]; - - rs[0] = '\0'; - if (argc > 1) - bufsize = atoi(argv[1]); - if (argc > 2) - rs[0] = *argv[2]; - iop = iop_alloc(0, "stdin", NULL); - while ((cnt = get_a_record(&out, iop, rs[0], NULL, NULL)) > 0) { - fwrite(out, 1, cnt, stdout); - fwrite(rs, 1, 1, stdout); - } - return 0; + return retval; } -#endif /* set_RS --- update things as appropriate when RS is set */ @@ -2500,28 +3241,109 @@ { static NODE *save_rs = NULL; - if (save_rs && cmp_nodes(RS_node->var_value, save_rs) == 0) - return; + /* + * Don't use cmp_nodes(), which pays attention to IGNORECASE. + */ + if (save_rs + && RS_node->var_value->stlen == save_rs->stlen + && STREQN(RS_node->var_value->stptr, save_rs->stptr, save_rs->stlen)) { + /* + * It could be that just IGNORECASE changed. If so, + * update the regex and then do the same for FS. + * set_IGNORECASE() relies on this routine to call + * set_FS(). + */ + RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case); + goto set_FS; + } unref(save_rs); save_rs = dupnode(RS_node->var_value); RS_is_null = FALSE; RS = force_string(RS_node->var_value); if (RS_regexp != NULL) { - refree(RS_regexp); - RS_regexp = NULL; + refree(RS_re_yes_case); + refree(RS_re_no_case); + RS_re_yes_case = RS_re_no_case = RS_regexp = NULL; } - if (RS->stlen == 0) + if (RS->stlen == 0) { RS_is_null = TRUE; - else if (RS->stlen > 1) { + get_a_record = rsnull_get_a_record; + } else if (RS->stlen > 1) { static int warned = FALSE; - RS_regexp = make_regexp(RS->stptr, RS->stlen, IGNORECASE, TRUE); + RS_re_yes_case = make_regexp(RS->stptr, RS->stlen, FALSE); + RS_re_no_case = make_regexp(RS->stptr, RS->stlen, TRUE); + RS_regexp = (IGNORECASE ? RS_re_no_case : RS_re_yes_case); + + get_a_record = rsre_get_a_record; if (do_lint && ! warned) { lintwarn(_("multicharacter value of `RS' is a gawk extension")); warned = TRUE; } + } else + get_a_record = rs1_get_a_record; +set_FS: + if (! using_fieldwidths()) + set_FS(); +} + +/* pty_vs_pipe --- return true if should use pty instead of pipes for `|&' */ + +/* + * This works by checking if PROCINFO["command", "pty"] exists and is true. + */ + +static int +pty_vs_pipe(const char *command) +{ +#ifdef HAVE_TERMIOS_H + char *full_index; + size_t full_len; + NODE *val; + NODE *sub; + + if (PROCINFO_node == NULL) + return FALSE; + + full_len = strlen(command) + + SUBSEP_node->var_value->stlen + + 3 /* strlen("pty") */ + + 1; /* string terminator */ + emalloc(full_index, char *, full_len, "pty_vs_pipe"); + sprintf(full_index, "%s%.*spty", command, + (int) SUBSEP_node->var_value->stlen, SUBSEP_node->var_value->stptr); + + sub = tmp_string(full_index, strlen(full_index)); + val = in_array(PROCINFO_node, sub); + free_temp(sub); + free(full_index); + + if (val) { + if (val->flags & MAYBE_NUM) + (void) force_number(val); + if (val->flags & NUMBER) + return (val->numbr != 0.0); + else + return (val->stlen != 0); } +#endif /* HAVE_TERMIOS_H */ + return FALSE; +} + +/* iopflags2str --- make IOP flags printable */ + +const char * +iopflags2str(int flag) +{ + static struct flagtab values[] = { + { IOP_IS_TTY, "IOP_IS_TTY" }, + { IOP_IS_INTERNAL, "IOP_IS_INTERNAL" }, + { IOP_NO_FREE, "IOP_NO_FREE" }, + { IOP_NOFREE_OBJ, "IOP_NOFREE_OBJ" }, + { IOP_AT_EOF, "IOP_AT_EOF" }, + { 0, NULL } + }; - set_FS_if_not_FIELDWIDTHS(); + return genflags2str(flag, values); } diff -urN gawk-3.1.1/m4/ChangeLog gawk-3.1.2/m4/ChangeLog --- gawk-3.1.1/m4/ChangeLog 2002-05-01 16:42:01.000000000 +0300 +++ gawk-3.1.2/m4/ChangeLog 2003-03-19 14:23:01.000000000 +0200 @@ -1,3 +1,20 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Wed Nov 20 13:15:59 2002 Arnold D. Robbins + + * arch.m4 (GAWK_AIX_TWEAK): Add -DGAWK_AIX for use in + io.c to get real pipes. Ugh. + Change test to -d /lpp so it actually works. Sigh. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/m4/arch.m4 gawk-3.1.2/m4/arch.m4 --- gawk-3.1.1/m4/arch.m4 2000-12-04 09:46:46.000000000 +0200 +++ gawk-3.1.2/m4/arch.m4 2003-02-04 14:13:43.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl arch.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 1996, 1998, 1999, 2000 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -25,9 +25,9 @@ AC_DEFUN(GAWK_AC_AIX_TWEAK, [ AC_MSG_CHECKING([for AIX compilation hacks]) AC_CACHE_VAL(gawk_cv_aix_hack, [ -if test -d /lpp/bos +if test -d /lpp then - CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1" + CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1" gawk_cv_aix_hack=yes else gawk_cv_aix_hack=no diff -urN gawk-3.1.1/m4/gettext.m4 gawk-3.1.2/m4/gettext.m4 --- gawk-3.1.1/m4/gettext.m4 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/m4/gettext.m4 2002-09-19 11:00:08.000000000 +0300 @@ -1,4 +1,4 @@ -# gettext.m4 serial 14 (gettext-0.11.2) +# gettext.m4 serial 17 (gettext-0.11.5) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -33,7 +33,9 @@ dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl @@ -60,9 +62,9 @@ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])]) +])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) @@ -75,6 +77,21 @@ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, @@ -110,13 +127,20 @@ dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. - define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1)) + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], @@ -141,7 +165,14 @@ LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" @@ -155,7 +186,14 @@ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include -extern int _nl_msg_cat_cntr; +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" @@ -450,7 +488,7 @@ ;; esac done], - [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it # from automake. eval 'ALL_LINGUAS''="$ALL_LINGUAS"' @@ -479,6 +517,10 @@ AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) @@ -488,7 +530,9 @@ AM_ICONV AM_LANGINFO_CODESET - AM_LC_MESSAGES + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least @@ -537,3 +581,7 @@ fi AC_SUBST(MKINSTALLDIRS) ]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff -urN gawk-3.1.1/m4/iconv.m4 gawk-3.1.2/m4/iconv.m4 --- gawk-3.1.1/m4/iconv.m4 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/m4/iconv.m4 2002-09-19 11:00:08.000000000 +0300 @@ -1,4 +1,4 @@ -# iconv.m4 serial AM3 (gettext-0.11) +# iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -8,11 +8,8 @@ dnl From Bruno Haible. -AC_DEFUN([AM_ICONV_LINK], +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) @@ -20,6 +17,16 @@ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use @@ -69,7 +76,7 @@ AC_DEFUN([AM_ICONV], [ - AC_REQUIRE([AM_ICONV_LINK]) + AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ diff -urN gawk-3.1.1/m4/intdiv0.m4 gawk-3.1.2/m4/intdiv0.m4 --- gawk-3.1.1/m4/intdiv0.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/intdiv0.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,72 @@ +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) diff -urN gawk-3.1.1/m4/inttypes-pri.m4 gawk-3.1.2/m4/inttypes-pri.m4 --- gawk-3.1.1/m4/inttypes-pri.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/inttypes-pri.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,32 @@ +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) diff -urN gawk-3.1.1/m4/inttypes.m4 gawk-3.1.2/m4/inttypes.m4 --- gawk-3.1.1/m4/inttypes.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/inttypes.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,27 @@ +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) diff -urN gawk-3.1.1/m4/inttypes_h.m4 gawk-3.1.2/m4/inttypes_h.m4 --- gawk-3.1.1/m4/inttypes_h.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/inttypes_h.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,28 @@ +# inttypes_h.m4 serial 4 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff -urN gawk-3.1.1/m4/lcmessage.m4 gawk-3.1.2/m4/lcmessage.m4 --- gawk-3.1.1/m4/lcmessage.m4 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/m4/lcmessage.m4 2002-09-19 11:00:08.000000000 +0300 @@ -1,4 +1,4 @@ -# lcmessage.m4 serial 2 (gettext-0.10.40) +# lcmessage.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -21,12 +21,12 @@ # Check whether LC_MESSAGES is available in . AC_DEFUN([AM_LC_MESSAGES], - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your file defines LC_MESSAGES.]) - fi - fi]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) diff -urN gawk-3.1.1/m4/lib-link.m4 gawk-3.1.2/m4/lib-link.m4 --- gawk-3.1.1/m4/lib-link.m4 2002-04-28 17:01:52.000000000 +0300 +++ gawk-3.1.2/m4/lib-link.m4 2002-09-19 11:00:08.000000000 +0300 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 2 (gettext-0.11.2) +# lib-link.m4 serial 3 (gettext-0.11.3) dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -116,6 +116,10 @@ hardcode_minus_L="$acl_cv_hardcode_minus_L" sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and @@ -245,7 +249,7 @@ dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. - if test "X$found_dir" = "X/usr/lib"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -436,29 +440,31 @@ ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" fi ;; -l*) diff -urN gawk-3.1.1/m4/socket.m4 gawk-3.1.2/m4/socket.m4 --- gawk-3.1.1/m4/socket.m4 2000-06-23 12:47:55.000000000 +0300 +++ gawk-3.1.2/m4/socket.m4 2003-02-04 14:14:35.000000000 +0200 @@ -1,7 +1,7 @@ dnl dnl socket.m4 --- autoconf input file for gawk dnl -dnl Copyright (C) 1995, 96, 98, 99, 2000 the Free Software Foundation, Inc. +dnl Copyright (C) 1995, 1996, 1998, 1999, 2000, 2003 the Free Software Foundation, Inc. dnl dnl This file is part of GAWK, the GNU implementation of the dnl AWK Progamming Language. @@ -79,7 +79,7 @@ esac AC_MSG_RESULT([${gawk_lib_loc}]) - AC_DEFINE(HAVE_SOCKETS) + AC_DEFINE(HAVE_SOCKETS, 1, [we have sockets on this system]) fi AC_SUBST(SOCKET_LIBS)dnl ])dnl diff -urN gawk-3.1.1/m4/stdint_h.m4 gawk-3.1.2/m4/stdint_h.m4 --- gawk-3.1.1/m4/stdint_h.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/stdint_h.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,28 @@ +# stdint_h.m4 serial 2 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) diff -urN gawk-3.1.1/m4/strtod.m4 gawk-3.1.2/m4/strtod.m4 --- gawk-3.1.1/m4/strtod.m4 2002-04-16 14:57:52.000000000 +0300 +++ gawk-3.1.2/m4/strtod.m4 2002-06-11 23:15:12.000000000 +0300 @@ -54,6 +54,6 @@ gawk_ac_cv_func_strtod_c89=yes, gawk_ac_cv_func_strtod_c89=no, gawk_ac_cv_func_strtod_c89=no)]) if test $gawk_ac_cv_func_strtod_c89 = no; then - AC_DEFINE(STRTOD_NOT_C89) + AC_DEFINE(STRTOD_NOT_C89, 1, [strtod doesn't have C89 semantics]) fi ])# GAWK_FUNC_STRTOD_C89 diff -urN gawk-3.1.1/m4/uintmax_t.m4 gawk-3.1.2/m4/uintmax_t.m4 --- gawk-3.1.1/m4/uintmax_t.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/uintmax_t.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,29 @@ +# uintmax_t.m4 serial 6 (gettext-0.11) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to `unsigned long' or `unsigned long long' +# if does not exist. + +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + fi +]) diff -urN gawk-3.1.1/m4/ulonglong.m4 gawk-3.1.2/m4/ulonglong.m4 --- gawk-3.1.1/m4/ulonglong.m4 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/m4/ulonglong.m4 2002-09-19 11:00:08.000000000 +0300 @@ -0,0 +1,23 @@ +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) diff -urN gawk-3.1.1/main.c gawk-3.1.2/main.c --- gawk-3.1.1/main.c 2002-05-01 17:12:45.000000000 +0300 +++ gawk-3.1.2/main.c 2003-03-19 14:11:18.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -42,17 +42,17 @@ #define DEFAULT_PROFILE "awkprof.out" /* where to put profile */ #define DEFAULT_VARFILE "awkvars.out" /* where to put vars */ -static char *varfile = DEFAULT_VARFILE; +static const char *varfile = DEFAULT_VARFILE; -static void usage P((int exitval, FILE *fp)); -static void copyleft P((void)); +static void usage P((int exitval, FILE *fp)) ATTRIBUTE_NORETURN; +static void copyleft P((void)) ATTRIBUTE_NORETURN; static void cmdline_fs P((char *str)); static void init_args P((int argc0, int argc, char *argv0, char **argv)); static void init_vars P((void)); -static void pre_assign P((char *v)); -RETSIGTYPE catchsig P((int sig, int code)); -static void nostalgia P((void)); -static void version P((void)); +static void add_src P((struct src **data, long *num, long *alloc, enum srctype stype, char *val)); +static RETSIGTYPE catchsig P((int sig)) ATTRIBUTE_NORETURN; +static void nostalgia P((void)) ATTRIBUTE_NORETURN; +static void version P((void)) ATTRIBUTE_NORETURN; static void init_fds P((void)); static void init_groupset P((void)); @@ -105,6 +105,20 @@ struct src *srcfiles = NULL; /* source file name(s) */ long numfiles = -1; /* how many source files */ +static long allocfiles; /* for how many is *srcfiles allocated */ + +#define srcfiles_add(stype, val) \ + add_src(&srcfiles, &numfiles, &allocfiles, stype, val) + +static struct src *preassigns = NULL; /* requested via -v or -F */ +static long numassigns = -1; /* how many of them */ +static long allocassigns; /* for how many is allocated */ + +#define preassigns_add(stype, val) \ + add_src(&preassigns, &numassigns, &allocassigns, stype, val) + +#undef do_lint +#undef do_lint_old int do_traditional = FALSE; /* no gnu extensions, add traditional weirdnesses */ int do_posix = FALSE; /* turn off gnu and unix extensions */ @@ -121,10 +135,13 @@ int in_begin_rule = FALSE; /* we're in a BEGIN rule */ int in_end_rule = FALSE; /* we're in a END rule */ int whiny_users = FALSE; /* do things that whiny users want */ +#ifdef MBS_SUPPORT +int gawk_mb_cur_max = 1; /* MB_CUR_MAX value, see comment in main() */ +#endif int output_is_tty = FALSE; /* control flushing of output */ -extern char *version_string; /* current version, for printing */ +extern const char *version_string; /* current version, for printing */ #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 GETGROUPS_T *groupset; /* current group set */ @@ -137,10 +154,14 @@ #if _MSC_VER == 510 void (*lintfunc) P((va_list va_alist, ...)) = warning; #else -void (*lintfunc) P((char *mesg, ...)) = warning; +#if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ +void (*lintfunc) P((const char *mesg, ...)) = warning; +#else +void (*lintfunc) () = warning; +#endif #endif -static struct option optab[] = { +static const struct option optab[] = { { "compat", no_argument, & do_traditional, 1 }, { "traditional", no_argument, & do_traditional, 1 }, { "lint", optional_argument, NULL, 'l' }, @@ -167,6 +188,11 @@ { NULL, 0, NULL, '\0' } }; +#ifdef NO_LINT +#define do_lint 0 +#define do_lint_old 0 +#endif + /* main --- process args, parse program, run it, clean up */ int @@ -181,6 +207,7 @@ extern int optind; extern int opterr; extern char *optarg; + int i; /* do these checks early */ if (getenv("TIDYMEM") != NULL) @@ -194,19 +221,42 @@ mtrace(); #endif /* HAVE_MCHECK_H */ - +#if defined(LC_CTYPE) setlocale(LC_CTYPE, ""); +#endif +#if defined(LC_COLLATE) setlocale(LC_COLLATE, ""); -#if HAVE_LC_MESSAGES +#endif +#if HAVE_LC_MESSAGES && defined(LC_MESSAGES) setlocale(LC_MESSAGES, ""); #endif +#if defined(LC_NUMERIC) + /* + * Force the issue here. On some systems, gawk ends up + * printing output with commas for the decimal point. + */ + setlocale(LC_NUMERIC, "C"); +#endif +#if defined(LC_TIME) + setlocale(LC_TIME, ""); +#endif + +#ifdef MBS_SUPPORT + /* + * In glibc, MB_CUR_MAX is actually a function. This value is + * tested *a lot* in many speed-critical places in gawk. Caching + * this value once makes a speed difference. + */ + gawk_mb_cur_max = MB_CUR_MAX; +#endif + bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - (void) signal(SIGFPE, (RETSIGTYPE (*) P((int))) catchsig); - (void) signal(SIGSEGV, (RETSIGTYPE (*) P((int))) catchsig); + (void) signal(SIGFPE, catchsig); + (void) signal(SIGSEGV, catchsig); #ifdef SIGBUS - (void) signal(SIGBUS, (RETSIGTYPE (*) P((int))) catchsig); + (void) signal(SIGBUS, catchsig); #endif myname = gawk_name(argv[0]); @@ -220,42 +270,11 @@ if (argc < 2) usage(1, stderr); - /* initialize the null string */ - Nnull_string = make_string("", 0); - Nnull_string->numbr = 0.0; - Nnull_string->type = Node_val; - Nnull_string->flags = (PERM|STR|STRING|NUM|NUMBER); - - /* - * Tell the regex routines how they should work. - * Do this before initializing variables, since - * they could want to do a regexp compile. - */ - resetup(); - - /* Set up the special variables */ - /* - * Note that this must be done BEFORE arg parsing else -F - * breaks horribly. - */ - init_vars(); - - /* Set up the field variables */ - /* - * Do this before arg parsing so that `-v NF=blah' won't - * break anything. - */ - init_fields(); - - /* Robustness: check that 0, 1, 2, exist */ + /* Robustness: check that file descriptors 0, 1, 2 are open */ init_fds(); - /* load group set */ - init_groupset(); - - /* worst case */ - emalloc(srcfiles, struct src *, argc * sizeof(struct src), "main"); - memset(srcfiles, '\0', argc * sizeof(struct src)); + /* init array handling. */ + array_init(); /* we do error messages ourselves on invalid options */ opterr = FALSE; @@ -269,7 +288,7 @@ switch (c) { case 'F': - cmdline_fs(optarg); + preassigns_add(PRE_ASSIGN_FS, optarg); break; case 'f': @@ -282,19 +301,15 @@ * of a #! /bin/gawk line in an executable file */ scan = optarg; - while (ISSPACE(*scan)) - scan++; - - ++numfiles; - srcfiles[numfiles].stype = SOURCEFILE; - if (*scan == '\0') - srcfiles[numfiles].val = argv[optind++]; - else - srcfiles[numfiles].val = optarg; + if (argv[optind-1] != optarg) + while (ISSPACE(*scan)) + scan++; + srcfiles_add(SOURCEFILE, + (*scan == '\0' ? argv[optind++] : optarg)); break; case 'v': - pre_assign(optarg); + preassigns_add(PRE_ASSIGN, optarg); break; case 'm': @@ -339,9 +354,15 @@ break; case 'l': - do_lint = TRUE; - if (optarg != NULL && strcmp(optarg, "fatal") == 0) - lintfunc = r_fatal; +#ifndef NO_LINT + do_lint = LINT_ALL; + if (optarg != NULL) { + if (strcmp(optarg, "fatal") == 0) + lintfunc = r_fatal; + else if (strcmp(optarg, "invalid") == 0) + do_lint = LINT_INVALID; + } +#endif break; case 'p': @@ -355,10 +376,8 @@ case 's': if (optarg[0] == '\0') warning(_("empty argument to `--source' ignored")); - else { - srcfiles[++numfiles].stype = CMDLINE; - srcfiles[numfiles].val = optarg; - } + else + srcfiles_add(CMDLINE, optarg); break; case 'u': @@ -449,38 +468,50 @@ warning(_("running %s setuid root may be a security problem"), myname); /* - * Tell the regex routines how they should work. - * Do this again, after argument processing, since do_posix - * and do_traditional are now paid attention to by resetup(). + * Force profiling if this is pgawk. + * Don't bother if the command line already set profiling up. */ - if (do_traditional || do_posix || do_intervals) { - resetup(); + if (! do_profiling) + init_profiling(& do_profiling, DEFAULT_PROFILE); - /* now handle RS and FS. have to be careful with FS */ - set_RS(); - if (using_fieldwidths()) { - set_FS(); - set_FIELDWIDTHS(); - } else - set_FS(); - } + /* load group set */ + init_groupset(); + + /* initialize the null string */ + Nnull_string = make_string("", 0); + Nnull_string->numbr = 0.0; + Nnull_string->type = Node_val; + Nnull_string->flags = (PERM|STRCUR|STRING|NUMCUR|NUMBER); /* - * Initialize profiling info, do after parsing args, - * in case this is pgawk. Don't bother if the command - * line already set profling up. + * Tell the regex routines how they should work. + * Do this before initializing variables, since + * they could want to do a regexp compile. */ - if (! do_profiling) - init_profiling(& do_profiling, DEFAULT_PROFILE); + resetup(); + + /* Set up the special variables */ + init_vars(); + + /* Set up the field variables */ + init_fields(); + + /* Now process the pre-assignments */ + for (i = 0; i <= numassigns; i++) + if (preassigns[i].stype == PRE_ASSIGN) + (void) arg_assign(preassigns[i].val, TRUE); + else /* PRE_ASSIGN_FS */ + cmdline_fs(preassigns[i].val); + free(preassigns); if ((BINMODE & 1) != 0) if (os_setbinmode(fileno(stdin), O_BINARY) == -1) - fatal(_("can't set mode on stdin (%s)"), strerror(errno)); + fatal(_("can't set binary mode on stdin (%s)"), strerror(errno)); if ((BINMODE & 2) != 0) { if (os_setbinmode(fileno(stdout), O_BINARY) == -1) - fatal(_("can't set mode on stdout (%s)"), strerror(errno)); + fatal(_("can't set binary mode on stdout (%s)"), strerror(errno)); if (os_setbinmode(fileno(stderr), O_BINARY) == -1) - fatal(_("can't set mode on stderr (%s)"), strerror(errno)); + fatal(_("can't set binary mode on stderr (%s)"), strerror(errno)); } #ifdef GAWKDEBUG @@ -492,8 +523,7 @@ if (numfiles == -1) { if (optind > argc - 1 || stopped_early) /* no args left or no program */ usage(1, stderr); - srcfiles[++numfiles].stype = CMDLINE; - srcfiles[numfiles].val = argv[optind]; + srcfiles_add(CMDLINE, argv[optind]); optind++; } @@ -504,6 +534,8 @@ if (yyparse() != 0 || errcount != 0) exit(1); + free(srcfiles); + if (do_intl) exit(0); @@ -516,6 +548,7 @@ init_profiling_signals(); + /* Whew. Finally, run the program. */ if (begin_block != NULL) { in_begin_rule = TRUE; (void) interpret(begin_block); @@ -546,6 +579,29 @@ return exit_val; /* to suppress warnings */ } +/* add_src --- add one element to *srcfiles or *preassigns */ + +static void +add_src(struct src **data, long *num, long *alloc, enum srctype stype, char *val) +{ +#define INIT_SRC 4 + + ++*num; + + if (*data == NULL) { + emalloc(*data, struct src *, INIT_SRC * sizeof(struct src), "add_src"); + *alloc = INIT_SRC; + } else if (*num >= *alloc) { + (*alloc) *= 2; + erealloc(*data, struct src *, (*alloc) * sizeof(struct src), "add_src"); + } + + (*data)[*num].stype = stype; + (*data)[*num].val = val; + +#undef INIT_SRC +} + /* usage --- print usage information and exit */ static void @@ -609,7 +665,7 @@ static void copyleft() { - static char blurb_part1[] = + static const char blurb_part1[] = N_("Copyright (C) 1989, 1991-%d Free Software Foundation.\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ @@ -617,19 +673,19 @@ the Free Software Foundation; either version 2 of the License, or\n\ (at your option) any later version.\n\ \n"); - static char blurb_part2[] = + static const char blurb_part2[] = N_("This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ GNU General Public License for more details.\n\ \n"); - static char blurb_part3[] = + static const char blurb_part3[] = N_("You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"); /* multiple blurbs are needed for some brain dead compilers. */ - printf(_(blurb_part1), 2002); /* Last update year */ + printf(_(blurb_part1), 2003); /* Last update year */ fputs(_(blurb_part2), stdout); fputs(_(blurb_part3), stdout); fflush(stdout); @@ -650,7 +706,7 @@ * case so -F\t works as documented in awk book even though the shell * hands us -Ft. Bleah! * - * Thankfully, Posix didn't propogate this "feature". + * Thankfully, Posix didn't propagate this "feature". */ if (str[0] == 't' && str[1] == '\0') { if (do_lint) @@ -670,7 +726,7 @@ int i, j; NODE **aptr; - ARGV_node = install("ARGV", node(Nnull_string, Node_var_array, (NODE *) NULL)); + ARGV_node = install("ARGV", node((NODE *) NULL, Node_var_array, (NODE *) NULL)); aptr = assoc_lookup(ARGV_node, tmp_number(0.0), FALSE); *aptr = make_string(argv0, strlen(argv0)); (*aptr)->flags |= MAYBE_NUM; @@ -701,9 +757,9 @@ AWKNUM numval; Func_ptr assign; }; -static struct varinit varinit[] = { +static const struct varinit varinit[] = { {&CONVFMT_node, "CONVFMT", Node_CONVFMT, "%.6g", 0, set_CONVFMT }, -{&NF_node, "NF", Node_NF, NULL, -1, set_NF }, +{&NF_node, "NF", Node_NF, NULL, -1, NULL }, {&FIELDWIDTHS_node, "FIELDWIDTHS", Node_FIELDWIDTHS, "", 0, NULL }, {&NR_node, "NR", Node_NR, NULL, 0, set_NR }, {&FNR_node, "FNR", Node_FNR, NULL, 0, set_FNR }, @@ -731,7 +787,7 @@ static void init_vars() { - register struct varinit *vp; + register const struct varinit *vp; for (vp = varinit; vp->name; vp++) { *(vp->spec) = install((char *) vp->name, @@ -748,7 +804,7 @@ /* load_environ --- populate the ENVIRON array */ -void +NODE * load_environ() { #if ! defined(TANDEM) @@ -758,9 +814,11 @@ register char *var, *val; NODE **aptr; register int i; +#endif /* TANDEM */ ENVIRON_node = install("ENVIRON", - node(Nnull_string, Node_var, (NODE *) NULL)); + node((NODE *) NULL, Node_var_array, (NODE *) NULL)); +#if ! defined(TANDEM) for (i = 0; environ[i] != NULL; i++) { static char nullstr[] = ""; @@ -770,7 +828,7 @@ *val++ = '\0'; else val = nullstr; - aptr = assoc_lookup(ENVIRON_node,tmp_string(var, strlen(var)), + aptr = assoc_lookup(ENVIRON_node, tmp_string(var, strlen(var)), FALSE); *aptr = make_string(val, strlen(val)); (*aptr)->flags |= (MAYBE_NUM|SCALAR); @@ -789,11 +847,12 @@ (*aptr)->flags |= SCALAR; } #endif /* TANDEM */ + return ENVIRON_node; } /* load_procinfo --- populate the PROCINFO array */ -void +NODE * load_procinfo() { int i; @@ -802,7 +861,7 @@ AWKNUM value; PROCINFO_node = install("PROCINFO", - node(Nnull_string, Node_var, (NODE *) NULL)); + node((NODE *) NULL, Node_var_array, (NODE *) NULL)); #ifdef GETPGRP_VOID #define getpgrp_arg() /* nothing */ @@ -845,7 +904,8 @@ *aptr = make_number(value); aptr = assoc_lookup(PROCINFO_node, tmp_string("FS", 2), FALSE); - *aptr = make_string("FS", 2); + *aptr = (using_fieldwidths() ? make_string("FIELDWIDTHS", 11) : + make_string("FS", 2) ); #if defined (HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 for (i = 0; i < ngroups; i++) { @@ -854,13 +914,18 @@ aptr = assoc_lookup(PROCINFO_node, tmp_string(name, strlen(name)), FALSE); *aptr = make_number(value); } + if (groupset) { + free(groupset); + groupset = NULL; + } #endif + return PROCINFO_node; } /* arg_assign --- process a command-line assignment */ -char * -arg_assign(char *arg) +int +arg_assign(char *arg, int initing) { char *cp, *cp2; int badvar; @@ -870,26 +935,38 @@ NODE **lhs; cp = strchr(arg, '='); - if (cp != NULL) { - *cp++ = '\0'; - /* first check that the variable name has valid syntax */ - badvar = FALSE; - if (! ISALPHA(arg[0]) && arg[0] != '_') - badvar = TRUE; - else - for (cp2 = arg+1; *cp2; cp2++) - if (! ISALNUM(*cp2) && *cp2 != '_') { - badvar = TRUE; - break; - } - if (badvar) { - if (do_lint) - lintwarn(_("invalid syntax in name `%s' for variable assignment"), arg); - *--cp = '='; /* restore original text of ARGV */ - return NULL; - } + if (cp == NULL) { + if (! initing) + return FALSE; /* This is file name, not assignment. */ + + fprintf(stderr, + _("%s: `%s' argument to `-v' not in `var=value' form\n\n"), + myname, arg); + usage(1, stderr); + } + *cp++ = '\0'; + + /* first check that the variable name has valid syntax */ + badvar = FALSE; + if (! ISALPHA(arg[0]) && arg[0] != '_') + badvar = TRUE; + else + for (cp2 = arg+1; *cp2; cp2++) + if (! ISALNUM(*cp2) && *cp2 != '_') { + badvar = TRUE; + break; + } + + if (badvar) { + if (initing) + fatal(_("`%s' is not a legal variable name"), arg); + + if (do_lint) + lintwarn(_("`%s' is not a variable name, looking for file `%s=%s'"), + arg, arg, cp); + } else { /* * Recent versions of nawk expand escapes inside assignments. * This makes sense, so we do it too. @@ -902,57 +979,18 @@ *lhs = it; if (after_assign != NULL) (*after_assign)(); - *--cp = '='; /* restore original text of ARGV */ } - return cp; -} - -/* pre_assign --- handle -v, print a message and die if a problem */ -static void -pre_assign(char *v) -{ - char *cp; - /* - * There is a problem when doing profiling. For -v x=y, - * the variable x gets installed into the symbol table pointing - * at the value in argv. This is what gets dumped. The string - * ends up containing the full x=y, leading to stuff in the profile - * of the form: - * - * if (x=y) ... - * - * Needless to say, this is gross, ugly and wrong. To fix, we - * malloc a private copy of the storage that we can tweak to - * our heart's content. - * - * This can't depend upon do_profiling; that variable isn't set up yet. - * Sigh. - */ - - emalloc(cp, char *, strlen(v) + 1, "pre_assign"); - strcpy(cp, v); + *--cp = '='; /* restore original text of ARGV */ - if (arg_assign(cp) == NULL) { - fprintf(stderr, - "%s: `%s' argument to `-v' not in `var=value' form\n", - myname, v); - usage(1, stderr); - } - - cp = strchr(cp, '='); - assert(cp); - *cp = '\0'; + return ! badvar; } /* catchsig --- catch signals */ -RETSIGTYPE -catchsig(int sig, int code) +static RETSIGTYPE +catchsig(int sig) { -#ifdef lint - code = 0; sig = code; code = sig; -#endif if (sig == SIGFPE) { fatal(_("floating point exception")); } else if (sig == SIGSEGV @@ -1028,11 +1066,16 @@ init_groupset() { #if defined(HAVE_GETGROUPS) && defined(NGROUPS_MAX) && NGROUPS_MAX > 0 +#ifdef GETGROUPS_NOT_STANDARD + /* For systems that aren't standards conformant, use old way. */ + ngroups = NGROUPS_MAX; +#else /* * If called with 0 for both args, return value is * total number of groups. */ ngroups = getgroups(0, NULL); +#endif if (ngroups == -1) fatal(_("could not find groups: %s"), strerror(errno)); else if (ngroups == 0) diff -urN gawk-3.1.1/missing gawk-3.1.2/missing --- gawk-3.1.1/missing 2000-11-22 15:54:56.000000000 +0200 +++ gawk-3.1.2/missing 2003-03-06 11:11:50.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -18,6 +18,11 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 @@ -25,6 +30,14 @@ run=: +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + case "$1" in --run) # Try to run requested program, and just exit if it succeeds. @@ -65,7 +78,7 @@ ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.3 - GNU automake" + echo "missing 0.4 - GNU automake" ;; -*) @@ -74,31 +87,46 @@ exit 1 ;; - aclocal) + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`configure.in'. You might want + you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`configure.in'. You might want to install the + you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`configure.in'. You might want + you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in` + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do @@ -111,10 +139,15 @@ touch $touch_files ;; - automake) + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | @@ -122,6 +155,34 @@ while read f; do touch "$f"; done ;; + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, and you do not seem to have it handy on your + system. You might have modified some files without having the + proper tools for further handling them. + You can get \`$1Help2man' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if @@ -176,6 +237,11 @@ ;; help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the @@ -196,6 +262,11 @@ ;; makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file @@ -222,23 +293,23 @@ # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then - gnutar ${1+"$@"} && exit 0 + gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then - gtar ${1+"$@"} && exit 0 + gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" ${1+"$@"} && exit 0 + tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" ${1+"$@"} && exit 0 + tar "$firstarg" "$@" && exit 0 ;; esac fi diff -urN gawk-3.1.1/missing_d/ChangeLog gawk-3.1.2/missing_d/ChangeLog --- gawk-3.1.1/missing_d/ChangeLog 2002-05-01 16:42:04.000000000 +0300 +++ gawk-3.1.2/missing_d/ChangeLog 2003-03-19 14:23:08.000000000 +0200 @@ -1,3 +1,24 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Mon Feb 3 20:37:09 2003 Pat Rankin + + * strftime.c: Restore use of TIME_T_IN_SYS_TYPES_H to control + inclusion of . + (TYPE_SIGNED): Add workaround to avoid diagnostic from Compaq C V6.4. + (my_strftime) [case 's']: Likewise; exclude negative number handling + if TIME_T_UNSIGNED is defined. + +Mon Jan 27 12:09:50 2003 Stepan Kasal + + * strtod.c (gawk_strtod): Cleanup, changing the logic + so that ptr is correct. Fixes the bug that 0e0 is not + recognized as numeric. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/missing_d/strftime.c gawk-3.1.2/missing_d/strftime.c --- gawk-3.1.1/missing_d/strftime.c 2001-12-24 14:00:59.000000000 +0200 +++ gawk-3.1.2/missing_d/strftime.c 2003-02-04 11:39:15.000000000 +0200 @@ -1,22 +1,21 @@ -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991-1999, 2000, 2001, 2002, 2003 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ #ifdef HAVE_CONFIG_H # include @@ -41,9 +40,9 @@ #endif #include -#ifdef TIME_T_IN_SYS_TYPES_H +#ifdef TIME_T_IN_SYS_TYPES #include /* Some systems define `time_t' here. */ -#endif /* HAVE_SYS_TYPES_H */ +#endif #ifdef TIME_WITH_SYS_TIME # include @@ -93,9 +92,6 @@ # endif #endif -#undef TOUPPER -#undef TOLOWER -#undef ISDIGIT #ifdef COMPILE_WIDE # include # define CHAR_T wchar_t @@ -152,8 +148,14 @@ # define NULL 0 #endif -#define TYPE_SIGNED(t) ((t) -1 < 0) +/* Test for checking whether a given type is signed or not. + Some compilers issue a diagnostic about suspicious construct for + a test that will always fail when comparing a value that can't be + negative against 0 using `<' or `<=' operator. */ +/* #define TYPE_SIGNED(t) ((t) -1 < 0) */ +#define TYPE_SIGNED(t) ((t) -1 < 1) +#ifndef INT_STRLEN_BOUND /* Bound on length of the string representing an integer value of type t. Subtract one for the sign bit if t is signed; 302 / 1000 is log10 (2) rounded up; @@ -161,6 +163,7 @@ add one more for a minus sign if t is signed. */ #define INT_STRLEN_BOUND(t) \ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 + 1 + TYPE_SIGNED (t)) +#endif #define TM_YEAR_BASE 1900 @@ -270,7 +273,7 @@ int _n = (n); \ int _delta = width - _n; \ int _incr = _n + (_delta > 0 ? _delta : 0); \ - if (i + _incr >= maxsize) \ + if ((size_t) _incr >= maxsize - i) \ return 0; \ if (p) \ { \ @@ -290,35 +293,80 @@ #define cpy(n, s) \ add ((n), \ if (to_lowcase) \ - memcpy_lowcase (p, (s), _n); \ + memcpy_lowcase (p, (s), _n LOCALE_ARG); \ else if (to_uppcase) \ - memcpy_uppcase (p, (s), _n); \ + memcpy_uppcase (p, (s), _n LOCALE_ARG); \ else \ MEMCPY ((PTR) p, (const PTR) (s), _n)) #ifdef COMPILE_WIDE +# ifndef USE_IN_EXTENDED_LOCALE_MODEL +# undef __mbsrtowcs_l +# define __mbsrtowcs_l(d, s, l, st, loc) __mbsrtowcs (d, s, l, st) +# endif # define widen(os, ws, l) \ { \ mbstate_t __st; \ const char *__s = os; \ memset (&__st, '\0', sizeof (__st)); \ - l = __mbsrtowcs (NULL, &__s, 0, &__st); \ + l = __mbsrtowcs_l (NULL, &__s, 0, &__st, loc); \ ws = alloca ((l + 1) * sizeof (wchar_t)); \ - (void) __mbsrtowcs (ws, &__s, l, &__st); \ + (void) __mbsrtowcs_l (ws, &__s, l, &__st, loc); \ } #endif +/* For gawk */ +#undef TOLOWER +#undef TOUPPER +#undef ISDIGIT + +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL +/* We use this code also for the extended locale handling where the + function gets as an additional argument the locale which has to be + used. To access the values we have to redefine the _NL_CURRENT + macro. */ +# define strftime __strftime_l +# define wcsftime __wcsftime_l +# undef _NL_CURRENT +# define _NL_CURRENT(category, item) \ + (current->values[_NL_ITEM_INDEX (item)].string) +# define LOCALE_PARAM , loc +# define LOCALE_ARG , loc +# define LOCALE_PARAM_DECL __locale_t loc; +# define LOCALE_PARAM_PROTO , __locale_t loc +# define HELPER_LOCALE_ARG , current +#else +# define LOCALE_PARAM +# define LOCALE_PARAM_PROTO +# define LOCALE_ARG +# define LOCALE_PARAM_DECL +# ifdef _LIBC +# define HELPER_LOCALE_ARG , _NL_CURRENT_DATA (LC_TIME) +# else +# define HELPER_LOCALE_ARG +# endif +#endif #ifdef COMPILE_WIDE -# define TOUPPER(Ch) towupper (Ch) -# define TOLOWER(Ch) towlower (Ch) +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __towupper_l (Ch, L) +# define TOLOWER(Ch, L) __towlower_l (Ch, L) +# else +# define TOUPPER(Ch, L) towupper (Ch) +# define TOLOWER(Ch, L) towlower (Ch) +# endif #else # ifdef _LIBC -# define TOUPPER(Ch) toupper (Ch) -# define TOLOWER(Ch) tolower (Ch) +# ifdef USE_IN_EXTENDED_LOCALE_MODEL +# define TOUPPER(Ch, L) __toupper_l (Ch, L) +# define TOLOWER(Ch, L) __tolower_l (Ch, L) +# else +# define TOUPPER(Ch, L) toupper (Ch) +# define TOLOWER(Ch, L) tolower (Ch) +# endif # else -# define TOUPPER(Ch) (islower (Ch) ? toupper (Ch) : (Ch)) -# define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) +# define TOUPPER(Ch, L) (islower (Ch) ? toupper (Ch) : (Ch)) +# define TOLOWER(Ch, L) (isupper (Ch) ? tolower (Ch) : (Ch)) # endif #endif /* We don't use `isdigit' here since the locale dependent @@ -328,30 +376,32 @@ #define ISDIGIT(Ch) ((unsigned int) (Ch) - L_('0') <= 9) static CHAR_T *memcpy_lowcase __P ((CHAR_T *dest, const CHAR_T *src, - size_t len)); + size_t len LOCALE_PARAM_PROTO)); static CHAR_T * -memcpy_lowcase (dest, src, len) +memcpy_lowcase (dest, src, len LOCALE_PARAM) CHAR_T *dest; const CHAR_T *src; size_t len; + LOCALE_PARAM_DECL { while (len-- > 0) - dest[len] = TOLOWER ((UCHAR_T) src[len]); + dest[len] = TOLOWER ((UCHAR_T) src[len], loc); return dest; } static CHAR_T *memcpy_uppcase __P ((CHAR_T *dest, const CHAR_T *src, - size_t len)); + size_t len LOCALE_PARAM_PROTO)); static CHAR_T * -memcpy_uppcase (dest, src, len) +memcpy_uppcase (dest, src, len LOCALE_PARAM) CHAR_T *dest; const CHAR_T *src; size_t len; + LOCALE_PARAM_DECL { while (len-- > 0) - dest[len] = TOUPPER ((UCHAR_T) src[len]); + dest[len] = TOUPPER ((UCHAR_T) src[len], loc); return dest; } @@ -426,49 +476,42 @@ #endif -/* When compiling this file, GNU applications can #define my_strftime - to a symbol (typically nstrftime) to get an extended strftime with - extra arguments UT and NS. Emacs is a special case for now, but - this Emacs-specific code can be removed once Emacs's config.h - defines my_strftime. */ -#if defined emacs && !defined my_strftime -# define my_strftime nstrftime -#endif - -#ifdef my_strftime -# define extra_args , ut, ns -# define extra_args_spec int ut; int ns; -# define extra_args_spec_iso , int ut, int ns +#ifdef emacs +# define my_strftime emacs_strftimeu +# define ut_argument , ut +# define ut_argument_spec int ut; +# define ut_argument_spec_iso , int ut #else # ifdef COMPILE_WIDE # define my_strftime wcsftime +# define nl_get_alt_digit _nl_get_walt_digit # else # define my_strftime strftime +# define nl_get_alt_digit _nl_get_alt_digit # endif -# define extra_args -# define extra_args_spec -# define extra_args_spec_iso +# define ut_argument +# define ut_argument_spec +# define ut_argument_spec_iso /* We don't have this information in general. */ # define ut 0 -# define ns 0 #endif #if !defined _LIBC && HAVE_TZNAME && HAVE_TZSET /* Solaris 2.5 tzset sometimes modifies the storage returned by localtime. Work around this bug by copying *tp before it might be munged. */ size_t _strftime_copytm __P ((char *, size_t, const char *, - const struct tm * extra_args_spec_iso)); + const struct tm * ut_argument_spec_iso)); size_t - my_strftime (s, maxsize, format, tp extra_args) + my_strftime (s, maxsize, format, tp ut_argument) CHAR_T *s; size_t maxsize; const CHAR_T *format; const struct tm *tp; - extra_args_spec + ut_argument_spec { struct tm tmcopy; tmcopy = *tp; - return _strftime_copytm (s, maxsize, format, &tmcopy extra_args); + return _strftime_copytm (s, maxsize, format, &tmcopy ut_argument); } # undef my_strftime # define my_strftime _strftime_copytm @@ -482,13 +525,18 @@ anywhere, so to determine how many characters would be written, use NULL for S and (size_t) UINT_MAX for MAXSIZE. */ size_t -my_strftime (s, maxsize, format, tp extra_args) +my_strftime (s, maxsize, format, tp ut_argument LOCALE_PARAM) CHAR_T *s; size_t maxsize; const CHAR_T *format; const struct tm *tp; - extra_args_spec + ut_argument_spec + LOCALE_PARAM_DECL { +#if defined _LIBC && defined USE_IN_EXTENDED_LOCALE_MODEL + struct locale_data *const current = loc->__locales[LC_TIME]; +#endif + int hour12 = tp->tm_hour; #ifdef _NL_CURRENT /* We cannot make the following values variables since we must delay @@ -551,9 +599,8 @@ } else { - /* POSIX.1 8.1.1 requires that whenever strftime() is called, the - time zone names contained in the external variable `tzname' shall - be set as if the tzset() function had been called. */ + /* POSIX.1 requires that local time zone information is used as + though strftime called tzset. */ # if HAVE_TZSET tzset (); # endif @@ -704,8 +751,15 @@ width = 0; do { - width *= 10; - width += *f - L_('0'); + if (width > INT_MAX / 10 + || (width == INT_MAX / 10 && *f - L_('0') > INT_MAX % 10)) + /* Avoid overflow. */ + width = INT_MAX; + else + { + width *= 10; + width += *f - L_('0'); + } ++f; } while (ISDIGIT (*f)); @@ -729,10 +783,10 @@ switch (format_char) { #define DO_NUMBER(d, v) \ - digits = width == -1 ? d : width; \ + digits = d > width ? d : width; \ number_value = v; goto do_number #define DO_NUMBER_SPACEPAD(d, v) \ - digits = width == -1 ? d : width; \ + digits = d > width ? d : width; \ number_value = v; goto do_number_spacepad case L_('%'): @@ -772,7 +826,7 @@ #endif case L_('b'): - case L_('h'): /* POSIX.2 extension. */ + case L_('h'): if (change_case) { to_uppcase = 1; @@ -824,14 +878,14 @@ { CHAR_T *old_start = p; size_t len = my_strftime (NULL, (size_t) -1, subfmt, - tp extra_args); + tp ut_argument LOCALE_ARG); add (len, my_strftime (p, maxsize - i, subfmt, - tp extra_args)); + tp ut_argument LOCALE_ARG)); if (to_uppcase) while (old_start < p) { - *old_start = TOUPPER ((UCHAR_T) *old_start); + *old_start = TOUPPER ((UCHAR_T) *old_start, loc); ++old_start; } } @@ -867,13 +921,13 @@ break; #endif - case L_('C'): /* POSIX.2 extension. */ + case L_('C'): if (modifier == L_('O')) goto bad_format; if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp); + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE @@ -914,7 +968,7 @@ /* Fall through. */ # endif #endif - case L_('D'): /* POSIX.2 extension. */ + case L_('D'): if (modifier != 0) goto bad_format; subfmt = L_("%m/%d/%y"); @@ -926,7 +980,7 @@ DO_NUMBER (2, tp->tm_mday); - case L_('e'): /* POSIX.2 extension. */ + case L_('e'): if (modifier == L_('E')) goto bad_format; @@ -948,11 +1002,8 @@ #ifdef _NL_CURRENT /* Get the locale specific alternate representation of the number NUMBER_VALUE. If none exist NULL is returned. */ -# ifdef COMPILE_WIDE - const wchar_t *cp = _nl_get_walt_digit (number_value); -# else - const char *cp = _nl_get_alt_digit (number_value); -# endif + const CHAR_T *cp = nl_get_alt_digit (number_value + HELPER_LOCALE_ARG); if (cp != NULL) { @@ -992,18 +1043,37 @@ int padding = digits - (buf + (sizeof (buf) / sizeof (buf[0])) - bufp); - if (pad == L_('_')) + if (padding > 0) { - while (0 < padding--) - *--bufp = L_(' '); - } - else - { - bufp += negative_number; - while (0 < padding--) - *--bufp = L_('0'); - if (negative_number) - *--bufp = L_('-'); + if (pad == L_('_')) + { + if ((size_t) padding >= maxsize - i) + return 0; + + if (p) + memset_space (p, padding); + i += padding; + width = width > padding ? width - padding : 0; + } + else + { + if ((size_t) digits >= maxsize - i) + return 0; + + if (negative_number) + { + ++bufp; + + if (p) + *p++ = L_('-'); + ++i; + } + + if (p) + memset_zero (p, padding); + i += padding; + width = 0; + } } } @@ -1058,22 +1128,7 @@ DO_NUMBER (2, tp->tm_mon + 1); - case L_('N'): /* GNU extension. */ - if (modifier == L_('E')) - goto bad_format; - - number_value = ns; - if (width != -1) - { - /* Take an explicit width less than 9 as a precision. */ - int j; - for (j = width; j < 9; j++) - number_value /= 10; - } - - DO_NUMBER (9, number_value); - - case L_('n'): /* POSIX.2 extension. */ + case L_('n'): add (1, *p = L_('\n')); break; @@ -1097,11 +1152,11 @@ goto underlying_strftime; #endif - case L_('R'): /* ISO C99 extension. */ + case L_('R'): subfmt = L_("%H:%M"); goto subformat; - case L_('r'): /* POSIX.2 extension. */ + case L_('r'): #ifdef _NL_CURRENT if (*(subfmt = (const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(T_FMT_AMPM))) @@ -1128,13 +1183,16 @@ this works even if sizeof (long) < sizeof (time_t). */ bufp = buf + sizeof (buf) / sizeof (buf[0]); +#ifndef TIME_T_UNSIGNED negative_number = t < 0; +#endif do { int d = t % 10; t /= 10; +#ifndef TIME_T_UNSIGNED if (negative_number) { d = -d; @@ -1146,6 +1204,7 @@ d += 10; } } +#endif *--bufp = d + L_('0'); } @@ -1172,15 +1231,15 @@ /* Fall through. */ # endif #endif - case L_('T'): /* POSIX.2 extension. */ + case L_('T'): subfmt = L_("%H:%M:%S"); goto subformat; - case L_('t'): /* POSIX.2 extension. */ + case L_('t'): add (1, *p = L_('\t')); break; - case L_('u'): /* POSIX.2 extension. */ + case L_('u'): DO_NUMBER (1, (tp->tm_wday - 1 + 7) % 7 + 1); case L_('U'): @@ -1190,8 +1249,8 @@ DO_NUMBER (2, (tp->tm_yday - tp->tm_wday + 7) / 7); case L_('V'): - case L_('g'): /* ISO C99 extension. */ - case L_('G'): /* ISO C99 extension. */ + case L_('g'): + case L_('G'): if (modifier == L_('E')) goto bad_format; { @@ -1246,7 +1305,7 @@ if (modifier == 'E') { #if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp); + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { # ifdef COMPILE_WIDE @@ -1271,7 +1330,7 @@ if (modifier == L_('E')) { #if HAVE_STRUCT_ERA_ENTRY - struct era_entry *era = _nl_get_era_entry (tp); + struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG); if (era) { int delta = tp->tm_year - era->start_date[0]; @@ -1299,7 +1358,7 @@ zone = tzname[tp->tm_isdst]; #endif if (! zone) - zone = ""; /* POSIX.2 requires the empty string here. */ + zone = ""; #ifdef COMPILE_WIDE { @@ -1315,7 +1374,7 @@ #endif break; - case L_('z'): /* ISO C99 extension. */ + case L_('z'): if (tp->tm_isdst < 0) break; @@ -1393,19 +1452,22 @@ *p = L_('\0'); return i; } +#ifdef _LIBC +libc_hidden_def (my_strftime) +#endif #ifdef emacs /* For Emacs we have a separate interface which corresponds to the normal - strftime function plus the ut argument, but without the ns argument. */ + strftime function and does not have the extra information whether the + TP arguments comes from a `gmtime' call or not. */ size_t -emacs_strftimeu (s, maxsize, format, tp, ut) +emacs_strftime (s, maxsize, format, tp) char *s; size_t maxsize; const char *format; const struct tm *tp; - int ut; { - return my_strftime (s, maxsize, format, tp, ut, 0); + return my_strftime (s, maxsize, format, tp, 0); } #endif diff -urN gawk-3.1.1/missing_d/strtod.c gawk-3.1.2/missing_d/strtod.c --- gawk-3.1.1/missing_d/strtod.c 2001-08-03 08:57:42.000000000 +0300 +++ gawk-3.1.2/missing_d/strtod.c 2003-01-27 11:53:29.000000000 +0200 @@ -1,6 +1,7 @@ /* - * strtod.c - * + * gawk wrapper for strtod + */ +/* * Stupid version of System V strtod(3) library routine. * Does no overflow/underflow checking. * @@ -25,6 +26,8 @@ * * Summer 2001. Try to make it smarter, so that a string like "0000" * doesn't look like we failed. Sigh. + * + * Xmass 2002. Fix a bug in ptr determination, eg. for "0e0". */ #if 0 @@ -38,76 +41,68 @@ register const char *s; register const char **ptr; { - double ret = 0.0; const char *start = s; /* save original start of string */ const char *begin = NULL; /* where the number really begins */ - int success = 0; + int dig = 0; + int dig0 = 0; /* optional white space */ while (isspace(*s)) s++; + begin = s; + /* optional sign */ - if (*s == '+' || *s == '-') { + if (*s == '+' || *s == '-') s++; - if (*(s-1) == '-') - begin = s - 1; - else - begin = s; - } /* string of digits with optional decimal point */ - if (isdigit(*s) && ! begin) - begin = s; - + while (*s == '0') { + s++; + dig0++; + } while (isdigit(*s)) { - /* don't succeed on 0x... */ - if (*s > '0') - success++; s++; + dig++; } if (*s == '.') { - if (! begin) - begin = s; s++; - while (isdigit(*s)) + while (*s == '0') { s++; - success++; + dig0++; + } + while (isdigit(*s)) { + s++; + dig++; + } } - if (s == start || success == 0) /* nothing there */ - goto out; + dig0 += dig; /* any digit has appeared */ /* * optional 'e' or 'E' - * followed by optional sign or space + * if a digit (or at least zero) was seen + * followed by optional sign * followed by an integer */ - - if ((*s == 'e' || *s == 'E') + if (dig0 + && (*s == 'e' || *s == 'E') && (isdigit(s[1]) - || ((s[1] == '-' || s[1] == '+') && isdigit(s[2])))) { + || ((s[1] == '-' || s[1] == '+') && isdigit(s[2])))) { s++; - if (*s == '+' || *s == '-') s++; - while (isdigit(*s)) s++; } - /* go for it */ - ret = atof(begin); - -out: - if (! success && s == begin) - s = start; /* in case all we did was skip whitespace */ - + /* In case we haven't found a number, set ptr to start. */ if (ptr) - *ptr = s; + *ptr = (dig0 ? s : start); - return ret; + /* Go for it. */ + return (dig ? atof(begin) : 0.0); } #ifdef TEST diff -urN gawk-3.1.1/msg.c gawk-3.1.2/msg.c --- gawk-3.1.1/msg.c 2001-01-21 17:44:50.000000000 +0200 +++ gawk-3.1.2/msg.c 2003-02-05 14:17:43.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -28,12 +28,9 @@ int sourceline = 0; char *source = NULL; -static char *srcfile = NULL; +static const char *srcfile = NULL; static int srcline; -/* prototype needed for ansi / gcc */ -void err P((const char *s, const char *emsg, va_list argp)); - /* err --- print an error message with source line and file and record */ /* VARARGS2 */ @@ -65,7 +62,7 @@ (void) fprintf(stderr, "FILENAME=%s ", file); (void) fprintf(stderr, "FNR=%ld) ", FNR); } - (void) fprintf(stderr, s); + (void) fprintf(stderr, "%s", s); vfprintf(stderr, emsg, argp); (void) fprintf(stderr, "\n"); (void) fflush(stderr); @@ -80,7 +77,7 @@ void #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ - msg(char *mesg, ...) + msg(const char *mesg, ...) #else /*VARARGS0*/ msg(va_alist) @@ -104,7 +101,7 @@ void #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ - warning(char *mesg, ...) + warning(const char *mesg, ...) #else /*VARARGS0*/ warning(va_alist) @@ -126,7 +123,7 @@ void #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ - error(char *mesg, ...) + error(const char *mesg, ...) #else /*VARARGS0*/ error(va_alist) @@ -149,17 +146,20 @@ /* set_loc --- set location where a fatal error happened */ void -set_loc(char *file, int line) +set_loc(const char *file, int line) { srcfile = file; srcline = line; + + /* This stupid line keeps some compilers happy: */ + file = srcfile; line = srcline; } /* fatal --- print an error message and die */ void #if defined(HAVE_STDARG_H) && defined(__STDC__) && __STDC__ - r_fatal(char *mesg, ...) + r_fatal(const char *mesg, ...) #else /*VARARGS0*/ r_fatal(va_alist) diff -urN gawk-3.1.1/node.c gawk-3.1.2/node.c --- gawk-3.1.1/node.c 2001-10-04 18:48:19.000000000 +0200 +++ gawk-3.1.2/node.c 2003-02-22 23:10:14.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-2001 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-2001, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -42,16 +42,16 @@ cant_happen(); if (n->type != Node_val) cant_happen(); - if(n->flags == 0) + if (n->flags == 0) cant_happen(); - if (n->flags & NUM) + if (n->flags & NUMCUR) return n->numbr; #endif /* all the conditionals are an attempt to avoid the expensive strtod */ n->numbr = 0.0; - n->flags |= NUM; + n->flags |= NUMCUR; n->flags &= ~UNINITIALIZED; if (n->stlen == 0) { @@ -125,7 +125,7 @@ * (more complicated) variations on this theme didn't seem to pay off, but * systematic testing might be in order at some point */ -static const char *values[] = { +static const char *const values[] = { "0", "1", "2", @@ -142,7 +142,7 @@ /* format_val --- format a numeric value based on format */ NODE * -format_val(char *format, int index, register NODE *s) +format_val(const char *format, int index, register NODE *s) { char buf[BUFSIZ]; register char *sp = buf; @@ -210,7 +210,7 @@ memcpy(s->stptr, sp, s->stlen+1); no_malloc: s->stref = 1; - s->flags |= STR; + s->flags |= STRCUR; s->flags &= ~UNINITIALIZED; return s; } @@ -228,7 +228,7 @@ cant_happen(); if (s->stref <= 0) cant_happen(); - if ((s->flags & STR) != 0 + if ((s->flags & STRCUR) != 0 && (s->stfmt == -1 || s->stfmt == CONVFMTidx)) return s; #endif @@ -244,10 +244,11 @@ */ NODE * -dupnode(NODE *n) +r_dupnode(NODE *n) { register NODE *r; +#ifndef DUPNODE_MACRO if ((n->flags & TEMP) != 0) { n->flags &= ~TEMP; n->flags |= MALLOC; @@ -255,20 +256,34 @@ } if ((n->flags & PERM) != 0) return n; - if ((n->flags & (MALLOC|STR)) == (MALLOC|STR)) { +#endif + if ((n->flags & (MALLOC|STRCUR)) == (MALLOC|STRCUR)) { if (n->stref < LONG_MAX) n->stref++; + else + n->flags |= PERM; + return n; + } else if ((n->flags & MALLOC) != 0 && n->type == Node_ahash) { + if (n->ahname_ref < LONG_MAX) + n->ahname_ref++; + else + n->flags |= PERM; return n; } getnode(r); *r = *n; r->flags &= ~(PERM|TEMP|FIELD); r->flags |= MALLOC; - if (n->type == Node_val && (n->flags & STR) != 0) { + if (n->type == Node_val && (n->flags & STRCUR) != 0) { r->stref = 1; emalloc(r->stptr, char *, r->stlen + 2, "dupnode"); memcpy(r->stptr, n->stptr, r->stlen); r->stptr[r->stlen] = '\0'; + } else if (n->type == Node_ahash && (n->flags & MALLOC) != 0) { + r->ahname_ref = 1; + emalloc(r->ahname_str, char *, r->ahname_len + 2, "dupnode"); + memcpy(r->ahname_str, n->ahname_str, r->ahname_len); + r->stptr[r->ahname_len] = '\0'; } return r; } @@ -311,13 +326,13 @@ /* make_str_node --- make a string node */ NODE * -make_str_node(char *s, size_t len, int flags) +make_str_node(char *s, unsigned long len, int flags) { register NODE *r; getnode(r); r->type = Node_val; - r->flags = (STRING|STR|MALLOC|SCALAR); + r->flags = (STRING|STRCUR|MALLOC|SCALAR); if (flags & ALREADY_MALLOCED) r->stptr = s; else { @@ -327,10 +342,10 @@ r->stptr[len] = '\0'; if ((flags & SCAN) != 0) { /* scan for escape sequences */ - char *pf; + const char *pf; register char *ptm; register int c; - register char *end; + register const char *end; end = &(r->stptr[len]); for (pf = ptm = r->stptr; pf < end;) { @@ -432,10 +447,15 @@ return; tmp->flags &= ~TEMP; if ((tmp->flags & MALLOC) != 0) { - if ((tmp->flags & STR) != 0) { + if (tmp->type == Node_ahash) { + if (tmp->ahname_ref > 1) { + tmp->ahname_ref--; + return; + } + free(tmp->ahname_str); + } else if ((tmp->flags & STRCUR) != 0) { if (tmp->stref > 1) { - if (tmp->stref != LONG_MAX) - tmp->stref--; + tmp->stref--; return; } free(tmp->stptr); @@ -469,7 +489,7 @@ */ int -parse_escape(char **string_ptr) +parse_escape(const char **string_ptr) { register int c = *(*string_ptr)++; register int i; diff -urN gawk-3.1.1/patchlev.h gawk-3.1.2/patchlev.h --- gawk-3.1.1/patchlev.h 2002-04-30 18:54:24.000000000 +0300 +++ gawk-3.1.2/patchlev.h 2003-03-16 12:25:55.000000000 +0200 @@ -1 +1 @@ -#define PATCHLEVEL "1" +#define PATCHLEVEL "2" diff -urN gawk-3.1.1/pc/ChangeLog gawk-3.1.2/pc/ChangeLog --- gawk-3.1.1/pc/ChangeLog 2002-05-01 16:42:07.000000000 +0300 +++ gawk-3.1.2/pc/ChangeLog 2003-03-19 14:23:15.000000000 +0200 @@ -1,3 +1,30 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Sun Feb 23 16:25:44 2003 Scott Deifik + + * Makefile, Makefile.tst: Synchronized to main dist. + +Sun Feb 16 15:44:20 2003 Scott Deifik + + * config.h: Updated. + +Sun Feb 9 11:57:11 2003 Scott Deifik + + * Makefile, Makefile.tst: Synchronized to main dist. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Sun Nov 24 18:37:31 2002 Scott Deifik + + * Makefile, Makefile.tst: Synchronized to main dist. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/pc/Makefile gawk-3.1.2/pc/Makefile --- gawk-3.1.1/pc/Makefile 2001-12-19 15:56:30.000000000 +0200 +++ gawk-3.1.2/pc/Makefile 2003-03-19 14:49:23.000000000 +0200 @@ -189,7 +189,8 @@ # Optimization and library options: # Os == optimize for size, Ot == optimize for speed, G2 == 286 or better #MSCOPT = -Gt3600 -Os -G2 -MSCOPT = -Gt3600 -Ot # -G2 +# MSC seems to be more stable with -Od than with -Ot. +MSCOPT = -Gt3600 -Od # -G2 # Alternate lib, does not use math coprocessor. #MSCLIB = llibca #MSCCL = -FPa @@ -305,7 +306,7 @@ # LIBOBJS # GNU and other stuff that gawk uses as library routines. -LIBOBJS= getopt$O getopt1$O regex$O dfa$O random$O +LIBOBJS= getopt$O getopt1$O regex$O random$O GAWKOBJS = $(ALLOBJS) $(LIBOBJS) PGAWKOBJS = $(PAWKOBJS1) $(PAWKOBJS2) awkgram$O getid$O $(OBJ) @@ -338,7 +339,7 @@ echo $(PAWKOBJS2)$P >> $@ echo awkgram$O getid$O $(OBJ) $(LIBOBJS)$P >> $@ -$(ALLOBJS) eval_p$O profile_p$O: awk.h dfa.h regex.h config.h +$(ALLOBJS) eval_p$O profile_p$O: awk.h regex.h config.h gawkmisc$O: pc/gawkmisc.pc diff -urN gawk-3.1.1/pc/Makefile.tst gawk-3.1.2/pc/Makefile.tst --- gawk-3.1.1/pc/Makefile.tst 2002-04-18 17:28:55.000000000 +0300 +++ gawk-3.1.2/pc/Makefile.tst 2003-03-19 14:59:18.000000000 +0200 @@ -1,6 +1,6 @@ # Makefile for GNU Awk test suite. # -# Copyright (C) 1988-2002 the Free Software Foundation, Inc. +# Copyright (C) 1988-2003 the Free Software Foundation, Inc. # # This file is part of GAWK, the GNU implementation of the # AWK Programming Language. @@ -64,6 +64,7 @@ # Also point to gawk but for DOS commands needing backslashes. We need # the forward slash version too or 'arrayparam' fails. AWK2 = '..\gawk.exe' +AWKPROG = ../gawk.exe # Set your cmp command here (you can use most versions of diff instead of cmp # if you don't want to convert the .ok files to the DOS CR/LF format). @@ -101,46 +102,73 @@ #DATE = date DATE = gdate +# MS-DOS and OS/2 use ; as a PATH delimiter +PATH_SEPARATOR = ; + # ============================================================================ # You shouldn't need to modify anything below this line. # ============================================================================ srcdir = . +# try to keep these sorted +BASIC_TESTS = addcomma anchgsub argarray arrayparm arrayref arrymem1 arynasty \ + arynocls arysubnm asgext awkpath back89 backgsub childin clobber \ + clsflnam compare compare2 concat1 convfmt datanonl defref delarprm \ + dynlj eofsplit fldchg fldchgnf fnamedat fnarray fnarydel fnaryscl \ + fnasgnm fnmisc fnparydl forsimp fsbs fsrs fstabplus funsemnl funsmnam \ + funstack getline getline2 getline3 getlnbuf getnr2tb getnr2tm gsubasgn gsubtest \ + gsubtst2 gsubtst3 gsubtst4 hsprint inputred intest intprec leaddig leadnl \ + litoct longsub longwrds math membug1 messages minusstr mmap8k \ + nasty nasty2 negexp nfldstr nfneg nfset nlfldsep nlinstr nlstrina \ + noeffect nofmtch noloop1 noloop2 nonl noparms nors nulrsend \ + numindex numsubstr octsub ofmt ofmtbig ofmtfidl ofmts onlynl \ + opasnidx opasnslf paramdup paramtyp parseme pcntplus prdupval prec \ + printf0 printf1 prmarscl prmreuse prt1eval prtoeval psx96sub rand rebt8b1 \ + rebt8b2 redfilnm regeq reindops reparse resplit rs rsnul1nl \ + rstest1 rstest2 rswhite sclforin sclifin splitargv splitarr splitdef \ + splitvar splitwht sprintfc strtod subslash substr swaplns synerr1 \ + tradanch tweakfld uninitialized uninit2 zeroe0 zeroflag + + +UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng + +GAWK_EXT_TESTS = argtest asort asorti badargs clos1way fieldwdth fsfwfs \ + gensub gnuops2 gnureops icasefs icasers igncdym igncfs ignrcase lint \ + match1 manyfiles nondec posix procinfs regx8bit rebuf reint shadow \ + sort1 strftime + + +EXTRA_TESTS = regtest inftest + +INET_TESTS = inetechu inetecht inetdayu inetdayt + +# List of the tests which should be run with --lint option: +NEED_LINT = defref noeffect nofmtch shadow uninitialized uninit2 + +# List of the files that appear in manual tests or are for reserve testing: +GENTESTS_UNUSED = Makefile.in gtlnbufv.awk printfloat.awk + # message stuff is to make it a little easier to follow check: msg \ basic-msg-start basic basic-msg-end \ unix-msg-start unix-tests unix-msg-end \ - extend-msg-start gawk-extensions extend-msg-end + extend-msg-start gawk-extensions extend-msg-end \ + pass-fail -# try to keep these sorted -basic: addcomma anchgsub argarray arrayparm arrayref arynasty arynocls \ - arysubnm arrymem1 asgext awkpath back89 backgsub childin clobber \ - clsflnam compare compare2 concat1 convfmt datanonl defref delarprm dynlj eofsplit \ - fldchg fldchgnf fnamedat fnarray fnarydel fnaryscl fnasgnm \ - fnparydl forsimp fsbs fsrs fstabplus funsemnl funsmnam funstack getline \ - getlnbuf getnr2tb getnr2tm gsubasgn gsubtest hsprint intest \ - intprec leaddig leadnl litoct longsub longwrds math membug1 messages minusstr \ - mmap8k nasty nasty2 negexp nfldstr nfset nlfldsep nlinstr nlstrina \ - noeffect nofmtch nonl noparms nors numindex numsubstr octsub \ - ofmt ofmtbig ofmtfidl ofmts onlynl opasnidx opasnslf paramdup paramtyp \ - parseme pcntplus prdupval printf1 prmarscl prmreuse prt1eval \ - prtoeval psx96sub rand rebt8b1 rebt8b2 redfilnm regeq reindops \ - reparse resplit rs rsnul1nl rswhite sclforin sclifin splitargv \ - splitdef splitvar splitwht sprintfc strtod subslash substr \ - swaplns tradanch tweakfld zeroflag - -unix-tests: fflush getlnhd pid pipeio1 pipeio2 poundba strftlng - -gawk-extensions: argtest badargs clos1way fieldwdth fsfwfs gensub \ - gnuops2 gnureops igncdym igncfs ignrcase lint manyfiles nondec \ - posix procinfs regx8bit reint shadow sort1 strftime +basic: $(BASIC_TESTS) + +unix-tests: $(UNIX_TESTS) -extra: regtes inftest inet +gawk-extensions: $(GAWK_EXT_TESTS) -inet: inetmesg inetechu inetecht inetdayu inetdayt +#extra: $(EXTRA_TESTS) inet +extra: $(EXTRA_TESTS) inetmesg + +inet: inetmesg $(INET_TESTS) msg:: + @echo '' @echo 'Any output from "cmp" is bad news, although some differences' @echo 'in floating point values are probably benign -- in particular,' @echo 'some systems may omit a leading zero and the floating point' @@ -165,734 +193,966 @@ @echo "======== Done with gawk extension tests ========" # This test is a PITA because increasingly, /tmp is getting -# mounted noexec. So, we'll test it. Sigh. -poundba:: -# @cp $(AWK) /tmp/gawk - @$(CP) $(AWK2) '\tmp\gawk.exe' -# @if /tmp/gawk 'BEGIN { print "OK" }' | grep OK > /dev/null ; \ -# then \ -# $(srcdir)/poundbang.awk $(srcdir)/poundbang.awk >_`basename $@` ; \ -# $(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` && echo poundbang is ok ; \ -# else \ -# echo "*** /tmp is apparently mounted noexec, skipping poundbang test." ; \ -# fi - @if /tmp/gawk 'BEGIN { print "OK" }' | grep OK > NUL ; \ - then \ - $(srcdir)/poundbang.awk $(srcdir)/poundbang.awk >_`basename $@` ; \ - $(CMP) $(srcdir)/poundbang.ok _`basename $@` && rm -f _`basename $@` && echo poundbang is ok ; \ +# mounted noexec. So, we'll test it locally. Sigh. +# +# More PITA; some systems have medium short limits on #! paths, +# so this can still fail +poundbang:: + @echo $@ + @sed "s;/tmp/gawk;`pwd`/$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk + @chmod +x ./_pbd.awk + @if ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@` ; \ + then : ; \ else \ - echo "*** /tmp is apparently mounted noexec, skipping poundbang test." ; \ + sed "s;/tmp/gawk;../$(AWKPROG);" < $(srcdir)/poundbang.awk > ./_pbd.awk ; \ + chmod +x ./_pbd.awk ; \ + ./_pbd.awk $(srcdir)/poundbang.awk > _`basename $@`; \ fi -# @rm -f /tmp/gawk - @rm -f /tmp/gawk.exe - -swaplns:: - @$(AWK) -f $(srcdir)/swaplns.awk $(srcdir)/swaplns.in >_$@ - -$(CMP) $(srcdir)/swaplns.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/poundbang.awk _`basename $@` && rm -f _`basename $@` _pbd.awk messages:: + @echo $@ @$(AWK) -f $(srcdir)/messages.awk >out2 2>out3 - -$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 + @-$(CMP) $(srcdir)/out1.ok out1 && $(CMP) $(srcdir)/out2.ok out2 && $(CMP) $(srcdir)/out3.ok out3 && rm -f out1 out2 out3 argarray:: + @echo $@ @case $(srcdir) in \ .) : ;; \ *) cp $(srcdir)/argarray.in . ;; \ esac @TEST=test echo just a test | $(AWK) -f $(srcdir)/argarray.awk ./argarray.in - >_$@ - -$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ - -fstabplus:: - @echo '1 2' | $(AWK) -f $(srcdir)/fstabplus.awk >_$@ - -$(CMP) $(srcdir)/fstabplus.ok _$@ && rm -f _$@ - -fsrs:: - @$(AWK) -f $(srcdir)/fsrs.awk $(srcdir)/fsrs.in >_$@ - -$(CMP) $(srcdir)/fsrs.ok _$@ && rm -f _$@ - -igncfs:: - @$(AWK) -f $(srcdir)/igncfs.awk $(srcdir)/igncfs.in >_$@ - -$(CMP) $(srcdir)/igncfs.ok _$@ && rm -f _$@ - -longwrds:: - @$(AWK) -f $(srcdir)/longwrds.awk $(srcdir)/manpage | (LC_ALL=C sort) >_$@ - -$(CMP) $(srcdir)/longwrds.ok _$@ && rm -f _$@ - -fieldwdth:: - @echo '123456789' | $(AWK) -v FIELDWIDTHS="2 3 4" '{ print $$2}' >_$@ - -$(CMP) $(srcdir)/fieldwdth.ok _$@ && rm -f _$@ - -ignrcase:: - @echo xYz | $(AWK) -v IGNORECASE=1 '{ sub(/y/, ""); print}' >_$@ - -$(CMP) $(srcdir)/ignrcase.ok _$@ && rm -f _$@ + @case $(srcdir) in \ + .) : ;; \ + *) rm -f ./argarray.in ;; \ + esac + @-$(CMP) $(srcdir)/argarray.ok _$@ && rm -f _$@ -regtes:: +regtest:: @echo 'Some of the output from regtest is very system specific, do not' @echo 'be distressed if your output differs from that distributed.' @echo 'Manual inspection is called for.' -# AWK=`pwd`/$(AWK) $(srcdir)/regtest.sh - AWK=`pwd`/$(AWK) CMP="$(CMP)" $(srcdir)/regtest.sh - -posix:: - @echo 'posix test may fail due to 1.500000e+000 not being equal to' - @echo '1.500000e+00 for MSC gawk.' - @echo '1:2,3 4' | $(AWK) -f $(srcdir)/posix.awk >_$@ - -$(CMP) $(srcdir)/posix.ok _$@ && rm -f _$@ + AWK=`pwd`/$(AWK) $(srcdir)/regtest.sh manyfiles:: + @echo manyfiles @rm -rf junk -# @mkdir junk - @$(MKDIR) junk + @mkdir junk @$(AWK) 'BEGIN { for (i = 1; i <= 300; i++) print i, i}' >_$@ @$(AWK) -f $(srcdir)/manyfiles.awk _$@ _$@ - @echo 'If manyfiles says "junk/*: No such file or directory",' - @echo 'use the line on test/Makefile which invokes wc' - @echo 'without quoting the "junk/*" argument.' - @echo "This number better be 1 ->" | tr -d '\012\015' - @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l -# @wc -l "junk/*" | $(AWK) '$$1 != 2' | wc -l -# The quotes above are for people with a "wc" that doesn't too long a command -# line. - @rm -rf junk _$@ + @wc -l junk/* | $(AWK) '$$1 != 2' | wc -l | sed 's/ *//g' > _$@ + @rm -rf junk ; $(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ compare:: + @echo $@ @$(AWK) -f $(srcdir)/compare.awk 0 1 $(srcdir)/compare.in >_$@ - -$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ - -arrayref:: - @$(AWK) -f $(srcdir)/arrayref.awk >_$@ - -$(CMP) $(srcdir)/arrayref.ok _$@ && rm -f _$@ - -rs:: - @$(AWK) -v RS="" '{ print $$1, $$2}' $(srcdir)/rs.in >_$@ - -$(CMP) $(srcdir)/rs.ok _$@ && rm -f _$@ - -fsbs:: - @$(AWK) -v FS='\' '{ print $$1, $$2 }' $(srcdir)/fsbs.in >_$@ - -$(CMP) $(srcdir)/fsbs.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/compare.ok _$@ && rm -f _$@ inftest:: + @echo $@ @echo This test is very machine specific... - @echo 'Both MSC 7.0 and 8.0 gawk generate a floating point exception.' - @echo 'EMX gawk uses #INF rather than Inf.' -# @$(AWK) -f $(srcdir)/inftest.awk >_$@ - @-$(AWK) -f $(srcdir)/inftest.awk >_$@ - -$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ - -getline:: - @$(AWK) -f $(srcdir)/getline.awk $(srcdir)/getline.awk $(srcdir)/getline.awk >_$@ - -$(CMP) $(srcdir)/getline.ok _$@ && rm -f _$@ - -rand:: - @$(AWK) -f $(srcdir)/rand.awk >_$@ - -$(CMP) $(srcdir)/rand.ok _$@ && rm -f _$@ - -negexp:: - @$(AWK) 'BEGIN { a = -2; print 10^a }' >_$@ - -$(CMP) $(srcdir)/negexp.ok _$@ && rm -f _$@ - -asgext:: - @$(AWK) -f $(srcdir)/asgext.awk $(srcdir)/asgext.in >_$@ - -$(CMP) $(srcdir)/asgext.ok _$@ && rm -f _$@ - -anchgsub:: - @$(AWK) -f $(srcdir)/anchgsub.awk $(srcdir)/anchgsub.in >_$@ - -$(CMP) $(srcdir)/anchgsub.ok _$@ && rm -f _$@ - -splitargv:: - @$(AWK) -f $(srcdir)/splitargv.awk $(srcdir)/splitargv.in >_$@ - -$(CMP) $(srcdir)/splitargv.ok _$@ && rm -f _$@ + @$(AWK) -f $(srcdir)/inftest.awk | sed 's/inf/Inf/g' >_$@ + @-$(CMP) $(srcdir)/inftest.ok _$@ && rm -f _$@ + +getline2:: + @echo $@ + @$(AWK) -f $(srcdir)/getline2.awk $(srcdir)/getline2.awk $(srcdir)/getline2.awk >_$@ + @-$(CMP) $(srcdir)/getline2.ok _$@ && rm -f _$@ awkpath:: -# MS-DOS and OS/2 use ; as a PATH delimiter -# @AWKPATH="$(srcdir):$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ - @AWKPATH="$(srcdir);$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ - -$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ - -nfset:: - @$(AWK) -f $(srcdir)/nfset.awk $(srcdir)/nfset.in >_$@ - -$(CMP) $(srcdir)/nfset.ok _$@ && rm -f _$@ - -reparse:: - @$(AWK) -f $(srcdir)/reparse.awk $(srcdir)/reparse.in >_$@ - -$(CMP) $(srcdir)/reparse.ok _$@ && rm -f _$@ + @echo $@ + @AWKPATH="$(srcdir)$(PATH_SEPARATOR)$(srcdir)/lib" $(AWK) -f awkpath.awk >_$@ + @-$(CMP) $(srcdir)/awkpath.ok _$@ && rm -f _$@ argtest:: + @echo $@ @$(AWK) -f $(srcdir)/argtest.awk -x -y abc >_$@ - -$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/argtest.ok _$@ && rm -f _$@ badargs:: -# For MS-DOS & OS/2, we use " rather than ' in the usage statement. + @echo $@ @-$(AWK) -f 2>&1 | grep -v patchlevel >_$@ -# Next line converts " to ' for $(CMP) to work with UNIX badargs.ok - @cat _$@ | tr '\042' '\047' > _$@.2 -# -$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ - -$(CMP) $(srcdir)/badargs.ok _$@.2 && rm -f _$@ _$@.2 - -convfmt:: - @$(AWK) -f $(srcdir)/convfmt.awk >_$@ - -$(CMP) $(srcdir)/convfmt.ok _$@ && rm -f _$@ - -arrayparm:: - @-AWKPATH=$(srcdir) $(AWK) -f arrayparm.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/arrayparm.ok _$@ && rm -f _$@ - -paramdup:: - @-AWKPATH=$(srcdir) $(AWK) -f paramdup.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/paramdup.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/badargs.ok _$@ && rm -f _$@ nonl:: -# @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 - @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk NUL >_$@ 2>&1 - -$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ - -defref:: - @-AWKPATH=$(srcdir) $(AWK) --lint -f defref.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/defref.ok _$@ && rm -f _$@ - -nofmtch:: - @-AWKPATH=$(srcdir) $(AWK) --lint -f nofmtch.awk >_$@ 2>&1 - -$(CMP) $(srcdir)/nofmtch.ok _$@ && rm -f _$@ + @echo $@ + @-AWKPATH=$(srcdir) $(AWK) --lint -f nonl.awk /dev/null >_$@ 2>&1 + @-$(CMP) $(srcdir)/nonl.ok _$@ && rm -f _$@ strftime:: - : this test could fail on slow machines or on a second boundary, - : so if it does, double check the actual results -# We set TZ to make sure that we properly set the timezone. -# @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ -# TZ=GMT0; export TZ; \ -# date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + @echo This test could fail on slow machines or on a second boundary, + @echo so if it does, double check the actual results: + @echo $@ @LC_ALL=C; export LC_ALL; LANG=C; export LANG; \ TZ=GMT0; export TZ; \ - $(DATE) | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk - -$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 + date | $(AWK) -v OUTPUT=_$@ -f $(srcdir)/strftime.awk + @-$(CMP) strftime.ok _$@ && rm -f _$@ strftime.ok || exit 0 litoct:: + @echo $@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ - -$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ - -gensub:: - @$(AWK) -f $(srcdir)/gensub.awk $(srcdir)/gensub.in >_$@ - -$(CMP) $(srcdir)/gensub.ok _$@ && rm -f _$@ - -resplit:: - @echo a:b:c d:e:f | $(AWK) '{ FS = ":"; $$0 = $$0; print $$2 }' > _$@ - -$(CMP) $(srcdir)/resplit.ok _$@ && rm -f _$@ - -rswhite:: - @$(AWK) -f $(srcdir)/rswhite.awk $(srcdir)/rswhite.in > _$@ - -$(CMP) $(srcdir)/rswhite.ok _$@ && rm -f _$@ - -prmarscl:: - @-AWKPATH=$(srcdir) $(AWK) -f prmarscl.awk > _$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/prmarscl.ok _$@ && rm -f _$@ - -sclforin:: - @-AWKPATH=$(srcdir) $(AWK) -f sclforin.awk > _$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/sclforin.ok _$@ && rm -f _$@ - -sclifin:: - @-AWKPATH=$(srcdir) $(AWK) -f sclifin.awk > _$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/sclifin.ok _$@ && rm -f _$@ - -intprec:: - @-$(AWK) -f $(srcdir)/intprec.awk > _$@ 2>&1 - -$(CMP) $(srcdir)/intprec.ok _$@ && rm -f _$@ - -childin:: - @echo hi | $(AWK) 'BEGIN { "cat" | getline; print; close("cat") }' > _$@ - -$(CMP) $(srcdir)/childin.ok _$@ && rm -f _$@ - -noeffect:: - @-AWKPATH=$(srcdir) $(AWK) --lint -f noeffect.awk > _$@ 2>&1 - -$(CMP) $(srcdir)/noeffect.ok _$@ && rm -f _$@ - -numsubstr:: - @-AWKPATH=$(srcdir) $(AWK) -f numsubstr.awk $(srcdir)/numsubstr.in >_$@ - -$(CMP) $(srcdir)/numsubstr.ok _$@ && rm -f _$@ - -gnureops:: - @$(AWK) -f $(srcdir)/gnureops.awk >_$@ - -$(CMP) $(srcdir)/gnureops.ok _$@ && rm -f _$@ - -pcntplus:: - @$(AWK) -f $(srcdir)/pcntplus.awk >_$@ - -$(CMP) $(srcdir)/pcntplus.ok _$@ && rm -f _$@ - -prmreuse:: - @$(AWK) -f $(srcdir)/prmreuse.awk >_$@ - -$(CMP) $(srcdir)/prmreuse.ok _$@ && rm -f _$@ - -math:: - @$(AWK) -f $(srcdir)/math.awk >_$@ - -$(CMP) $(srcdir)/math.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ fflush:: + @echo $@ @$(srcdir)/fflush.sh >_$@ - -$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ - -fldchg:: - @$(AWK) -f $(srcdir)/fldchg.awk $(srcdir)/fldchg.in >_$@ - -$(CMP) $(srcdir)/fldchg.ok _$@ && rm -f _$@ - -fldchgnf:: - @$(AWK) -f $(srcdir)/fldchgnf.awk $(srcdir)/fldchgnf.in >_$@ - -$(CMP) $(srcdir)/fldchgnf.ok _$@ && rm -f _$@ - -reindops:: - @$(AWK) -f $(srcdir)/reindops.awk $(srcdir)/reindops.in >_$@ - -$(CMP) $(srcdir)/reindops.ok _$@ && rm -f _$@ - -sprintfc:: - @$(AWK) -f $(srcdir)/sprintfc.awk $(srcdir)/sprintfc.in >_$@ - -$(CMP) $(srcdir)/sprintfc.ok _$@ && rm -f _$@ - -getlnhd:: -# In 3.0.3, COMSPEC=$(SHELL) was used for MSC and MINGW32 which do -# not honor SHELL. -# COMSPEC=$(SHELL) $(AWK) -f $(srcdir)/getlnhd.awk >_$@ - @$(AWK) -f $(srcdir)/getlnhd.awk >_$@ - -$(CMP) $(srcdir)/getlnhd.ok _$@ && rm -f _$@ - -backgsub:: - @$(AWK) -f $(srcdir)/backgsub.awk $(srcdir)/backgsub.in >_$@ - -$(CMP) $(srcdir)/backgsub.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/fflush.ok _$@ && rm -f _$@ tweakfld:: + @echo $@ @$(AWK) -f $(srcdir)/tweakfld.awk $(srcdir)/tweakfld.in >_$@ @rm -f errors.cleanup - -$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ - -clsflnam:: - @$(AWK) -f $(srcdir)/clsflnam.awk $(srcdir)/clsflnam.in >_$@ 2>&1 - -$(CMP) $(srcdir)/clsflnam.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/tweakfld.ok _$@ && rm -f _$@ mmap8k:: + @echo $@ @$(AWK) '{ print }' $(srcdir)/mmap8k.in >_$@ - -$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ - -fnarray:: - @-AWKPATH=$(srcdir) $(AWK) -f fnarray.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/fnarray.ok _$@ && rm -f _$@ - -dynlj:: - @$(AWK) -f $(srcdir)/dynlj.awk >_$@ - -$(CMP) $(srcdir)/dynlj.ok _$@ && rm -f _$@ - -substr:: - @$(AWK) -f $(srcdir)/substr.awk >_$@ - -$(CMP) $(srcdir)/substr.ok _$@ && rm -f _$@ - -eofsplit:: - @$(AWK) -f $(srcdir)/eofsplit.awk >_$@ - -$(CMP) $(srcdir)/eofsplit.ok _$@ && rm -f _$@ - -prt1eval:: - @$(AWK) -f $(srcdir)/prt1eval.awk >_$@ - -$(CMP) $(srcdir)/prt1eval.ok _$@ && rm -f _$@ - -gsubasgn:: - @-AWKPATH=$(srcdir) $(AWK) -f gsubasgn.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/gsubasgn.ok _$@ && rm -f _$@ - -prtoeval:: - @$(AWK) -f $(srcdir)/prtoeval.awk >_$@ - -$(CMP) $(srcdir)/prtoeval.ok _$@ && rm -f _$@ - -gsubtest:: - @$(AWK) -f $(srcdir)/gsubtest.awk >_$@ - -$(CMP) $(srcdir)/gsubtest.ok _$@ && rm -f _$@ - -splitwht:: - @$(AWK) -f $(srcdir)/splitwht.awk >_$@ - -$(CMP) $(srcdir)/splitwht.ok _$@ && rm -f _$@ - -back89:: - @$(AWK) '/a\8b/' $(srcdir)/back89.in >_$@ - -$(CMP) $(srcdir)/back89.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/mmap8k.in _$@ && rm -f _$@ tradanch:: + @echo $@ @$(AWK) --traditional -f $(srcdir)/tradanch.awk $(srcdir)/tradanch.in >_$@ - -$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ - -nlfldsep:: - @$(AWK) -f $(srcdir)/nlfldsep.awk $(srcdir)/nlfldsep.in > _$@ - -$(CMP) $(srcdir)/nlfldsep.ok _$@ && rm -f _$@ - -splitvar:: - @$(AWK) -f $(srcdir)/splitvar.awk $(srcdir)/splitvar.in >_$@ - -$(CMP) $(srcdir)/splitvar.ok _$@ && rm -f _$@ - -intest:: - @$(AWK) -f $(srcdir)/intest.awk >_$@ - -$(CMP) $(srcdir)/intest.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/tradanch.ok _$@ && rm -f _$@ # AIX /bin/sh exec's the last command in a list, therefore issue a ":" # command so that pid.sh is fork'ed as a child before being exec'ed. pid:: + @echo pid + @AWKPATH=$(srcdir) AWK=$(AWKPROG) LC_ALL=C $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : @echo 'Expect pid to fail in DOS.' - @AWKPATH=$(srcdir) AWK=$(AWK) $(SHELL) $(srcdir)/pid.sh $$$$ > _`basename $@` ; : - -$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in + @-$(CMP) $(srcdir)/pid.ok _`basename $@` && rm -f _`basename $@` _`basename $@`.in strftlng:: - @echo 'Edit test/Makefile if you use MSC6, since strftlng will fail.' + @echo $@ @TZ=UTC; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ -# @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ -# TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ -# fi @if $(CMP) -s $(srcdir)/strftlng.ok _$@ ; then : ; else \ - env TZ=UTC0; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ + TZ=UTC0; export TZ; $(AWK) -f $(srcdir)/strftlng.awk >_$@ ; \ fi - -$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ - -nfldstr:: - @echo | $(AWK) '$$1 == 0 { print "bug" }' > _$@ - -$(CMP) $(srcdir)/nfldstr.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/strftlng.ok _$@ && rm -f _$@ nors:: + @echo $@ @echo A B C D E | tr -d '\12\15' | $(AWK) '{ print $$NF }' - $(srcdir)/nors.in > _$@ - -$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ - -fnarydel:: - @$(AWK) -f $(srcdir)/fnarydel.awk >_$@ - -$(CMP) $(srcdir)/fnarydel.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/nors.ok _$@ && rm -f _$@ reint:: + @echo $@ @$(AWK) --re-interval -f $(srcdir)/reint.awk $(srcdir)/reint.in >_$@ - -$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ - -noparms:: - @-AWKPATH=$(srcdir) $(AWK) -f noparms.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/noparms.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/reint.ok _$@ && rm -f _$@ pipeio1:: + @echo $@ @$(AWK) -f $(srcdir)/pipeio1.awk >_$@ @rm -f test1 test2 - -$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/pipeio1.ok _$@ && rm -f _$@ pipeio2:: -# This would fail were it not for the "cat" line due to DOS's ECHO command. - @echo 'pipeio may fail due to the way that your tr & echo work in DOS' + @echo $@ @$(AWK) -v SRCDIR=$(srcdir) -f $(srcdir)/pipeio2.awk >_$@ - @cat _$@ | $(AWK) '{ sub("ECHO is.*","",$$0); print $$0 } ' > _$@.2 -# -$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ - -diff -w $(srcdir)/pipeio2.ok _$@.2 && rm -f _$@ _$@.2 - -funstack:: - @echo 'Expect funstack to fail with MSC DOS versions.' -# @$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ - @-$(AWK) -f $(srcdir)/funstack.awk $(srcdir)/funstack.in >_$@ - -$(CMP) $(srcdir)/funstack.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/pipeio2.ok _$@ && rm -f _$@ clobber:: + @echo $@ @$(AWK) -f $(srcdir)/clobber.awk >_$@ - -$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/clobber.ok seq && $(CMP) $(srcdir)/clobber.ok _$@ && rm -f _$@ @rm -f seq -delarprm:: - @$(AWK) -f $(srcdir)/delarprm.awk >_$@ - -$(CMP) $(srcdir)/delarprm.ok _$@ && rm -f _$@ - -prdupval:: - @$(AWK) -f $(srcdir)/prdupval.awk $(srcdir)/prdupval.in >_$@ - -$(CMP) $(srcdir)/prdupval.ok _$@ && rm -f _$@ - -nondec:: -# @if grep BITOP ../config.h | grep define > /dev/null; \ -# then \ -# $(AWK) -f $(srcdir)/nondec.awk >_$@; \ -# else \ -# cp $(srcdir)/nondec.ok _$@; \ -# fi - @if grep BITOP ../config.h | grep define > /dev/null; \ - then \ - $(AWK) -f $(srcdir)/nondec.awk >_$@; \ - else \ - $(CP) $(srcdir)\\nondec.ok _$@; \ - fi - -$(CMP) $(srcdir)/nondec.ok _$@ && rm -f _$@ - -nasty:: - @$(AWK) -f $(srcdir)/nasty.awk >_$@ - -$(CMP) $(srcdir)/nasty.ok _$@ && rm -f _$@ - -nasty2:: - @$(AWK) -f $(srcdir)/nasty2.awk >_$@ - -$(CMP) $(srcdir)/nasty2.ok _$@ && rm -f _$@ - -zeroflag:: - @$(AWK) -f $(srcdir)/zeroflag.awk >_$@ - -$(CMP) $(srcdir)/zeroflag.ok _$@ && rm -f _$@ - -getnr2tm:: - @$(AWK) -f $(srcdir)/getnr2tm.awk $(srcdir)/getnr2tm.in >_$@ - -$(CMP) $(srcdir)/getnr2tm.ok _$@ && rm -f _$@ - -getnr2tb:: - @$(AWK) -f $(srcdir)/getnr2tb.awk $(srcdir)/getnr2tb.in >_$@ - -$(CMP) $(srcdir)/getnr2tb.ok _$@ && rm -f _$@ - -printf1:: - @$(AWK) -f $(srcdir)/printf1.awk >_$@ - -$(CMP) $(srcdir)/printf1.ok _$@ && rm -f _$@ - -funsmnam:: - @-AWKPATH=$(srcdir) $(AWK) -f funsmnam.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/funsmnam.ok _$@ && rm -f _$@ - -fnamedat:: - @-AWKPATH=$(srcdir) $(AWK) -f fnamedat.awk < $(srcdir)/fnamedat.in >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/fnamedat.ok _$@ && rm -f _$@ - -numindex:: - @-AWKPATH=$(srcdir) $(AWK) -f numindex.awk < $(srcdir)/numindex.in >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/numindex.ok _$@ && rm -f _$@ - -subslash:: - @-AWKPATH=$(srcdir) $(AWK) -f subslash.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/subslash.ok _$@ && rm -f _$@ - -opasnslf:: - @-AWKPATH=$(srcdir) $(AWK) -f opasnslf.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/opasnslf.ok _$@ && rm -f _$@ - -opasnidx:: - @-AWKPATH=$(srcdir) $(AWK) -f opasnidx.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/opasnidx.ok _$@ && rm -f _$@ - arynocls:: + @echo $@ @-AWKPATH=$(srcdir) $(AWK) -v INPUT=$(srcdir)/arynocls.in -f arynocls.awk >_$@ - -$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ - -igncdym:: - @-AWKPATH=$(srcdir) $(AWK) -f igncdym.awk $(srcdir)/igncdym.in >_$@ - -$(CMP) $(srcdir)/igncdym.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/arynocls.ok _$@ && rm -f _$@ getlnbuf:: - @echo getlnbuf runs out of memory with MSC gawk. + @echo $@ @-AWKPATH=$(srcdir) $(AWK) -f getlnbuf.awk $(srcdir)/getlnbuf.in > _$@ @-AWKPATH=$(srcdir) $(AWK) -f gtlnbufv.awk $(srcdir)/getlnbuf.in > _2$@ - -$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ - -arysubnm:: - @-AWKPATH=$(srcdir) $(AWK) -f arysubnm.awk >_$@ - -$(CMP) $(srcdir)/arysubnm.ok _$@ && rm -f _$@ - -fnparydl:: - @-AWKPATH=$(srcdir) $(AWK) -f fnparydl.awk >_$@ - -$(CMP) $(srcdir)/fnparydl.ok _$@ && rm -f _$@ - -nlstrina:: - @-AWKPATH=$(srcdir) $(AWK) -f nlstrina.awk >_$@ - -$(CMP) $(srcdir)/nlstrina.ok _$@ && rm -f _$@ - -octsub:: - @-AWKPATH=$(srcdir) $(AWK) -f octsub.awk >_$@ - -$(CMP) $(srcdir)/octsub.ok _$@ && rm -f _$@ - -nlinstr:: - @$(AWK) -f $(srcdir)/nlinstr.awk $(srcdir)/nlinstr.in >_$@ - -$(CMP) $(srcdir)/nlinstr.ok _$@ && rm -f _$@ - -ofmt:: - @$(AWK) -f $(srcdir)/ofmt.awk $(srcdir)/ofmt.in >_$@ - -$(CMP) $(srcdir)/ofmt.ok _$@ && rm -f _$@ - -hsprint:: - @echo 'hsprint test may fail due to 1.27e+01 not being equal to' - @echo '1.27e+001 (and similarly for other numbers) for MSC gawk.' - @$(AWK) -f $(srcdir)/hsprint.awk >_$@ - -$(CMP) $(srcdir)/hsprint.ok _$@ && rm -f _$@ - -fsfwfs:: - @$(AWK) -f $(srcdir)/fsfwfs.awk $(srcdir)/fsfwfs.in >_$@ - -$(CMP) $(srcdir)/fsfwfs.ok _$@ && rm -f _$@ - -ofmts:: - @$(AWK) -f $(srcdir)/ofmts.awk $(srcdir)/ofmts.in >_$@ - -$(CMP) $(srcdir)/ofmts.ok _$@ && rm -f _$@ - -parseme:: - @-AWKPATH=$(srcdir) $(AWK) -f parseme.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/parseme.ok _$@ && rm -f _$@ - -splitdef:: - @$(AWK) -f $(srcdir)/splitdef.awk >_$@ - -$(CMP) $(srcdir)/splitdef.ok _$@ && rm -f _$@ - -fnaryscl:: - @-AWKPATH=$(srcdir) $(AWK) -f fnaryscl.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/fnaryscl.ok _$@ && rm -f _$@ - -fnasgnm:: - @-AWKPATH=$(srcdir) $(AWK) -f fnasgnm.awk < $(srcdir)/fnasgnm.in >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/fnasgnm.ok _$@ && rm -f _$@ - -lint:: - @-AWKPATH=$(srcdir) $(AWK) -f lint.awk > _$@ 2>&1 - -$(CMP) $(srcdir)/lint.ok _$@ && rm -f _$@ - -procinfs:: - @-$(AWK) -f $(srcdir)/procinfs.awk > _$@ - -$(CMP) $(srcdir)/procinfs.ok _$@ && rm -f _$@ - -sort1:: - @-$(AWK) -f $(srcdir)/sort1.awk > _$@ - -$(CMP) $(srcdir)/sort1.ok _$@ && rm -f _$@ - -ofmtbig:: - @$(AWK) -f $(srcdir)/ofmtbig.awk $(srcdir)/ofmtbig.in >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/ofmtbig.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/getlnbuf.ok _$@ && $(CMP) $(srcdir)/getlnbuf.ok _2$@ && rm -f _$@ _2$@ inetmesg:: @echo These tests only work if your system supports the services - @echo "'discard'" at port 9 and "'daytimed" at port 13. Check your + @echo "'discard'" at port 9 and "'daytimed'" at port 13. Check your @echo file /etc/services and do "'netstat -a'". + @echo Expect inet tests to fail with MSC and DJGPP because "|&" is not supported. inetechu:: - @echo inetechu fails with MSC and DJGPP because "|&" is not supported. @echo This test is for establishing UDP connections -# @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' - @-$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' + @$(AWK) 'BEGIN {print "" |& "/inet/udp/0/127.0.0.1/9"}' inetecht:: - @echo inetecht fails with MSC and DJGPP because "|&" is not supported. @echo This test is for establishing TCP connections -# @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' - @-$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' + @$(AWK) 'BEGIN {print "" |& "/inet/tcp/0/127.0.0.1/9"}' inetdayu:: - @echo inetdayu fails with MSC and DJGPP because "|&" is not supported. @echo This test is for bidirectional UDP transmission -# @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ -# "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' - @-$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ + @$(AWK) 'BEGIN { print "" |& "/inet/udp/0/127.0.0.1/13"; \ "/inet/udp/0/127.0.0.1/13" |& getline; print $0}' inetdayt:: - @echo inetdayt fails with MSC and DJGPP because "|&" is not supported. @echo This test is for bidirectional TCP transmission -# @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ -# "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' - @-$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ + @$(AWK) 'BEGIN { print "" |& "/inet/tcp/0/127.0.0.1/13"; \ "/inet/tcp/0/127.0.0.1/13" |& getline; print $0}' -paramtyp:: - @$(AWK) -f $(srcdir)/paramtyp.awk >_$@ - -$(CMP) $(srcdir)/paramtyp.ok _$@ && rm -f _$@ - -rsnul1nl:: - @$(AWK) -f $(srcdir)/rsnul1nl.awk $(srcdir)/rsnul1nl.in >_$@ - -$(CMP) $(srcdir)/rsnul1nl.ok _$@ && rm -f _$@ - -datanonl:: - @$(AWK) -f $(srcdir)/datanonl.awk $(srcdir)/datanonl.in >_$@ - -$(CMP) $(srcdir)/datanonl.ok _$@ && rm -f _$@ - -regeq:: - @$(AWK) -f $(srcdir)/regeq.awk $(srcdir)/regeq.in >_$@ - -$(CMP) $(srcdir)/regeq.ok _$@ && rm -f _$@ - redfilnm:: + @echo $@ @$(AWK) -f $(srcdir)/redfilnm.awk srcdir=$(srcdir) $(srcdir)/redfilnm.in >_$@ - -$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ - -strtod:: - @$(AWK) -f $(srcdir)/strtod.awk $(srcdir)/strtod.in >_$@ - -$(CMP) $(srcdir)/strtod.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/redfilnm.ok _$@ && rm -f _$@ leaddig:: + @echo $@ @$(AWK) -v x=2E -f $(srcdir)/leaddig.awk >_$@ - -$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ + @-$(CMP) $(srcdir)/leaddig.ok _$@ && rm -f _$@ -clos1way:: - @echo clos1way fails with MSC and DJGPP because "|&" is not supported. -# @$(AWK) -f $(srcdir)/clos1way.awk >_$@ - @-$(AWK) -f $(srcdir)/clos1way.awk >_$@ - -$(CMP) $(srcdir)/clos1way.ok _$@ && rm -f _$@ - -arynasty:: - @$(AWK) -f $(srcdir)/arynasty.awk >_$@ - -$(CMP) $(srcdir)/arynasty.ok _$@ && rm -f _$@ - -shadow:: - @-AWKPATH=$(srcdir) $(AWK) --lint -f shadow.awk >_$@ 2>&1 || exit 0 - -$(CMP) $(srcdir)/shadow.ok _$@ && rm -f _$@ - -regx8bit:: - @$(AWK) -f $(srcdir)/regx8bit.awk >_$@ - -$(CMP) $(srcdir)/regx8bit.ok _$@ && rm -f _$@ - -psx96sub:: - @$(AWK) -f $(srcdir)/psx96sub.awk >_$@ - -$(CMP) $(srcdir)/psx96sub.ok _$@ && rm -f _$@ - -addcomma:: - @echo 'If addcomma fails, set try setting LFN=n in your environment' - @echo "before running make. If that still doesn't work, read the" - @echo 'comment in this makefile about setting CMP for information' - @echo 'about what may be happenning.' - @$(AWK) -f $(srcdir)/addcomma.awk $(srcdir)/addcomma.in >_$@ - -$(CMP) $(srcdir)/addcomma.ok _$@ && rm -f _$@ - -gnuops2:: - @$(AWK) -f $(srcdir)/gnuops2.awk >_$@ - -$(CMP) $(srcdir)/gnuops2.ok _$@ && rm -f _$@ - -rebt8b1:: - @$(AWK) -f $(srcdir)/rebt8b1.awk >_$@ - -$(CMP) $(srcdir)/rebt8b1.ok _$@ && rm -f _$@ - -rebt8b2:: - @$(AWK) -f $(srcdir)/rebt8b2.awk >_$@ - -$(CMP) $(srcdir)/rebt8b2.ok _$@ && rm -f _$@ - -leadnl:: - @$(AWK) -f $(srcdir)/leadnl.awk $(srcdir)/leadnl.in >_$@ - -$(CMP) $(srcdir)/leadnl.ok _$@ && rm -f _$@ - -funsemnl:: - @$(AWK) -f $(srcdir)/funsemnl.awk >_$@ - -$(CMP) $(srcdir)/funsemnl.ok _$@ && rm -f _$@ - -ofmtfidl:: - @$(AWK) -f $(srcdir)/ofmtfidl.awk $(srcdir)/ofmtfidl.in >_$@ - -$(CMP) $(srcdir)/ofmtfidl.ok _$@ && rm -f _$@ - -onlynl:: - @$(AWK) -f $(srcdir)/onlynl.awk $(srcdir)/onlynl.in >_$@ - -$(CMP) $(srcdir)/onlynl.ok _$@ && rm -f _$@ - -arrymem1:: - @$(AWK) -f $(srcdir)/arrymem1.awk >_$@ - -$(CMP) $(srcdir)/arrymem1.ok _$@ && rm -f _$@ - -compare2:: - @$(AWK) -f $(srcdir)/compare2.awk >_$@ - -$(CMP) $(srcdir)/compare2.ok _$@ && rm -f _$@ - -minusstr:: - @$(AWK) -f $(srcdir)/minusstr.awk >_$@ - -$(CMP) $(srcdir)/minusstr.ok _$@ && rm -f _$@ - -membug1:: - @$(AWK) -f $(srcdir)/membug1.awk $(srcdir)/membug1.in >_$@ - -$(CMP) $(srcdir)/membug1.ok _$@ && rm -f _$@ - -forsimp:: - @$(AWK) -f $(srcdir)/forsimp.awk >_$@ - -$(CMP) $(srcdir)/forsimp.ok _$@ && rm -f _$@ - -concat1:: - @$(AWK) -f $(srcdir)/concat1.awk $(srcdir)/concat1.in >_$@ - -$(CMP) $(srcdir)/concat1.ok _$@ && rm -f _$@ - -longsub:: - @$(AWK) -f $(srcdir)/longsub.awk $(srcdir)/longsub.in >_$@ - -$(CMP) $(srcdir)/longsub.ok _$@ && rm -f _$@ +gsubtst3:: + @echo $@ + @$(AWK) --re-interval -f $(srcdir)/$@.awk $(srcdir)/$@.in >_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +space:: + @echo $@ + @echo 'Expect space to fail in DOS.' + @$(AWK) -f ' ' $(srcdir)/space.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +printf0:: + @echo $@ + @$(AWK) --posix -f $(srcdir)/$@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +Gt-dummy: +# file Maketests, generated from Makefile.am by the Gentests program +addcomma: + @echo addcomma + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +anchgsub: + @echo anchgsub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arrayparm: + @echo arrayparm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arrayref: + @echo arrayref + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arrymem1: + @echo arrymem1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arynasty: + @echo arynasty + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +arysubnm: + @echo arysubnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asgext: + @echo asgext + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +back89: + @echo back89 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +backgsub: + @echo backgsub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +childin: + @echo childin + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +clsflnam: + @echo clsflnam + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +compare2: + @echo compare2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +concat1: + @echo concat1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +convfmt: + @echo convfmt + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +datanonl: + @echo datanonl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +defref: + @echo defref + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +delarprm: + @echo delarprm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +dynlj: + @echo dynlj + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +eofsplit: + @echo eofsplit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fldchg: + @echo fldchg + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fldchgnf: + @echo fldchgnf + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnamedat: + @echo fnamedat + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnarray: + @echo fnarray + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnarydel: + @echo fnarydel + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnaryscl: + @echo fnaryscl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnasgnm: + @echo fnasgnm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnmisc: + @echo fnmisc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fnparydl: + @echo fnparydl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +forsimp: + @echo forsimp + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fsbs: + @echo fsbs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fsrs: + @echo fsrs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fstabplus: + @echo fstabplus + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +funsemnl: + @echo funsemnl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +funsmnam: + @echo funsmnam + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +funstack: + @echo funstack + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +getline: + @echo getline + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +getline3: + @echo getline3 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +getnr2tb: + @echo getnr2tb + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +getnr2tm: + @echo getnr2tm + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubasgn: + @echo gsubasgn + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtest: + @echo gsubtest + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst2: + @echo gsubtst2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gsubtst4: + @echo gsubtst4 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +hsprint: + @echo hsprint + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +inputred: + @echo inputred + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +intest: + @echo intest + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +intprec: + @echo intprec + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +leadnl: + @echo leadnl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +longsub: + @echo longsub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +longwrds: + @echo longwrds + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +math: + @echo math + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +membug1: + @echo membug1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +minusstr: + @echo minusstr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nasty: + @echo nasty + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nasty2: + @echo nasty2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +negexp: + @echo negexp + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nfldstr: + @echo nfldstr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nfneg: + @echo nfneg + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nfset: + @echo nfset + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nlfldsep: + @echo nlfldsep + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nlinstr: + @echo nlinstr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nlstrina: + @echo nlstrina + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +noeffect: + @echo noeffect + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nofmtch: + @echo nofmtch + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +noloop1: + @echo noloop1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +noloop2: + @echo noloop2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +noparms: + @echo noparms + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nulrsend: + @echo nulrsend + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +numindex: + @echo numindex + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +numsubstr: + @echo numsubstr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +octsub: + @echo octsub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ofmt: + @echo ofmt + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ofmtbig: + @echo ofmtbig + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ofmtfidl: + @echo ofmtfidl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ofmts: + @echo ofmts + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +onlynl: + @echo onlynl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +opasnidx: + @echo opasnidx + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +opasnslf: + @echo opasnslf + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +paramdup: + @echo paramdup + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +paramtyp: + @echo paramtyp + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +parseme: + @echo parseme + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +pcntplus: + @echo pcntplus + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prdupval: + @echo prdupval + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prec: + @echo prec + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +printf1: + @echo printf1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prmarscl: + @echo prmarscl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prmreuse: + @echo prmreuse + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prt1eval: + @echo prt1eval + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +prtoeval: + @echo prtoeval + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +psx96sub: + @echo psx96sub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rand: + @echo rand + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rebt8b1: + @echo rebt8b1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rebt8b2: + @echo rebt8b2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +regeq: + @echo regeq + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +reindops: + @echo reindops + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +reparse: + @echo reparse + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +resplit: + @echo resplit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rs: + @echo rs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rsnul1nl: + @echo rsnul1nl + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rstest1: + @echo rstest1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rstest2: + @echo rstest2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rswhite: + @echo rswhite + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sclforin: + @echo sclforin + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sclifin: + @echo sclifin + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitargv: + @echo splitargv + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitarr: + @echo splitarr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitdef: + @echo splitdef + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitvar: + @echo splitvar + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +splitwht: + @echo splitwht + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sprintfc: + @echo sprintfc + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +strtod: + @echo strtod + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +subslash: + @echo subslash + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +substr: + @echo substr + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +swaplns: + @echo swaplns + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +synerr1: + @echo synerr1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +uninitialized: + @echo uninitialized + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +uninit2: + @echo uninit2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +zeroe0: + @echo zeroe0 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +zeroflag: + @echo zeroflag + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +getlnhd: + @echo getlnhd + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asort: + @echo asort + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +asorti: + @echo asorti + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +clos1way: + @echo clos1way + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + @echo Expect clos1way to fail with MSC and DJGPP because "|&" is not supported. + +fieldwdth: + @echo fieldwdth + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +fsfwfs: + @echo fsfwfs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gensub: + @echo gensub + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gnuops2: + @echo gnuops2 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +gnureops: + @echo gnureops + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +icasefs: + @echo icasefs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +icasers: + @echo icasers + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +igncdym: + @echo igncdym + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +igncfs: + @echo igncfs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +ignrcase: + @echo ignrcase + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +lint: + @echo lint + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +match1: + @echo match1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +nondec: + @echo nondec + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +posix: + @echo posix + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +procinfs: + @echo procinfs + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +regx8bit: + @echo regx8bit + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +rebuf: + @echo rebuf + @AWKPATH=$(srcdir) $(AWK) -f $@.awk < $(srcdir)/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +shadow: + @echo shadow + @AWKPATH=$(srcdir) $(AWK) -f $@.awk --lint >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +sort1: + @echo sort1 + @AWKPATH=$(srcdir) $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +# end of file Maketests + +# Targets generated for other tests: + +$(srcdir)/Maketests: $(srcdir)/Makefile.am $(srcdir)/Gentests + $(AWK) -f $(srcdir)/Gentests "$<" *.awk *.in > $(srcdir)/Maketests clean: rm -fr _* core junk out1 out2 out3 strftime.ok test1 test2 seq *~ +# An attempt to print something that can be grepped for in build logs +pass-fail: + @COUNT=`ls _* 2>/dev/null | wc -l` ; \ + if test $$COUNT = 0 ; \ + then echo ALL TESTS PASSED ; \ + else echo $$COUNT TESTS FAILED ; \ + fi + # This target for my convenience to look at all the results diffout: for i in _* ; \ @@ -901,6 +1161,17 @@ diff -c $${i#_}.ok $$i ; \ done | more +# This target is for testing with electric fence. +efence: + for i in $$(ls _* | sed 's;_\(.*\);\1;') ; \ + do \ + bad=$$(wc -l < _$$i) \ + ok=$$(wc -l < $$i.ok) ; \ + if (( $$bad == $$ok + 2 )) ; \ + then \ + rm _$$i ; \ + fi ; \ + done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -urN gawk-3.1.1/pc/config.h gawk-3.1.2/pc/config.h --- gawk-3.1.1/pc/config.h 2002-04-16 14:59:38.000000000 +0300 +++ gawk-3.1.2/pc/config.h 2003-02-18 15:47:26.000000000 +0200 @@ -90,7 +90,9 @@ #define HAVE_VPRINTF 1 /* Define as __inline if that's what the C compiler calls it. */ -/* #undef inline */ +#if defined (_MSC_VER) +#define inline +#endif /* Define if on MINIX. */ /* #undef _MINIX */ @@ -338,6 +340,11 @@ # define HAVE_POPEN_H +/* #if defined (_MSC_VER) */ +#define ssize_t long int +/* #endif */ + + #if (defined(_MSC_VER) && defined(MSDOS)) || defined(__MINGW32__) # define system(s) os_system(s) #endif diff -urN gawk-3.1.1/pc/gawkmisc.pc gawk-3.1.2/pc/gawkmisc.pc --- gawk-3.1.1/pc/gawkmisc.pc 2002-04-16 14:58:11.000000000 +0300 +++ gawk-3.1.2/pc/gawkmisc.pc 2003-02-04 14:19:35.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991 - 2002 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991 - 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -33,6 +33,8 @@ # endif #ifdef __EMX__ +#include + static int _os2_is_abs_path(const char *dirname); static char* _os2_unixroot(const char *path); static const char* _os2_unixroot_path(const char *path); @@ -103,7 +105,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; @@ -409,7 +411,7 @@ *q = '\0'; /* terminating '\0' */ } - for(i = 0; i++; i < dir_count) free((void*) list[i]); + for(i = 0; i < dir_count; i++) free((void*) list[i]); } return (result) ? (const char*) result : path; diff -urN gawk-3.1.1/po/ChangeLog gawk-3.1.2/po/ChangeLog --- gawk-3.1.1/po/ChangeLog 2002-05-01 16:42:09.000000000 +0300 +++ gawk-3.1.2/po/ChangeLog 2003-03-19 14:22:47.000000000 +0200 @@ -1,3 +1,22 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Mon Dec 2 11:49:59 2002 Arnold D. Robbins + + * Rules-quot, en@quot.reader, en@boldquot.reader: removed. + +Thu Sep 19 11:00:00 2002 Arnold D. Robbins + + * Updatedated to gettext 0.11.5. + +Mon Jun 17 18:26:23 2002 Arnold D. Robbins + + * POTFILES.in: Updated with list of new regex files. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/po/LINGUAS gawk-3.1.2/po/LINGUAS --- gawk-3.1.1/po/LINGUAS 2002-04-22 14:50:16.000000000 +0300 +++ gawk-3.1.2/po/LINGUAS 2003-02-06 11:25:48.000000000 +0200 @@ -5,3 +5,5 @@ sv tr de +da +pt_BR diff -urN gawk-3.1.1/po/de.po gawk-3.1.2/po/de.po --- gawk-3.1.1/po/de.po 2002-05-01 16:41:00.000000000 +0300 +++ gawk-3.1.2/po/de.po 2003-03-19 14:25:13.000000000 +0200 @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 3.1.0\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" "PO-Revision-Date: 2002-04-03 18:55+02:00\n" "Last-Translator: Christian Kirsch \n" "Language-Team: German \n" @@ -13,410 +13,901 @@ "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "Versuch, Skalar '%s' als Array zu verwenden." -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "Bezug auf nicht-initialisiertes Element »%s[\"%s\"]«" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "Index in Array »%s« ist Nullstring." -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "delete: Benutzung der Variablen »%s« als Array ist nicht zulässig." - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: Index »%s« nicht in Feld »%s« vorhanden." -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "delete: Benutzung der Variablen »%s« als Array ist nicht zulässig." + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: leer (Null)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: leer (0)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: Table_size = %d, array_size = %d\n" -#: array.c:612 +#: array.c:671 #, fuzzy, c-format msgid "%s: is parameter\n" msgstr "%s: ist ein Parameter\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: Array-Referenz auf %s\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: Erstes Argument ist kein Array." -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: Zweites Argument ist kein array." -#: builtin.c:107 +#: awkgram.y:208 +#, fuzzy, c-format +msgid "%s blocks must have an action part" +msgstr "END-Blöcke müssen einen Aktionsteil haben." + +#: awkgram.y:211 +#, fuzzy +msgid "each rule must have a pattern or an action part" +msgstr "END-Blöcke müssen einen Aktionsteil haben." + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "'%s' ist eine eingebaute Funktion und kann nicht umdefiniert werden." + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "" +"Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber " +"keiner." + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "Statement möglicherweise ohne Effekt." + +#: awkgram.y:431 awkgram.y:451 +#, fuzzy, c-format +msgid "`%s' used in %s action" +msgstr "'next' in BEGIN- oder END-Aktion benutzt." + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "'nextfile' ist eine gawk-Erweiterung." + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "'return' außerhalb einer Funktion benutzt." + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" +"Einfaches 'print' in BEGIN- oder END-Regel soll vermutlich 'print \"\"' sein." + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "'delete array' ist eine gawk-Erweiterung." + +#: awkgram.y:528 awkgram.y:535 +#, fuzzy +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "'delete array' ist eine gawk-Erweiterung." + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "'multistage' Zweiwege-Pipes funktionieren nicht." + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung." + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "Regulärer Ausdruck links vom '~'- oder '!~'-Operator." + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "Regulärer Ausdruck rechts von einem Vergleich." + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "" +"Nicht-umgelenktes 'getline' ist innerhalb der END-Aktion nicht definiert." + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "Aufruf von 'length' ohne Klammern ist nicht portabel." + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet." + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "Ungültiger Index-Ausdruck." + +#: awkgram.y:1020 +#, fuzzy +msgid "unexpected newline or end of string" +msgstr "Unerwartetes Zeilenende" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "Kein Programmtext auf der Kommandozeile." + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "Kann Quelldatei '%s' nicht zum Lesen öffnen (%s)." + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "Kann Quelldatei '%s' nicht lesen (%s)." + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "Quelldatei '%s' ist leer." + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "Quelldatei hört nicht mit Zeilenende auf." + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "" +"Nicht-beendeter Regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei." + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "Nicht-beendeter Regulärer Ausdruck" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "Nicht-beendeter Regulärer Ausdruck am Dateiende." + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "" +"Die Verwendung von '\\#...' zur Fortsetzung von Zeilen ist nicht portabel." + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "Backslash ist nicht letztes Zeichen auf der Zeile." + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX erlaubt den Operator '**=' nicht." + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "Das alte awk erlaubt den Operator '**=' nicht." + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX erlaubt den Operator '**' nicht." + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "Das alte awk erlaubt den Operator '**' nicht." + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "Das alte awk kennt den Operator '^=' nicht." + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "Das alte awk kennt den Operator '^' nicht." + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "Nicht-beendeter String" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "Ungültiges Zeichen '%c' in einem Ausdruck." + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "'%s' ist eine gawk-Erweiterung" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "'%s' ist eine Erweiterung der Bell Labs." + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX gestattet '%s' nicht." + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "Das alte awk gestattet '%s' nicht." + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "'goto' gilt als schlechter Stil!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "Unzulässige Argumentzahl %d für %s." + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: Das dritte Argument ist eine gawk-Erweiterung." + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt." + +#: awkgram.y:2140 +#, fuzzy, c-format +msgid "%s third parameter is not a changeable object" +msgstr "Der dritte Parameter von sub ist ein unveränderliches Objekt." + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: Das zweite Argument ist eine gawk-Erweiterung." + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" +"Entfernen Sie den führenden Unterstrich." + +#: awkgram.y:2195 +#, fuzzy +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" +"Entfernen Sie den führenden Unterstrich." + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "Funktion '%s': Parameter #%d, '%s' wiederholt Parameter #%d." + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "Funktion '%s': Parameter '%s' verdeckt eine globale Variable." + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "Kann '%s' nicht zum Schreiben öffnen (%s)." + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "Schicke Profile auf Stadard-Fehlerausgabe." + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: close gescheitert (%s)." + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "shadow_funcs() zweimal aufgerufen!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "" + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen." + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "Funktion '%s' ist bereits definiert." + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "Aufgerufene funktion '%s' ist nirgends definiert." + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "Funktion '%s' wird nirgends aufgerufen." + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "" +"Konstanter Regulärer Ausdruck für Parameter #%d ergibt einen logischen Wert." + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"Funktion '%s' mit Leerzeichen zwischen Name und '(' aufgerufen, \n" +"%s" + +#: awkgram.y:2878 +#, fuzzy +msgid "or used as a variable or an array" +msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s to \"%s\" fehlgeschlagen (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "Standardausgabe" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "Unbekannte Ursache" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: Argument ist keine Zahl." -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: Argument %g außerhalb des gültigen Zahlenbereichs." -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: Leeren der Puffer nicht möglich, Pipe »%s« ist nur zum Lesen " "geöffnet." -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: Leeren der Puffer nicht möglich, Datei »%s« ist nur zum Lesen " "geöffnet." -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: »%s« ist keine geöffnete Datei, Pipe oder Prozess." -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: Erstes Argument ist kein String." -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: Zweites Argument ist kein string." -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "Argument ist keine Zahl." -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: Argument ist kein String." -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: Argument ist keine Zahl." -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: Negatives Argument %g." -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "»$« ist in awk-Formaten nicht zulässig." -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "Argumentnummer bei »$« muss > 0 sein." -#: builtin.c:711 -#, c-format -msgid "arg count %d greater than total number of supplied arguments" +#: builtin.c:722 +#, fuzzy, c-format +msgid "arg count %ld greater than total number of supplied arguments" msgstr "Argumentnummer %d ist größer als Anzahl angegebener Argumente." -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "»$« nach Punkt in Formatangabe nicht zulässig." -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "»$« fehlt in positionsabhängiger Feldbreite oder Genauigkeit." # -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "»l« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "»l« in POSIX-awk-Formaten nicht zulässig." -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "»L« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "»L« in POSIX-awk-Formaten nicht zulässig." -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "»h« ist in awk-Formaten bedeutungslos, ignoriert." -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "»h« in POSIX-awk-Formaten nicht zulässig.<" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "Nicht genügend Argumente für Formatangabe." -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ ran out for this one" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: Format-Specifier hat keinen Controlcode." -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "Zu viele Argumente für Formatstring." -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: Keine Argumente" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: Argument ist keine Zahl." -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: Argument %g ist negativ." -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: Start-Index %g ist ungültig, 1 wird benutzt." -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: Start-Wert %g wird abgeschnitten." -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: Länge %g ist kleiner oder gleich 0." -#: builtin.c:1207 +#: builtin.c:1233 +#, fuzzy, c-format +msgid "substr: length %g is < 0" +msgstr "substr: Länge %g ist kleiner oder gleich 0." + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: Länge %g wird abgeschnitten." -#: builtin.c:1214 -msgid "substr: source string is zero length" -msgstr "substr: String ist leer." - -#: builtin.c:1221 +#: builtin.c:1245 #, c-format -msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +msgid "substr: length %g too big for string indexing, truncating to %g" msgstr "" -"substr: Länge %d am Start-Wert %d überschreitet Länge des ersten Arguments (%" -"d)." -#: builtin.c:1227 -#, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: Start-Wert %d liegt hinter dem Ende des Strings." +#: builtin.c:1257 +msgid "substr: source string is zero length" +msgstr "substr: String ist leer." #: builtin.c:1263 +#, fuzzy, c-format +msgid "substr: start index %g is past end of string" +msgstr "substr: Start-Wert %d liegt hinter dem Ende des Strings." + +#: builtin.c:1271 +#, fuzzy, c-format +msgid "" +"substr: length %g at start index %g exceeds length of first argument (%lu)" +msgstr "" +"substr: Länge %d am Start-Wert %d überschreitet Länge des ersten Arguments (%" +"d)." + +#: builtin.c:1306 #, fuzzy msgid "strftime: received non-string first argument" msgstr "strftime: Erstes Argument ist kein String." -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: Format-String ist leer." -#: builtin.c:1278 +#: builtin.c:1321 #, fuzzy msgid "strftime: received non-numeric second argument" msgstr "strftime. Zweites Argument ist keine Zahl." -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: Argument ist kein String." -#: builtin.c:1386 +#: builtin.c:1429 #, fuzzy msgid "system: received non-string argument" msgstr "system: Argument ist kein String." -#: builtin.c:1512 +#: builtin.c:1573 #, fuzzy msgid "tolower: received non-string argument" msgstr "tolower: Argument ist kein String." -#: builtin.c:1561 +#: builtin.c:1622 #, fuzzy msgid "toupper: received non-string argument" msgstr "toupper: Argument ist kein String." -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: Erstes Argument ist keine Zahl." -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: Zweites Argument ist keine Zahl." -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: Argument istk eine Zahl." -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: Argument ist keine Zahl." -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: Argument ist keine Zahl." -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: Drittes Argument ist kein Array." -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: Drittes Argument 0 als 1 interpretiert" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: Erstes Argument ist keine Zahl." -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" "lshift(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: Erstes Argument ist keine Zahl." -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" "rshift (%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): Zu große Shift-Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: Erstes Argument ist keine Zahl." -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: Erstes Argument ist keine Zahl." -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: Erstes Argument ist keine Zahl." -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf: Negative Werte werden merkwürdige Ergebnisse liefern." -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: Erstes Argument ist keine Zahl." -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): Negativer Wert wird merkwürdige Ergebnisse liefern." -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): Dezimalteil wird abgeschnitten." -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: '%s' ist keine gültige Locale-Kategorie." +#: eval.c:262 +#, c-format +msgid "unknown nodetype %d" +msgstr "Unbekannter Knotentyp %d" + +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "Pufferüberlauf in genflags2str." + +#: eval.c:555 +#, fuzzy, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"for-Schleife: Array '%s' ändert Größse von %d zu %d innerhalb der Schleife." + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "'break' außerhalb einer Schleife ist nicht portabel." + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "'break' außerhalb einer Schleife ist nicht zulässig." + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "'continue' außerhalb einer Schleife ist nicht portabel." + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "'continue' außerhalb einer Schleife ist nicht zulässig." + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden." + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "'next' kann nicht in einer END-Regel benutzt werden." + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden." + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden." + +#: eval.c:696 +msgid "statement has no effect" +msgstr "Anweisung hat keinen Effekt." + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "Referenz auf die nicht-initialisierte Variable '%s'." + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "Referenz auf nicht-initialisiertes Argument '%s'." + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden." + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"Konkatenierung: Seiteneffekte in einem Ausdruck haben die Länge des anderen\n" +"geändert!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "Zuweisung in einer Bedingung." + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "Division durch Null versucht." + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "Division durch Null versucht in '%%'." + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "Illegaler Typ (%s) in tree_eval" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "Division durch Null versucht in '/='." + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "Division durch Null versucht in '%%='." + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (von %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen." + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "Funktion '%s' ist nicht definiert." + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "Funktion %s aufgerufen\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktion Aufruf-Stack\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- main --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "Nicht-numerischer Wert für Feldreferenz verwendet." + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "Referenz von einem Null-String" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "Versuch des Zugriffs auf Feld %d." + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen." + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "" +"Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt." + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "'IGNORECASE' ist eine gawk-Erweiterung" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "'BINMODE' ist eine gawk-Erweiterung." + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "Falsche '%sFMT'-Angabe '%s'" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist." + #: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "'extension' ist eine gawk-Erweiterung." @@ -431,10 +922,35 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: Bibliothek '%s': kann Funktion '%s' nicht aufrufen (%s)\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "Operation nicht möglich." +#: field.c:321 +msgid "NF set to negative value" +msgstr "" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: Zweites Argument ist kein Array." + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: Null-String als drittes Argument ist eine gawk-Erweiterung." + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "'FIELDWIDTHS' ist eine gawk-Erweiterung." + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "Feld %d in FIELDWIDTHS muss > 0 sein." + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "Null-String für 'FS' ist eine gawk-Erweiterung." + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -475,7 +991,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: Ungültige Option -- %c.\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s Option erfordert ein Argument -- %c.\n" @@ -490,163 +1006,469 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s. Option '-W %s' erlaubt kein Argument.\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "Option '-m[fr]' ist in gawk bedeutungslos." - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "Anwendung der Option -m: '-m[fr] nnn'" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "Kann Datei '%s' nicht zum Lesen öffnen (%s)." -#: main.c:326 +#: io.c:344 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: Option '-W %s' unbekannt, ignoriert.\n" +msgid "close of fd %d (`%s') failed (%s)" +msgstr "Schließen von Dateideskriptor %d ('%s') gescheitert (%s)." -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "Leeres Argument für '--source' ignoriert." +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" +msgstr "Ungültiger Tree-Typ %s in redirect()." -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "" -"Umgebungsvariable 'POSIXLY_CORRECT' ist gesetzt: '--posix' angeschaltet." +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "Ausdruck in '%s' Umlenkung hat nur einen numerischen Wert." -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "'--posix' hat Vorrang vor '--traditional'" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "Ausdruck für '%s' Umlenkung ist ein leerer String." -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "'--posix' /'--traditional' hat Vorrang vor '--non-decimal-data'." +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"Dateiname '%s' für '%s' Umlenkung kann Ergebnis eines logischen Ausdrucks " +"sein." -#: main.c:449 -#, fuzzy, c-format -msgid "running %s setuid root may be a security problem" -msgstr "%s als setuid root auszuführen, kann zu Sicherheitsproblemen führen." +#: io.c:521 +#, c-format +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "Unnötige Kombination von '>' und '>>' für Datei '%.*s'." -#: main.c:478 +#: io.c:573 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "Kann Mode für stdin nicht setzen (%s)." +msgid "can't open pipe `%s' for output (%s)" +msgstr "Kann Pipe '%s' nicht für Ausgabe öffnen (%s)." -#: main.c:481 +#: io.c:582 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "Kann Mode für stdout nicht setzen (%s)." +msgid "can't open pipe `%s' for input (%s)" +msgstr "Kann Pipe '%s' nicht für Eingabe öffnen (%s)." -#: main.c:483 +#: io.c:595 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "Kann Mode für stderr nicht setzen (%s)." +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)." -#: main.c:512 -msgid "no program text at all!" -msgstr "Kein Programmtext." +#: io.c:599 +#, c-format +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "Kann bidirektionale Pipe '%s' nicht für Ein-/Ausgabe öffnen (%s)." -#: main.c:556 +#: io.c:675 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -f PROGRAM [--] Datei ...\n" +msgid "can't redirect from `%s' (%s)" +msgstr "Kann nicht von '%s' umlenken (%s)." -#: main.c:558 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -- %cPROGRAM%c Datei ...\n" +msgid "can't redirect to `%s' (%s)" +msgstr "Kann nicht auf '%s' umlenken (%s)." -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "" +"Systemgrenze offener Dateien erreicht; beginne mit Multiplexing von " +"Dateideskriptoren." -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n" +#: io.c:729 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "Schließen von '%s' gescheitert (%s)." + +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "Zu viele Pipes oder Eingabedateien offen." + +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: Zweites Argument muss 'to' oder 'from' sein." + +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess." + +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "'close' für eine Umlenkung, die nie geöffnet wurde." + +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: Umlenkung '%s' nicht mit '[&' geöffnet, zweites Argument wird " +"ignoriert." + +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "Fehlerstatus (%d) beim Schließen der Pipe '%s' (%s)." + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "Fehlerstatus (%d) beim Schließen de rDatei '%s' (%s)." + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "Das explizite des Sockets '%s' fehlt." + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "Das explizite Schließen des Ko-Prozesses '%s' fehlt." + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "Das explizite Schließen der Pipe '%s' fehlt." + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "Das explizite Schließen der Datei '%s' fehlt." + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "Fehler beim Schreiben auf stdout (%s)." + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "Fehler beim Schreiben auf stderr (%s)." + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "Leeren der Pipe '%s' gescheitert (%s)." + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "Ko-Prozess: Leeren der Pipe zu '%s' gescheitert (%s)." + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "Flush der Datei '%s' gescheitert (%s)." + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "/inet/raw Client noch nicht fertig." + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "Nur root darf '/inet/raw' benutzen" + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "'/inet/raw'-Server noch nicht fertig." + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "Kein bekanntes Protokoll in Dateinamen '%s' angegeben." + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "Dateiname '%s' ist unvollständig." + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "Lokaler Port in '%s' ist ungültig." + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "Sie müssen einen Rechnernamen in '/inet' angeben." + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "Sie müssen einen Port in '/inet' angeben." + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "Port-Angabe in '%s' ist ungültig." + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "TCP/IP-Verbindungen sind nicht möglich." + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "Datei '%s' ist ein Verzeichnis." + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'." + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "Konnte '%s' nicht öffnen, Mode '%s'." + +#: io.c:1703 +#, fuzzy, c-format +msgid "close of master pty failed (%s)" +msgstr "Schließen der Pipe gescheitert (%s)." + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "Schließen von stdout in Kindprozess gescheitert (%s)." + +#: io.c:1708 +#, fuzzy, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "Schließen von stdin im Kindprozess gescheitert (%s)." + +#: io.c:1713 +#, fuzzy, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." + +#: io.c:1715 io.c:1734 +#, fuzzy, c-format +msgid "close of slave pty failed (%s)" +msgstr "Schließen der Pipe gescheitert (%s)." + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "Schließen der Pipe gescheitert (%s)." + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "'|&' nicht möglich." + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "Kann Pipe '%s' nicht öffnen (%s)." + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "Kann Kindprozess für '%s' nicht erzeugen (fork: %s)." + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "Datei '%s' ist leer." + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "Fehler beim Lesen der Eingabedatei '%s': %s." + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "Multicharacter-Wert von 'RS' ist eine gawk-Erweiterung." + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "Option '-m[fr]' ist in gawk bedeutungslos." + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "Anwendung der Option -m: '-m[fr] nnn'" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: Option '-W %s' unbekannt, ignoriert.\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "Leeres Argument für '--source' ignoriert." + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "" +"Umgebungsvariable 'POSIXLY_CORRECT' ist gesetzt: '--posix' angeschaltet." + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "'--posix' hat Vorrang vor '--traditional'" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "'--posix' /'--traditional' hat Vorrang vor '--non-decimal-data'." + +#: main.c:468 +#, fuzzy, c-format +msgid "running %s setuid root may be a security problem" +msgstr "%s als setuid root auszuführen, kann zu Sicherheitsproblemen führen." + +#: main.c:509 +#, fuzzy, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "Kann Mode für stdin nicht setzen (%s)." + +#: main.c:512 +#, fuzzy, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "Kann Mode für stdout nicht setzen (%s)." + +#: main.c:514 +#, fuzzy, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "Kann Mode für stderr nicht setzen (%s)." + +#: main.c:544 +msgid "no program text at all!" +msgstr "Kein Programmtext." + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -f PROGRAM [--] Datei ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "Anwendung: %s [POSIX- oder GNU-Optionen] -- %cPROGRAM%c Datei ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "POSIX-Optionen\t\tGNU-Optionen (lang):\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f PROGRAM\t\t--file=PROGRAM\n" -#: main.c:565 +#: main.c:621 msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "\t-F Feldtrenner\t\t\t--field-separator=Feldtrenner\n" -#: main.c:566 +#: main.c:622 msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "\t-v var=Wert\t\t--assign=var=Wert\n" -#: main.c:567 +#: main.c:623 msgid "\t-m[fr] val\n" msgstr "\t-m[fr] Wert\n" -#: main.c:568 +#: main.c:624 msgid "\t-W compat\t\t--compat\n" msgstr "\t-W compat\t\t--compat\n" -#: main.c:569 +#: main.c:625 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:570 +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=Datei]\t--dump-variables[=Datei]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=Datei]\t--profile[=Datei]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=Programmtext\t--source=Programmtext\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 +#: main.c:649 #, fuzzy msgid "" "\n" @@ -657,21 +1479,21 @@ "den Sie im Kapitel 'Reporting Problems and Bugs' in der \n" "gedruckten Version finden.\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: main.c:613 +#: main.c:669 #, fuzzy, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -691,7 +1513,7 @@ "spätere Version.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -705,7 +1527,7 @@ "GNU General Public License for more details.\n" "\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -716,99 +1538,115 @@ "Software Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-" "1307, USA.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft setzt FS im POSIX-awk nicht auf Tab." -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "Ungültige Syntax im Namen '%s' für Variablenzuweisung." +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "Floating point exception" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "Fataler Fehler: interner Fehler" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "Kein geöffneter Dateideskriptor %d" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "Konnte /dev/null nicht für Dateideskriptor %d öffnen." -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "Konnte Gruppen nicht finden: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "Konnte '%s' nicht zum Schreiben öffnen: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "Kommandozeile:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "Schicke Profile auf Stadard-Fehlerausgabe." +#: msg.c:120 +msgid "warning: " +msgstr "Warnung: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "Interner Fehler: Node_var with null vname." +#: msg.c:142 +msgid "error: " +msgstr "Fehler: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "Interner Fehler: Node_var_array with null vname." +#: msg.c:178 +msgid "fatal: " +msgstr "Fatal: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"Funktion '%s' mit Leerzeichen zwischen Name und '(' aufgerufen, \n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "Kann String nicht in Gleitkommazahl konvertieren." -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "or in anderem Kontext benutzt" +#: node.c:357 +msgid "backslash at end of string" +msgstr "Backslash am String-Ende." -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "Versuch, das Array '%s' in Skalarkontext zu verwenden." +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX erlabut keine '\\x'-Escapes." -#: profile.c:637 eval.c:1047 -#, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "Illegaler Typ (%s) in tree_eval" +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "Keine Hex-Ziffern in '\\x'-Escape." -#: profile.c:842 eval.c:1790 +#: node.c:584 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "Versuch, die Funktion '%s' als Array zu verwenden." +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "Escape-Sequenz '\\%c' als '%c' behandelt." + +#: posix/gawkmisc.c:172 +#, fuzzy, c-format +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s '%s': Konnte close-on-exec nicht setzen: %s" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "'%s' ist eine Funktion, Zuweisungen sind nicht erlaubt." +msgid "could not open `%s' for writing: %s" +msgstr "Konnte '%s' nicht zum Schreiben öffnen: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "Interner Fehler: Node_var with null vname." + +#: profile.c:471 +msgid "# treated internally as `delete'" msgstr "" -"Zuweisungen an das Ergebnis einer eingebauten Funktion sind nicht erlaubt." -#: profile.c:1108 +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "Interner Fehler: Node_var_array with null vname." + +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawk-Profil, erzeugt %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -816,7 +1654,7 @@ "\t# BEGIN block(s)\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -824,7 +1662,7 @@ "\t# Rule(s)\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -832,7 +1670,7 @@ "\t# END block(s)\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -840,928 +1678,143 @@ "\n" "\t# Functionen, alphabetisch sortiert\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "Unerwarteter Typ %s in prec_level." -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" + +#: regcomp.c:136 msgid "Success" msgstr "Erfolg" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "Kein Treffer" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Ungültiger Regulärer Ausdruck." -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "Ungültiges Zeichen." -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Ungültier Name für Zeichenklasse." -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "Angehängter Backslash" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Ungültige Referenze" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "[ oder [^ nicht geschlossen" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "( oder \\( nicht geschlossen" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "\\{ nicht geschlossen" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Ungültiger Inhalt von \\{\\}" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Ungültiges Bereichsende" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Kein Speicher mehr." -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Vorangehender Regulärer Ausdruck ist ungültig." -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Vorzeitiges Ende des Regulären Ausdrucks." -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "Regulärer Ausdruck zu groß." -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr ") oder \\) nicht geöffnet" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "Kein vorangehender Regulärer Ausdruck." -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "BEGIN-Blöcke müssen einen Aktionsteil haben." - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "END-Blöcke müssen einen Aktionsteil haben." - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "'%s' ist eine eingebaute Funktion und kann nicht umdefiniert werden." - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "Statement möglicherweise ohne Effekt." - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "'next' in BEGIN- oder END-Aktion benutzt." - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "'nextfile' ist eine gawk-Erweiterung." - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "'nextfile' in BEGIN- oder END-Aktion benutzt." - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "'return' außerhalb einer Funktion benutzt." - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"Einfaches 'print' in BEGIN- oder END-Regel soll vermutlich 'print \"\"' sein." - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "'delete array' ist eine gawk-Erweiterung." - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "'multistage' Zweiwege-Pipes funktionieren nicht." - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "Regulärer Ausdruck auf der rechten Seite einer Zuweisung." - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "" -"Nicht-umgelenktes 'getline' ist innerhalb der END-Aktion nicht definiert." - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "Regulärer Ausdruck links vom '~'- oder '!~'-Operator." - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"Konstanter Regulärer Ausdruck '/%s' sieht wie ein C-Kommentar aus, ist aber " -"keiner." - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "Regulärer Ausdruck rechts von einem Vergleich." - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "" -"Nicht-umgelenktes 'getline' ist innerhalb der BEGIN- und END-Aktion nicht " -"definiert." - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "Aufruf von 'length' ohne Klammern ist nicht portabel." - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "Aufruf von 'length' ohne Klammern ist in POSIX-Mode veraltet." - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "Ungültiger Index-Ausdruck." - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "fptr %x nicht in tokentab\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "Unerwartetes Zeilenende" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "Kein Programmtext auf der Kommandozeile." - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "Kann Quelldatei '%s' nicht zum Lesen öffnen (%s)." - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "Kann Quelldatei '%s' nicht lesen (%s)." - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "Quelldatei '%s' ist leer." - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "Quelldatei hört nicht mit Zeilenende auf." - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "" -"Nicht-beendeter Regulärer Ausdruck (hört mit '\\' auf) am Ende der Datei." - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "Nicht-beendeter Regulärer Ausdruck" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "Nicht-beendeter Regulärer Ausdruck am Dateiende." - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "" -"Die Verwendung von '\\#...' zur Fortsetzung von Zeilen ist nicht portabel." - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "Backslash ist nicht letztes Zeichen auf der Zeile." - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX erlaubt den Operator '**=' nicht." - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "Das alte awk erlaubt den Operator '**=' nicht." - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX erlaubt den Operator '**' nicht." - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "Das alte awk erlaubt den Operator '**' nicht." - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "Das alte awk kennt den Operator '^=' nicht." - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "Das alte awk kennt den Operator '^' nicht." - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "Nicht-beendeter String" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "Ungültiges Zeichen '%c' in einem Ausdruck." - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "'%s' ist eine gawk-Erweiterung" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "'%s' ist eine Erweiterung der Bell Labs." - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX gestattet '%s' nicht." - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "Das alte awk gestattet '%s' nicht." - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "'goto' gilt als schlechter Stil!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "Unzulässige Argumentzahl %d für %s." - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: Das dritte Argument ist eine gawk-Erweiterung." - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: Ein String als letztes Argument von substitute hat keinen Effekt." - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "Der dritte Parameter von sub ist ein unveränderliches Objekt." +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "BEGIN-Blöcke müssen einen Aktionsteil haben." -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "Der dritte Parameter von gsub ist ein unveränderliches Objekt." +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "'nextfile' in BEGIN- oder END-Aktion benutzt." -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: Das zweite Argument ist eine gawk-Erweiterung." +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "Der dritte Parameter von gsub ist ein unveränderliches Objekt." -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" -"Entfernen Sie den führenden Unterstrich." +#~ msgid "or used in other expression context" +#~ msgstr "or in anderem Kontext benutzt" -#: awkgram.y:2232 -#, fuzzy -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"Fehlerhafte Verwendung von dcgettext(_\"...\"): \n" -"Entfernen Sie den führenden Unterstrich." +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "Versuch, die Funktion '%s' als Array zu verwenden." -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "Funktion '%s': Parameter #%d, '%s' wiederholt Parameter #%d." +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "'%s' ist eine Funktion, Zuweisungen sind nicht erlaubt." -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "Funktion '%s': Parameter '%s' verdeckt eine globale Variable." +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "Interner Fehler: Datei '%s', Zeile %d\n" -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "Kann '%s' nicht zum Schreiben öffnen (%s)." +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "" +#~ "Nicht-umgelenktes 'getline' ist innerhalb der BEGIN- und END-Aktion nicht " +#~ "definiert." -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: close gescheitert (%s)." +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "fptr %x nicht in tokentab\n" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() zweimal aufgerufen!" +#~ msgid "Unbalanced [" +#~ msgstr "[ wird nicht geschlossen." -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "Funktion '%s': Kann Funktionsnamen nicht als Parameternamen benutzen." +#~ msgid "Unfinished \\ escape" +#~ msgstr "Nicht-beendetes \\\\-Escape." -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "Funktion '%s' ist bereits definiert." +#~ msgid "unfinished repeat count" +#~ msgstr "Nicht-beendeter Wiederholungszähler." -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "Aufgerufene funktion '%s' ist nirgends definiert." +#~ msgid "malformed repeat count" +#~ msgstr "Fehlerhafter Wiederholungszähler." -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "Funktion '%s' wird nirgends aufgerufen." +#~ msgid "Unbalanced (" +#~ msgstr "( wird nicht geschlossen." -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"Konstanter Regulärer Ausdruck für Parameter #%d ergibt einen logischen Wert." +#~ msgid "No regexp syntax bits specified" +#~ msgstr "Kein Regulärer Ausdruck angegeben." -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "[ wird nicht geschlossen." - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "Nicht-beendetes \\\\-Escape." - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "Nicht-beendeter Wiederholungszähler." - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "Fehlerhafter Wiederholungszähler." - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "( wird nicht geschlossen." - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "Kein Regulärer Ausdruck angegeben." - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr ") wird nicht geöffnet." +#~ msgid "Unbalanced )" +#~ msgstr ") wird nicht geöffnet." -#: dfa.c:3014 -msgid "out of memory" -msgstr "Kein Speicher mehr." +#~ msgid "out of memory" +#~ msgstr "Kein Speicher mehr." -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: Zweites Argument ist kein Array." - -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: Null-String als drittes Argument ist eine gawk-Erweiterung." - -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "'FIELDWIDTHS' ist eine gawk-Erweiterung." - -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "Feld %d in FIELDWIDTHS muss > 0 sein." - -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "Null-String für 'FS' ist eine gawk-Erweiterung." - -#: msg.c:57 -msgid "cmd. line:" -msgstr "Kommandozeile:" - -#: msg.c:123 -msgid "warning: " -msgstr "Warnung: " - -#: msg.c:145 -msgid "error: " -msgstr "Fehler: " - -#: msg.c:178 -msgid "fatal: " -msgstr "Fatal: " - -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "Unbekannter Knotentyp %d" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "Pufferüberlauf in genflags2str." - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "" -"for-Schleife: Array '%s' ändert Größse von %d zu %d innerhalb der Schleife." - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "'break' außerhalb einer Schleife ist nicht portabel." - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "'break' außerhalb einer Schleife ist nicht zulässig." - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "'continue' außerhalb einer Schleife ist nicht portabel." - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "'continue' außerhalb einer Schleife ist nicht zulässig." - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "'next' kann nicht in einer BEGIN-Regel benutzt werden." - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "'next' kann nicht in einer END-Regel benutzt werden." - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "'nextfile' kann nicht in einer BEGIN-Regel benutzt werden." - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "'nextfile' kann nicht in einer END-Regel benutzt werden." - -#: eval.c:679 -msgid "statement has no effect" -msgstr "Anweisung hat keinen Effekt." - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "Referenz auf die nicht-initialisierte Variable '%s'." - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "Kann Funktion '%s' nicht als Variable oder Array verwenden." - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "Referenz auf nicht-initialisiertes Argument '%s'." - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "Zuweisung in einer Bedingung." - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"Konkatenierung: Seiteneffekte in einem Ausdruck haben die Länge des anderen\n" -"geändert!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "Division durch Null versucht." - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "Division durch Null versucht in '%%'." - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "Division durch Null versucht in '/='." - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "Division durch Null versucht in '%%='." - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (von %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "Funktion '%s' mit zu vielen Argumenten aufgerufen." - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "Funktion '%s' ist nicht definiert." - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "Funktion %s aufgerufen\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Funktion Aufruf-Stack\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "Nicht-numerischer Wert für Feldreferenz verwendet." - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "Referenz von einem Null-String" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "Versuch des Zugriffs auf Feld %d." - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "Versuch den skalaren Parameter '%s' als Array zu benutzen." - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "'IGNORECASE' ist eine gawk-Erweiterung" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "'BINMODE' ist eine gawk-Erweiterung." - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "Falsche '%sFMT'-Angabe '%s'" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "'--lint' wird abgeschaltet, da 'LINT' gesetzt ist." - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "Kann Datei '%s' nicht zum Lesen öffnen (%s)." - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "Schließen von Dateideskriptor %d ('%s') gescheitert (%s)." - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "Ungültiger Tree-Typ %s in redirect()." - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "Ausdruck in '%s' Umlenkung hat nur einen numerischen Wert." - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "Ausdruck für '%s' Umlenkung ist ein leerer String." - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"Dateiname '%s' für '%s' Umlenkung kann Ergebnis eines logischen Ausdrucks " -"sein." - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "Unnötige Kombination von '>' und '>>' für Datei '%.*s'." - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "Kann Pipe '%s' nicht für Ausgabe öffnen (%s)." - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "Kann Pipe '%s' nicht für Eingabe öffnen (%s)." - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "Kann bidirektionalen Socket '%s' nicht für Ein-/Ausgabe öffnen (%s)." - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "Kann bidirektionale Pipe '%s' nicht für Ein-/Ausgabe öffnen (%s)." - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "Kann nicht von '%s' umlenken (%s)." - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "Kann nicht auf '%s' umlenken (%s)." - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"Systemgrenze offener Dateien erreicht; beginne mit Multiplexing von " -"Dateideskriptoren." - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "Schließen von '%s' gescheitert (%s)." - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "Zu viele Pipes oder Eingabedateien offen." - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: Zweites Argument muss 'to' oder 'from' sein." - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: '%.*s' ist keine offene Datei, Pipe oder Ko-Prozess." - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "'close' für eine Umlenkung, die nie geöffnet wurde." - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: Umlenkung '%s' nicht mit '[&' geöffnet, zweites Argument wird " -"ignoriert." - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "Fehlerstatus (%d) beim Schließen der Pipe '%s' (%s)." - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "Fehlerstatus (%d) beim Schließen de rDatei '%s' (%s)." - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "Das explizite des Sockets '%s' fehlt." - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "Das explizite Schließen des Ko-Prozesses '%s' fehlt." - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "Das explizite Schließen der Pipe '%s' fehlt." - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "Das explizite Schließen der Datei '%s' fehlt." - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "Fehler beim Schreiben auf stdout (%s)." - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "Fehler beim Schreiben auf stderr (%s)." - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "Leeren der Pipe '%s' gescheitert (%s)." - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "Ko-Prozess: Leeren der Pipe zu '%s' gescheitert (%s)." - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "Flush der Datei '%s' gescheitert (%s)." - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw Client noch nicht fertig." - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "Nur root darf '/inet/raw' benutzen" - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "'/inet/raw'-Server noch nicht fertig." - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "Kein bekanntes Protokoll in Dateinamen '%s' angegeben." - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "Dateiname '%s' ist unvollständig." - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "Lokaler Port in '%s' ist ungültig." - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "Sie müssen einen Rechnernamen in '/inet' angeben." - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "Sie müssen einen Port in '/inet' angeben." - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "Port-Angabe in '%s' ist ungültig." - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP-Verbindungen sind nicht möglich." - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "Datei '%s' ist ein Verzeichnis." - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "Benutzen Sie 'PROCINFO[\"%s\"]' statt '%s'" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "Benutzen Sie 'PROCINFO[...] statt '/dev/user'." - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "Konnte '%s' nicht öffnen, Mode '%s'." - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdout in Kindprozess gescheitert (dup: %s)." - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "Verschieben der Pipe zu stdin in Kindprozess gescheitert (dup: %s)." - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "Schließen von stdout in Kindprozess gescheitert (%s)." - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "Schließen von stdin im Kindprozess gescheitert (%s)." - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "Schließen der Pipe gescheitert (%s)." - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "'|&' nicht möglich." - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "Kann Pipe '%s' nicht öffnen (%s)." - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "Kann Kindprozess für '%s' nicht erzeugen (fork: %s)." - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "Datei '%s' ist leer." - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "Interner Fehler: Datei '%s', Zeile %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "Fehler beim Lesen der Eingabedatei '%s': %s." - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "Multicharacter-Wert von 'RS' ist eine gawk-Erweiterung." - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "Kann String nicht in Gleitkommazahl konvertieren." - -#: node.c:342 -msgid "backslash at end of string" -msgstr "Backslash am String-Ende." - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX erlabut keine '\\x'-Escapes." - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "Keine Hex-Ziffern in '\\x'-Escape." - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "Escape-Sequenz '\\%c' als '%c' behandelt." - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: posix/gawkmisc.c:122 -#, fuzzy, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s '%s': Konnte close-on-exec nicht setzen: %s" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "Ungültige Syntax im Namen '%s' für Variablenzuweisung." #~ msgid "" #~ "\n" diff -urN gawk-3.1.1/po/es.po gawk-3.1.2/po/es.po --- gawk-3.1.1/po/es.po 2002-05-01 16:40:58.000000000 +0300 +++ gawk-3.1.2/po/es.po 2003-03-19 14:25:12.000000000 +0200 @@ -1,438 +1,949 @@ -# Mensajes en español para gawk-3.1.1a. -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. -# Cristian Othón Martínez Vera , 2001, 2002. +# Mensajes en español para gawk-3.1.1m. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# Cristian Othón Martínez Vera , 2001, 2002, 2003. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.1a\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" -"PO-Revision-Date: 2002-04-28 14:16-0600\n" +"Project-Id-Version: gawk 3.1.1m\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" +"PO-Revision-Date: 2003-02-27 17:38-0600\n" "Last-Translator: Cristian Othón Martínez Vera \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "se intentó usar el dato escalar `%s' como un arreglo" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referencia al elemento sin valor inicial `%s[\"%s\"]'" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "el subíndice de la matriz `%s' es la cadena nula" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "delete: uso ilegal de la variable `%s' como una matriz" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: el índice `%s' no está en la matriz `%s'" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "delete: uso ilegal de la variable `%s' como una matriz" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vacío (nulo)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vacío (cero)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tamaño_tabla = %d, tamaño_matriz = %d\n" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "%s: es un parámetro\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref a %s\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: el primer argumento no es una matriz" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: el segundo argumento no es una matriz" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "Los bloques %s deben tener una parte de acción" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "cada regla debe tener un patrón o una parte de acción" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "`%s' es una función interna, no se puede redefinir" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "" +"la constante de expresión regular `/%s/' parece un comentario de C, pero no " +"lo es" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "la sentencia puede no tener efecto" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "se usó `%s' en la acción %s" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "`nextfile' es una extensión de gawk" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "se usó `return' fuera del contexto de la función" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" +"el `print' simple en la regla BEGIN o END probablemente debe ser `print \"\"'" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "`delete array' es una extensión de gawk" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "`delete(array)' es una extensión de gawk que no es transportable" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "las líneas de trabajo de dos vías multiestado no funcionan" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "expresión regular del lado derecho de una asignación" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "expresión regular a la izquierda del operador `~' o `!~'" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "expresión regular a la derecha de una comparación" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "`getline' no redirigido indefinido dentro de la acción de END" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "la llamada de `length' sin paréntesis no es transportable" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "expresión de subíndice inválida" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "nueva línea o fin de la cadena inesperados" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "texto de programa vacío en la linea de comando" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "no se puede leer el fichero fuente `%s' (%s)" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "el fichero fuente `%s' está vacío" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "el fichero fuente no termina con línea nueva" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "expresión regular sin terminar termina con `\\` al final del fichero" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "expresión regular sin terminar" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "expresión regular sin terminar al final del fichero" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "el uso de la continuación de línea `\\ #...' no es transportable" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "la barra invertida no es el último caracter en la línea" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX no permite el operador `**='" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "el awk antiguo no da soporte al operador `**='" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX no permite el operador `**'" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "el awk antiguo no da soporte al operador `**='" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "el operador `^=' no tiene soporte en el awk antiguo" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "el operador `^' no tiene soporte en el awk antiguo" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "cadena sin terminar" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "caracter '%c' inválido en la expresión" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "`%s' es una extensión de gawk" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "`%s' es una extensión de Bell Labs" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX no permite `%s'" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "`%s' no tiene soporte en el awk antiguo" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "¡`goto' se considera dañino!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d es inválido como número de argumentos para %s" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: el tercer argumento es una extensión de gawk" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "" +"%s: la literal de cadena como último argumento de substitute no tiene efecto" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "el tercer argumento de %s no es un objecto que se puede cambiar" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: el segundo argumento es una extensión de gawk" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "función `%s': parámetro `%s' obscurece la variable global" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "no se puede abrir `%s' para escritura (%s)" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "enviando perfil a la salida estándar de error" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: falló close (%s)" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "¡shadow_funcs() llamada dos veces!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "hay variables opacadas." + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "" +"función `%s': no se puede usar un nombre de función como nombre de parámetro" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "el nombre de función `%s' se definió previamente" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "se llamó a la función `%s' pero nunca se definió" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "la función `%s' está definida pero nunca se llamó" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "" +"la constante de expresión regular para el parámetro #%d da un valor booleano" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"se llamó la función `%s' con espacio entre el nombre y el `(',\n" +"%s" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "o se usó como una variable o una matriz" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "falló %s a \"%s\" (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "salida estándar" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "razón desconocida" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" -msgstr "exp: se recibió un argumento que no es un numéro" +msgstr "exp: se recibió un argumento que no es un número" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: el argumento %g está fuera de rango" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: no se puede limpiar: se abrió la tubería `%s' para lectura, no para " "escritura" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: no se puede limpiar: se abrió el fichero `%s' para lectura, no para " "escritura" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' no es un fichero abierto, tubería o co-proceso" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: el primer argumento recibido no es una cadena" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: el segundo argumento recibido no es una cadena" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" -msgstr "int: se recibió un argumento que no es un numéro" +msgstr "int: se recibió un argumento que no es un número" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: se recibió un argumento que no es una cadena" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" -msgstr "log: se recibió un argumento que no es un numéro" +msgstr "log: se recibió un argumento que no es un número" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: se recibió el argumento negativo %g" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "se debe utilizar `count$' en todos los formatos o en ninguno" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "no se permite `$' en los formatos de awk" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "la cuenta de argumentos con `$' debe ser > 0" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" +msgid "arg count %ld greater than total number of supplied arguments" msgstr "" -"la cuenta de argumentos %d es mayor que el número total de argumentos " +"la cuenta de argumentos %ld es mayor que el número total de argumentos " "proporcionados" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "no se permite `$' después de un punto en el formato" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "" "no se proporciona `$' para el ancho o la precisión del campo posicional" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "no se permite `l' en los formatos POSIX de awk" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "no se permite `L' en los formatos POSIX de awk" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' no tiene significado en los formatos de awk; ignorado" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "no se permite `h' en los formatos POSIX de awk" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "no hay suficientes argumentos para satisfacer a la cadena de formato" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "se acabó ^ para éste" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: el especificador de formato no tiene letras de control" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "se proporcionaron demasiados argumentos para la cadena de formato" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: sin argumentos" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" -msgstr "sqrt: se recibió un argumento que no es un numéro" +msgstr "sqrt: se recibió un argumento que no es un número" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: llamado con el argumento negativo %g" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: el índice de inicio %g es inválido, usando 1" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: el índice de inicio no entero %g será truncado" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: la longitud %g es <= 0" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "substr: la longitud %g es < 0" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: la longitud no entera %g será truncada" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" +"substr: la longitud %g es demasiado grande para ser índice de cadena, se " +"trunca a %g" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: la cadena de origen es de longitud cero" -#: builtin.c:1221 +#: builtin.c:1263 #, c-format -msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" -msgstr "" -"substr: la cadena %d en el índice de inicio %d excede la longitud del primer " -"argumento (%d)" +msgid "substr: start index %g is past end of string" +msgstr "substr: el índice de inicio %g está después del fin de la cadena" -#: builtin.c:1227 +#: builtin.c:1271 #, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: el índice de inicio %d está después del fin de la cadena" +msgid "" +"substr: length %g at start index %g exceeds length of first argument (%lu)" +msgstr "" +"substr: la cadena %g en el índice de inicio %g excede la longitud del primer " +"argumento (%lu)" -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: el primer argumento que se recibió no es una cadena" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: se recibió una cadena de formato vacía" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" -msgstr "strftime: el segundo argumento que se recibió no es un numéro" +msgstr "strftime: el segundo argumento que se recibió no es un número" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: se recibió un argumento que no es una cadena" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: se recibió un argumento que no es una cadena" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: se recibió un argumento que no es una cadena" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: se recibió un argumento que no es una cadena" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" -msgstr "atan2: el primer argumento recibido no es un numéro" +msgstr "atan2: el primer argumento recibido no es un número" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" -msgstr "atan2: el segundo argumento recibido no es un numéro" +msgstr "atan2: el segundo argumento recibido no es un número" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" -msgstr "sin: se recibió un argumento que no es un numéro" +msgstr "sin: se recibió un argumento que no es un número" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" -msgstr "cos: se recibió un argumento que no es un numéro" +msgstr "cos: se recibió un argumento que no es un número" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" -msgstr "srand: se recibió un argumento que no es un numéro" +msgstr "srand: se recibió un argumento que no es un número" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: el tercer argumento no es una matriz" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" -msgstr "gensub: el tercer argumento en 0 es tratado como 1" +msgstr "gensub: el tercer argumento de 0 se trata como 1" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" -msgstr "lshift: el primer argumento recibido no es un numéro" +msgstr "lshift: el primer argumento recibido no es un número" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" "lshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" -msgstr "rshift: el primer argumento recibido no es un numéro" +msgstr "rshift: el primer argumento recibido no es un número" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" "rshift(%lf, %lf): un valor de desplazamiento muy grande dará resultados " "extraños" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: el primer argumento recibido no es un número" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: el primer argumento recibido no es un número" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: el primer argumento recibido no es un número" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): los valores negativos darán resultados extraños" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): los valores fraccionarios serán truncados" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: se recibió un argumento que no es un número" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): el valor negativo dará resultados extraños" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): el valor fraccionario será truncado" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' no es una categoría local válida" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" -msgstr "`extension' es una extensión de gawk" - -#: ext.c:74 +#: eval.c:262 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: no se puede abrir `%s' (%s)\n" +msgid "unknown nodetype %d" +msgstr "tipo de nodo %d desconocido" -#: ext.c:82 +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "desbordamiento de almacenamiento temporal en genflags2str" + +#: eval.c:555 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"ciclo for: la matriz `%s' cambió de tamaño de %ld a %ld durante la ejecución " +"del ciclo" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "`break' fuera de un ciclo no es transportable" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "no se permite `break' fuera de un ciclo" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "`continue' fuera de un ciclo no es transportable" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "no se permite `continue' fuera de un ciclo" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "`next' no se puede llamar desde una regla BEGIN" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "`next' no se puede llamar desde una regla END" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "`nextfile' no se puede llamar desde una regla BEGIN" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "`nextfile' no se puede llamar desde una regla END" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "la sentencia no tiene efecto" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referencia a la variable sin iniciar `%s'" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "no se puede usar el nombre de la función `%s' como variable o matriz" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "referencia al argumento sin iniciar `%s'" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "se intentó usar la matriz `%s' en un contexto escalar" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"concatenación: ¡Los efectos laterales en una expresión han cambiado la " +"longitud de otra!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "se usó una asignación en un contexto condicional" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "se intentó una división por cero" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "se intentó una división por cero en `%%'" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "tipo ilegal (%s) en tree_eval" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "se intentó una división por cero en `/='" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "se intentó una división por cero en `%%='" + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (de %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "se llamó a la función `%s' con más argumentos de los declarados" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "la función `%s' no está definida" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "se llamó a la función %s\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Pila de Llamadas de Funciones:\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- principal --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "se intentó una referencia de campo desde un valor que no es un número" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "se intentó una referencia desde una cadena nula" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "se intentó accesar al campo %d" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "se intentó usar el parámetro escalar `%s como una matriz'" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "no se permite asignación como resultado de una función interna" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' es una extensión de gawk" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' es una extensión de gawk" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "especificación `%sFMT' `%s' errónea" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "desactivando `--lint' debido a una asignación a `LINT'" + +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" +msgstr "`extension' es una extensión de gawk" + +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" +msgstr "extension: no se puede abrir `%s' (%s)\n" + +#: ext.c:82 +#, c-format +msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" "extension: biblioteca `%s': no se puede llamar a la función `%s' (%s)\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "No Se Da Soporte A La Operación" +#: field.c:321 +msgid "NF set to negative value" +msgstr "NF con un valor negativo" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: el segundo argumento no es una matriz" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "" +"split: la cadena nula para el tercer argumento es una extensión de gawk" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "`FIELDWIDTHS' es una extensión gawk" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "el campo %d en FIELDWIDTHS, debe ser > 0" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "la cadena nula para `FS' es una extensión de gawk" + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -473,7 +984,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: opción inválida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: la opción requiere un argumento -- %c\n" @@ -488,170 +999,484 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: la opción `-W %s' no admite ningún argumento\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "la opción -m[fr] es irrelevante en gawk" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "no se puede abrir el fichero `%s' para lectura (%s)" -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "uso de la opción -m: `-m[fr]' nnn" +#: io.c:344 +#, c-format +msgid "close of fd %d (`%s') failed (%s)" +msgstr "falló al cerrar el df %d (`%s') (%s)" -#: main.c:326 +#: io.c:482 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: no se reconoce la opción `-W %s', ignorada\n" +msgid "invalid tree type %s in redirect()" +msgstr "tipo de árbol %s inválido en redirect()" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "se ignora el argumento vacío para `--source'" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "la expresión en la redirección `%s' sólo tiene un valor numérico" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "" -"la variable de ambiente `POSIXLY_CORRECT' está establecida: activando `--" -"posix'" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' se impone a `--traditional'" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"el fichero `%s' para la redirección `%s' puede ser resultado de una " +"expresión lógica" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" +#: io.c:521 +#, c-format +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" -#: main.c:449 +#: io.c:573 #, c-format -msgid "running %s setuid root may be a security problem" -msgstr "ejecutar %s como setuid root puede ser un problema de seguridad" +msgid "can't open pipe `%s' for output (%s)" +msgstr "no se puede abrir la tubería `%s' para la salida (%s)" -#: main.c:478 +#: io.c:582 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "no se puede establecer el modo en la entrada estándar (%s)" +msgid "can't open pipe `%s' for input (%s)" +msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" -#: main.c:481 +#: io.c:595 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "no se puede establecer el modo en la salida estándar (%s)" +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "" +"no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)" -#: main.c:483 +#: io.c:599 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "no se puede establecer el modo en la salida estándar de error (%s)" +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)" -#: main.c:512 -msgid "no program text at all!" -msgstr "¡No hay ningún programa de texto!" +#: io.c:675 +#, c-format +msgid "can't redirect from `%s' (%s)" +msgstr "no se puede redirigir desde `%s' (%s)" -#: main.c:556 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgid "can't redirect to `%s' (%s)" +msgstr "no se puede redirigir a `%s' (%s)" + +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" msgstr "" -"Modo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] " -"fichero ...\n" +"se alcanzó el límite del sistema para ficheros abiertos: comenzando a " +"multiplexar los descriptores de fichero" -#: main.c:558 +#: io.c:729 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c " -"fichero ...\n" +msgid "close of `%s' failed (%s)." +msgstr "falló al cerrar `%s' (%s)." -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "demasiadas tuberías o ficheros de entrada abiertos" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fichprog\t\t--file=fichprog\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: el segundo argumento debe ser `to' o `from'" -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F sc\t\t\t--field-separator=sc\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=valor\t\t--assign=var=valor\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "cerrado de una redirección que nunca fue abierta" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valor\n" +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: la redirección `%s' no se abre con `|&', se ignoró el segundo " +"argumento" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "estado de fallo (%d) al cerrar la tubería de `%s' (%s)" -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "estado de fallo (%d) al cerrar el fichero de `%s' (%s)" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "no se provee el cerrado explícito del `socket' `%s'" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "no se provee el cerrado explícito del co-proceso `%s'" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "no se provee el cerrado explícito del la tubería `%s'" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "no se provee el cerrado explícito del fichero `%s'" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "error al escribir en la salida estándar (%s)" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "error al escribir en la salida estándar de error (%s)" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "falló la limpieza de la tubería de `%s' (%s)." + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)." + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "falló la limpieza del fichero de `%s' (%s)." + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "el cliente /inet/raw no está listo aún, perdón" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "sólo root puede utilizar `/inet/raw'." + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "el servidor /inet/raw no está listo aún, perdón" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "" +"no se proporciona algún protocolo (conocido) en el nombre de fichero " +"especial `%s'" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "el nombre de fichero especial `%s' está incompleto" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "puerto local inválido en `%s'" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "se debe proporcionar a `/inet' un puerto remoto" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "puerto remoto inválido en `%s'" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "No tienen soporte las comunicaciones TCP/IP" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "el fichero `%s' es un directorio" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "use `PROCINFO[...]' en lugar de `/dev/user'" + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "no se puede abrir `%s', modo `%s'" + +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "falló al cerrar el pty maestro (%s)" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "falló al cerrar la salida estándar en el hijo (%s)" + +#: io.c:1708 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "" +"falló el movimiento del pty esclavo a la salida estándar en el hijo (dup: %s)" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "falló al cerrar la entrada estándar en el hijo (%s)" + +#: io.c:1713 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "" +"falló el movimiento del pty esclavo a la entrada estándar en el hijo (dup: %" +"s)" + +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "falló al cerrar el pty esclavo (%s)" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "" +"falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "falló la restauración de la salida estándar en el proceso padre\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "falló la restauración de la entrada estándar en el proceso padre\n" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "falló al cerrar la tubería (%s)" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "`|&' no tiene soporte" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "no se puede abrir la tubería `%s' (%s)" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "no se puede crear el proceso hijo para `%s' (fork: %s)" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "el fichero de datos `%s' está vacío" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "no se puede reservar más memoria de entrada" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "error al leer el fichero de entrada `%s': %s" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "el valor multicaracter de `RS' es una extensión de gawk" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "la opción -m[fr] es irrelevante en gawk" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "uso de la opción -m: `-m[fr]' nnn" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: no se reconoce la opción `-W %s', se ignora\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "se ignora el argumento vacío para `--source'" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "" +"la variable de ambiente `POSIXLY_CORRECT' está establecida: activando `--" +"posix'" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "`--posix' se impone a `--traditional'" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "`--posix'/`--traditional' se imponen a `--non-decimal-data'" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "ejecutar %s como setuid root puede ser un problema de seguridad" + +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "no se puede establecer el modo binario en la entrada estándar (%s)" + +#: main.c:512 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "no se puede establecer el modo binario en la salida estándar (%s)" + +#: main.c:514 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "" +"no se puede establecer el modo binario en la salida estándar de error (%s)" + +#: main.c:544 +msgid "no program text at all!" +msgstr "¡No hay ningún programa de texto!" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"Modo de empleo: %s [opciones estilo POSIX o GNU] -f fichprog [--] " +"fichero ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "" +"Modo de empleo: %s [opciones estilo POSIX o GNU] [--] %cprograma%c " +"fichero ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "Opciones POSIX:\t\tOpciones largas GNU:\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f fichprog\t\t--file=fichprog\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "\t-F sc\t\t\t--field-separator=sc\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "\t-v var=valor\t\t--assign=var=valor\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr "\t-m[fr] valor\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr "\t-W compat\t\t--compat\n" + +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:570 +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fichero]\t--dump-variables[=fichero]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fichero]\t--profile[=fichero]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" # Esta es la línea más larga de la lista de argumentos. # Probar con gawk para revisar tabuladores. cfuga -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=texto-prog\t--source=texto-prog\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -664,7 +1489,7 @@ "impresa.\n" "\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -674,7 +1499,7 @@ "Por omisión lee la entrada estándar y escribe en la salida estándar.\n" "\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -684,7 +1509,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' fichero\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -704,7 +1529,7 @@ "(a su elección) cualquier versión posterior.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -718,7 +1543,7 @@ "Licencia Pública General de GNU para más detalles.\n" "\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -728,98 +1553,117 @@ "junto con este programa; si no es así, escriba a la Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft no establece FS a tabulador en el awk de POSIX" -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" +"%s: el argumento `%s' para `-v' no es de la forma `var=valor'\n" +"\n" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "`%s' no es un nombre de variable legal" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "sintaxis inválida en el nombre `%s' para la asignación de variable" +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "`%s' no es un nombre de variable, se busca el fichero `%s=%s'" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "excepción de coma flotante" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "error fatal: error interno" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "no existe el df %d abierto previamente" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "no se puede abrir previamente /dev/null para el df %d" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "no se pueden encontrar los grupos: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "no se puede abrir `%s' para escritura: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "línea ord.:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "enviando perfil a la salida estándar de error" +#: msg.c:120 +msgid "warning: " +msgstr "aviso: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "error interno: Node_var con vname nulo" +#: msg.c:142 +msgid "error: " +msgstr "error: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "error interno: Node_var_array con vname nulo" +#: msg.c:178 +msgid "fatal: " +msgstr "fatal: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"se llamó la función `%s' con espacio entre el nombre y el `(',\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "no se puede convertir una cadena a coma flotante" + +#: node.c:357 +msgid "backslash at end of string" +msgstr "barra invertida al final de la cadena" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "se usó or en otro contexto de la expresión" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX no permite escapes `\\x'" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "se intentó usar la matriz `%s' en un contexto escalar" +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" -#: profile.c:637 eval.c:1047 +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipo ilegal (%s) en tree_eval" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "la secuencia de escape `\\%c' tratada como una simple `%c'" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "se intentó usar la función `%s' como una matriz" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s `%s': no se puede establecer close-on-exec: (fcntl: %s)" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "`%s' es una función, no se permite asignación" +msgid "could not open `%s' for writing: %s" +msgstr "no se puede abrir `%s' para escritura: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "no se permite asignación como resultado de una función interna" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "error interno: Node_var con vname nulo" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "# se trata internamente como `delete'" + +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "error interno: Node_var_array con vname nulo" -#: profile.c:1108 +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# perfil de gawk, creado %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -827,7 +1671,7 @@ "\t# bloque(s) BEGIN\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -835,7 +1679,7 @@ "\t# Regla(s)\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -843,7 +1687,7 @@ "\t# bloque(s) END\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -851,932 +1695,145 @@ "\n" "\t# Funciones, enumeradas alfabéticamente\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipo %s inesperado en prec_level" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" +"falló la coincidencia de la expresión regular, no hay suficiente memoria " +"para que coincida la cadena \"%.*s%s\"" + +#: regcomp.c:136 msgid "Success" msgstr "Éxito" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "No hay coincidencia" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Expresión regular inválida" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "Caracter de ordenación inválido" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Nombre de clase de caracter inválido" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "Barra invertida extra al final" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Referencia hacia atrás inválida" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "[ o [^ desemparejados" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "( o \\( desemparejados" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "\\{ desemparejado" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Contenido inválido de \\{\\}" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Final de rango inválido" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Memoria agotada" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Expresión regular precedente inválida" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Fin prematuro de la expresión regular" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "La expresión regular es demasiado grande" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr ") o \\) desemparejados" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "No hay una expresión regular previa" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "Los bloques BEGIN deben tener una parte de acción" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "Los bloques END deben tener una parte de acción" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' es una función interna, no puede ser redefinida" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "la sentencia puede no tener efecto" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "`next' es usado en la acción de BEGIN o END" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' es una extensión de gawk" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "`nextfile' es usado en la acción de BEGIN o END" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "`return' es usado fuera del contexto de la función" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -" el `print' simple en la regla BEGIN o END probablemente debe ser `print " -"\"\"'" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' es una extensión de gawk" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "las líneas de trabajo de dos vías multiestado no funcionan" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "expresión regular del lado derecho de una asignación" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' no redirigido indefinido dentro de la acción de END" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "expresión regular a la izquierda del operador `~' o `!~'" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "sintaxis inválida en el nombre `%s' para la asignación de variable" -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"la constante de expresión regular `/%s/' parece un comentario de C, pero no " -"lo es" +#~ msgid "or used in other expression context" +#~ msgstr "se usó or en otro contexto de la expresión" -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "expresión regular a la derecha de una comparación" +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "se intentó usar la función `%s' como una matriz" -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "`getline' no redirigido indefinido dentro de la acción de BEGIN o END" +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "`%s' es una función, no se permite asignación" -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "la llamada de `length' sin paréntesis no es transportable" +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "Los bloques BEGIN deben tener una parte de acción" -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "la llamada de `length' sin paréntesis está obsoleta por POSIX" +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "`nextfile' es usado en la acción de BEGIN o END" -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "expresión de subíndice inválida" +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "" +#~ "`getline' no redirigido indefinido dentro de la acción de BEGIN o END" # tokentab? cfuga -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "fptr %x no está en tokentab\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "nueva línea inesperada" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "texto de programa vacío en la linea de comando" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "no se puede abrir el fichero fuente `%s' para lectura (%s)" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "no se puede leer el fichero fuente `%s' (%s)" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "el fichero fuente `%s' está vacío" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "el fichero fuente no termina con línea nueva" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "expresión regular sin terminar termina con `\\` en el fin del fichero" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "expresión regular sin terminar" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "expresión regular sin terminar en el fin del fichero" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "el uso de la continuación de línea `\\ #...' no es transportable" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "la barra invertida no es el último caracter en la línea" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX no permite el operador `**='" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "el awk antiguo no da soporte al operador `**='" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX no permite el operador `**'" +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "fptr %x no está en tokentab\n" -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "el awk antiguo no da soporte al operador `**='" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "el operador `^=' no tiene soporte en el awk antiguo" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "el operador `^' no tiene soporte en el awk antiguo" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "cadena sin terminar" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "caracter '%c' inválido en la expresión" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' es una extensión de gawk" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' es una extensión de Bell Labs" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX no permite `%s'" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' no tiene soporte en el awk antiguo" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "¡`goto' se considera dañino!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d es inválido como número de argumentos para %s" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: el tercer argumento es una extensión de gawk" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: la literal de cadena como último argumento de substitute no tiene efecto" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "el tercer argumento de sub no es un objecto que se puede cambiar" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "el tercer argumento de gsub no es un objecto que se puede cambiar" - -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: el segundo argumento es una extensión de gawk" - -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"el uso de dcgettext(_\"...\") es incorrecto: quite el subrayado inicial" - -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"el uso de dcngettext(_\"...\") es incorrecto: quite el subrayado inicial" - -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "función `%s': parámetro #%d, `%s', duplica el parámetro #%d" - -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "función `%s': parámetro `%s' obscurece la variable global" - -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "no se puede abrir `%s' para escritura (%s)" - -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: falló close (%s)" - -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "¡shadow_funcs() llamada dos veces!" - -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "" -"función `%s': no se puede usar un nombre de función como nombre de parámetro" - -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "el nombre de función `%s' fue previamente definida" - -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "se llama a la función `%s' pero nunca se definió" - -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "la función `%s' está definida pero nunca se llamó" - -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"la constante de expresión regular para el parámetro #%d da un valor booleano" - -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "[ desbalanceado" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "Escape \\ sin terminar" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "cuenta de repetición sin terminar" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "cuenta de repetición malformada" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "( desbalanceado" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "No se especifican los bits de sintaxis de la expresión regular" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr ") desbalanceado" - -#: dfa.c:3014 -msgid "out of memory" -msgstr "memoria agotada" - -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: el segundo argumento no es una matriz" - -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "" -"split: la cadena nula para el tercer argumento es una extensión de gawk" - -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' es una extensión gawk" +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "el tercer argumento de gsub no es un objecto que se puede cambiar" -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "el campo %d en FIELDWIDTHS, debe ser > 0" +#~ msgid "Unbalanced [" +#~ msgstr "[ desbalanceado" -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "la cadena nula para `FS' es una extensión de gawk" +#~ msgid "Unfinished \\ escape" +#~ msgstr "Escape \\ sin terminar" -#: msg.c:57 -msgid "cmd. line:" -msgstr "línea ord.:" +#~ msgid "unfinished repeat count" +#~ msgstr "cuenta de repetición sin terminar" -#: msg.c:123 -msgid "warning: " -msgstr "aviso: " +#~ msgid "malformed repeat count" +#~ msgstr "cuenta de repetición malformada" -#: msg.c:145 -msgid "error: " -msgstr "error: " +#~ msgid "Unbalanced (" +#~ msgstr "( desbalanceado" -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " +#~ msgid "No regexp syntax bits specified" +#~ msgstr "No se especifican los bits de sintaxis de la expresión regular" -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "tipo de nodo %d desconocido" +#~ msgid "Unbalanced )" +#~ msgstr ") desbalanceado" -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "desbordamiento de almacenamiento temporal en genflags2str" +#~ msgid "out of memory" +#~ msgstr "memoria agotada" -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "" -"ciclo for: la matriz `%s' cambió de tamaño de %d a %d durante la ejecución " -"del ciclo" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "`break' fuera de un ciclo no es transportable" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "no se permite `break' fuera de un ciclo" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' fuera de un ciclo no es transportable" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "no se permite `continue' fuera de un ciclo" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' no puede ser llamado desde una regla BEGIN" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "`next' no puede ser llamado desde una regla END" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' no puede ser llamado desde una regla BEGIN" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' no puede ser llamado desde una regla END" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "la sentencia no tiene efecto" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referencia a la variable sin iniciar `%s'" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "no se puede usar el nombre de la función `%s' como variable o matriz" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referencia al argumento sin iniciar `%s'" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "asignación usada en contexto condicional" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenación: ¡Los efectos laterales en una expresión han cambiado la " -"longitud de otra!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "se intentó una división por cero" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "se intentó una división por cero en `%%'" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "se intentó una división por cero en `/='" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "se intentó una división por cero en `%%='" - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (de %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "se llamó a la función `%s' con más argumentos de los declarados" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "la función `%s' no está definida" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "la función %s fue llamada\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Pila de Llamadas de Funciones:\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- principal --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "se intentó una referencia de campo desde un valor que no es un número" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "se intentó una referencia desde una cadena nula" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "se intentó accesar al campo %d" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "se intentó usar el parámetro escalar `%s como una matriz'" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' es una extensión de gawk" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' es una extensión de gawk" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "especificación `%sFMT' `%s' errónea" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "desactivando `--lint' debido a una asignación a `LINT'" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "NF con un valor negativo" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "no se puede abrir el fichero `%s' para lectura (%s)" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "falló el cerrado del df %d (`%s') (%s)" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipo de árbol %s inválido en redirect()" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "la expresión en la redirección `%s' sólo tiene un valor numérico" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "la expresión para la redirección `%s' tiene un valor de cadena nula" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"el fichero `%s' para la redirección `%s' puede ser resultado de una " -"expresión lógica" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mezcla innecesaria de `>' y `>>' para el fichero `%.*s'" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "no se puede abrir la tubería `%s' para la salida (%s)" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "no se puede abrir la tubería `%s' para la entrada (%s)" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "" -"no se puede abrir el `socket' de dos vías `%s' para entrada/salida (%s)" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "no se puede abrir la tubería de dos vías `%s' para entrada/salida (%s)" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "no se puede redirigir desde `%s' (%s)" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "no se puede redirigir a `%s' (%s)" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"se alcanzó el límite del sistema para ficheros abiertos: comenzando a " -"multiplexar los descriptores de fichero" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "falló el cerrado de `%s' (%s)." - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "demasiadas tuberías o ficheros de entrada abiertos" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: el segundo argumento debe ser `to' o `from'" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: `%.*s' no es un fichero abierto, tubería o co-proceso" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "cerrado de una redirección que nunca fue abierta" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: la redirección `%s' no se abre con `|&', se ignoró el segundo " -"argumento" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "estado de fallo (%d) en el cerrado de la tubería de `%s' (%s)" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "estado de fallo (%d) en el cerrado del fichero de `%s' (%s)" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "no se provee el cerrado explícito del `socket' `%s'" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "no se provee el cerrado explícito del co-proceso `%s'" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "no se provee el cerrado explícito del la tubería `%s'" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "no se provee el cerrado explícito del fichero `%s'" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "error al escribir en la salida estándar (%s)" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "error al escribir en la salida estándar de error (%s)" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "falló la limpieza de la tubería de `%s' (%s)." - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "falló la limpieza del co-proceso de la tubería a `%s' (%s)." - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "falló la limpieza del fichero de `%s' (%s)." - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "el cliente /inet/raw no está listo aún, perdón" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "sólo root puede utilizar `/inet/raw'." - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "el servidor /inet/raw no está listo aún, perdón" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"no se proporciona algún protocolo (conocido) en el nombre de fichero " -"especial `%s'" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "el nombre de fichero especial `%s' está incompleto" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "puerto local inválido en `%s'" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "se debe proporcionar a `/inet' un nombre de anfitrión remoto" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "se debe proporcionar a `/inet' un puerto remoto" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "puerto remoto inválido en `%s'" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "No tienen soporte las comunicaciones TCP/IP" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "el fichero `%s' es un directorio" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "use `PROCINFO[\"%s\"]' en lugar de `%s'" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "use `PROCINFO[...]' en lugar de `/dev/user'" - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "no se puede abrir `%s', modo `%s'" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "falló el movimiento a la salida estándar en el hijo (dup: %s)" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "" -"falló el movimiento de la tubería a la entrada estándar en el hijo (dup: %s)" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "falló la restauración de la salida estándar en el proceso padre\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "falló la restauración de la entrada estándar en el proceso padre\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "falló el cerrado de la salida estándar en el hijo (%s)" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "falló el cerrado de la entrada estándar en el hijo (%s)" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "falló el cerrado de la tubería (%s)" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "`|&' no tiene soporte" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "no se puede abrir la tubería `%s' (%s)" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "no se puede crear el proceso hijo para `%s' (fork: %s)" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "el fichero de datos `%s' está vacío" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "error interno: fichero `%s', línea %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "error al leer el fichero de entrada `%s': %s" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "el valor multicaracter de `RS' es una extensión de gawk" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "no se puede convertir una cadena a coma flotante" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "barra invertida al final de la cadena" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX no permite escapes `\\x'" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "no hay dígitos hexadecimales en la secuencia de escape `\\x'" - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "la secuencia de escape `\\%c' tratada como una simple `%c'" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"falló la coincidencia de la expresión regular, no hay suficiente memoria " -"para que coincida la cadena \"%.*s%s\"" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': no se puede establecer close-on-exec: (fcntl: %s)" +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "error interno: fichero `%s', línea %d\n" #~ msgid "" #~ "\n" diff -urN gawk-3.1.1/po/fr.po gawk-3.1.2/po/fr.po --- gawk-3.1.1/po/fr.po 2002-05-01 16:40:58.000000000 +0300 +++ gawk-3.1.2/po/fr.po 2003-03-19 14:25:12.000000000 +0200 @@ -4,410 +4,904 @@ # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.1a\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" -"PO-Revision-Date: 2002-04-29 20:00-0500\n" +"Project-Id-Version: gawk 3.1.1m\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" +"PO-Revision-Date: 2003-02-28 08:00-0500\n" "Last-Translator: Michel Robitaille \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentative d'utilisation du scalaire « %s » comme un tableau" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "référence à un élément non initialisé « %s[\"%s\"] »" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "sous-description du tableau « %s » contient une chaîne nulle" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "destruction: utilisation illégale d'une variable « %s » comme tableau" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "destruction: index « %s » n'est pas dans le tableau « %s »" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "destruction: utilisation illégale d'une variable « %s » comme tableau" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vide (null)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vide (zéro)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "%s: est un paramètre\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: array_ref de %s\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort(): le premier argument fourni n'est pas dans le tableau" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort(): le second argument fourni n'est pas dans le tableau" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "Les blocs %s doivent avoir une partie action" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "chaque règle doit avoir un pattern ou une partie action" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "« %s » est une fonction interne, elle ne peut être redéfinie" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "" +"la constante d'expression régulière « /%s/ » ressemble à un commentaire en " +"C, mais ne l'est pas" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "la déclaration peut n'avoir aucun effet" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "« %s » utilisé dans l'action %s" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "« nextfile » est une extension de gawk" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "« return » utilisé en dehors du contexte d'une fonction" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" +"utilisation de « print » dans une règle BEGIN ou END doit être probablement " +"« print \"\" »" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "« delete array » est une extension de gawk" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "« delete(array) » est une extension tawk non portable" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "pipelines bidirectionnel à multi-étapes ne fonctionnent pas" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "expression régulière à la droite de l'affectation" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "expression régulière sur la gauche de l'opérateur « ~ » ou « !~ »" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "expression régulière sur la droite de la comparaison" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "« getline » non redirigé indéfini à l'intérieur de l'action END" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "l'appel de « length » sans les parenthèses n'est pas portable" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "l'appel de « length » sans les parenthèses est déprécié par POSIX" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "sous-expression invalide" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "nouvelle ligne inattendue ou fin de chaîne" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "texte du programme sur la ligne de commande est vide" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "ne peut ouvrir le fichier source « %s » pour lecture (%s)" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "ne peut lire le fichier source « %s » (%s)" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "fichier source « %s » est vide" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "fichier source ne se termine pas par un retour de chariot" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "" +"expression régulière non termineé se terminant par « \\ » à la fin du fichier" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "expression régulière non terminée" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "expression régulière non terminée à la fin du fichier" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "" +"utilisation de « \\ #... » comme continuation de ligne n'est pas portable" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "la barre oblique inverse n'est pas le dernier caractère sur la ligne" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX ne permet un opérateur « **= »" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "l'ancien awk ne supporte pas l'opérateur « **= »" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX ne permet pas l'opérateur « ** »" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "l'ancien awk ne supporte pas l'opérateur « ** »" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "l'opérateur « ^= » n'est pas supporté dans l'ancien awk" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "l'opérateur « ^ » n'est pas supporté dans l'ancien awk" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "chaîne non complétée" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "caractère invalide « %c » dans l'expression" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "« %s » est une extension de gawk" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "« %s » est une extension de Bell Labs" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX ne permet pas « %s »" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "« %s » n'est pas supporté dans l'ancien awk" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "« goto » considéré néfaste!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d est invalide comme nombre d'arguments pour %s" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: 3e argument est une extension de gawk" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "" +"%s: la chaîne litérale comme dernier argument d'une substitution n'a aucun " +"effet" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "3e paramètre %s n'est pas un objet modifiable" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: 2e argument est une extension de gawk" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"utilisation de dcgettext(_\"...\") est incorrect: enlever les soulignés en " +"en-tête" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"utilisation de dcgettext(_\"...\") est incorrecte: enlever les soulignés de " +"l'en-tête" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "fonction « %s »: paramètre #%d, « %s » est un double du paramètre #%d" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "fonction « %s »: paramètre « %s » porte ombrage à la variable globale" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "ne peut ourvrir « %s » en écriture (%s)" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "redirection du profile vers stderr" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: échec de fermeture (%s)" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "shadows_funcs() appelé deux fois!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "il y a quelques variables qui sont cachées par ombrage" + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "nom de la fonction « %s » définie précédemment" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "fonction « %s » appelé mais jamais définie" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "fonction « %s » définie mais jamais utilisée" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "" +"expression régulière constante pour le paramètre #%d conduit à une valeur " +"booléenne" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"fonction « %s » appelée avec un espace entre le nom et « ( »,\n" +"%s" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "ou utilisé comme une variable ou un tableau" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s vers « %s » échec (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "sortie standard" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "raison inconnue" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: argument fourni n'est pas numérique" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argument fourni %g est hors gamme" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: ne peut vider: le pipe « %s » est oouvert en lecture, pas en écriture" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: ne peut vider: fichier « %s » ouvert en lecture, pas en écriture" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" "fflush: « %s » n'est pas ni un fichier ouvert, un pipe ou un co-processus" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: premier argument fourni n'est pas une chaîne" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: second argument fourni n'est pas une chaîne" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: argument fourni n'est pas numérique" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: argument fourni n'est pas une chaîne" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: argument fourni n'est pas numérique" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: argument fourni négatif %g" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "doit utiliser « count$ » pour tous les formats ou aucun" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "« $ » n'est pas permis dans les formats awk" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "décompte d'arguments avec « $ » doit être > 0" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" -msgstr "compteur d'arguments %d est > que le nombre total fournis d'arguments" +msgid "arg count %ld greater than total number of supplied arguments" +msgstr "compteur d'arguments %ld est > que le nombre total fournis d'arguments" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "« $ » n'est pas permis après le point" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "aucun « $ » fourni dans le champ positionnel (longueur ou précision)" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "« l » n'a aucun sens dans les formats de awk; ignoré" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "« l » n'est pas permis dans les format POSIX de awk" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "« L » n'a aucun sens dans les formats s de awk; ignoré" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "« L » n'est pas permis dans les formats POSIX de awk" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "« h » n'a aucun send dans les formats de awk; ignoré" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "« h » n'est pas permis dans les formats POSIX de awk" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "pas assez d'arguments pour satisfaire le format d'une chaîne" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ débordement pour celle-ci" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "" "[s]printf: spécificateur de format ne contient pas de lettre de contrôle" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "trop d'arguments pour la chaîne de format" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: aucun argument" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argument fourni n'est pas numérique" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: appelé avec un argument négatif %g" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: début de l'index %g est invalide, utilise 1" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: début avec un nombre non entier %g sera tronqué" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: longueur %g est <= 0" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "substr: longueur %g est < 0" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: longueur avec un nombre non entier %g sera tronqué" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" +"substr: longueur %g trop grande pour l'indexation de chaîne, troncation à %g" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: chaîne de départ est de longueur zéro" -#: builtin.c:1221 +#: builtin.c:1263 +#, c-format +msgid "substr: start index %g is past end of string" +msgstr "substr: début de l'index %g dépasse la fin de la chaîne" + +#: builtin.c:1271 #, c-format msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +"substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -"substr: longueur %d début avec l'index %d déborde la longueur du 1er " -"argument (%d)" - -#: builtin.c:1227 -#, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: début de l'index %d dépasse la fin de la chaîne" +"substr: longueur %g débute avec l'index %g déborde la longueur du 1er " +"argument (%lu)" -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: premier argument fourni n'est pas une chaîne" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: chaîne de format vide" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "strftime: second argument fourni n'est pas numérique" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: argument fourni n'est pas une chaîne" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: argument fourni n'est pas une chaîne" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: argument fourni n'est pas une chaîne" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: argument fourni n'est pas une chaîne" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: premier argument fourni n'est pas numérique" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: second argument fourni n'est pas numérique" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: argument fourni n'est pas numérique" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: argument fourni n'est pas numérique" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: argument fourni n'est pas numérique" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: le 3e argument fourni n'est pas un tableau" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: le 3e argument fourni de 0 traité comme un 1" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: premier argument fourni n'est pas numérique" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: premier argument fourni n'est pas numérique" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): trop grand déplacement donnera d'étranges résultats" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: premier argument fourni n'est pas numérique" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: premier argument fourni n'est pas numérique" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: premier argument fourni n'est pas numérique" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: argument fourni n'est pas numérique" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valeurs négatives donneront d'étranges résultats" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valeurs fractionnaires seront tronquées" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: « %s » n'est pas dans un catégorie de localisation valide" -#: ext.c:60 ext.c:64 +#: eval.c:262 +#, c-format +msgid "unknown nodetype %d" +msgstr "type de noeud inconnu %d" + +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "débordement de tampo dans genflag2str" + +#: eval.c:555 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"for loop: tableau « %s » a changé de taille de %ld à %ld durant l'exécution " +"de la boucle" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "« break » en dehors de la boucle n'est pas portable" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "« break » en dehors de la boucle n'est pas permis" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "« continue » en dehors de la boucle n'est pas portable" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "« continue » en dehors de la boucle n'est pas permis" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "« next » ne peut être appelé depuis une règle BEGIN" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "« next » ne peut être appelé depuis une règle END" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "« nextfile » ne peut être appelé depuis une règle END" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "la déclaration n'a aucun effet" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "référence à une variable non initialisée « %s »" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "" +"ne peut utiliser le nom de la fonction « %s » comme variable ou tableau" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "référence à un argument non initialisé « %s »" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"concaténation: effects de bord dans une expression a modifié la longueur " +"d'une autre!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "affectation utilisé dans un contexte conditionnel" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "tentative de division par zéro" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "tentative de division par zéro dans « %% »" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "type illégal (%s) dans tree_eval" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "tentative de division par zéro dans « /= »" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "tentative de division par zéro dans « %%= »" + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (de %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "fonction « %s » appelée avec plus d'arguments que déclarées" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "fonction « %s » non définie" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "fonction %s appelée\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Appel d'une fonction sur la pile:\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "#t# -- main --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "tentative de référence un champ à partir d'une valeur non numérique" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "tentative de référence à partir d'une chaîne nulle" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "tentative d'accès du champ %d" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "" +"tentative d'utilisation d'un paramètre scalaire « %s » comme un tableau" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "" +"l'affectation n'est pas permise pour obtenir un résultat d'une fonction " +"interne" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "« IGNORECASE » est une extension de gawk" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "« BINMODE » est une extension de gawk" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "« %sFMT » spécification erronée « %s »" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "désactivation « --lint » en raison d'une affectation à « LINT »" + +#: ext.c:60 ext.c:64 msgid "`extension' is a gawk extension" msgstr "« extension » est une extension de gawk" @@ -421,10 +915,35 @@ msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: librairie « %s »: ne peut appeler la fonction « %s » (%s)\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "Opération non supportée" +#: field.c:321 +msgid "NF set to negative value" +msgstr "NF initialisé avec une valeur négative" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: 2e argument n'est pas un tableau" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: chaîne vide pour le 3e argument est une extension de gawk" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "« FIELDWIDTHS » est une extension de gawk" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "champ %d dans FIELDWIDTHS, doit être > 0" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "chaîne vide pour « FS » est une extension de gawk" + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -465,7 +984,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: option invalide -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'option requiert un argument -- %c\n" @@ -480,167 +999,478 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: l'option « -W %s » ne requiert pas d'argument\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "« -m[fr] » est une option non pertinente en gawk" - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m usage de l'option: « -m[fr] nnn »" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "ne peut ouvrir le fichier « %s » en lecture (%s)" -#: main.c:326 +#: io.c:344 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: l'option « -W %s » n'est pas reconnue, ignorée\n" +msgid "close of fd %d (`%s') failed (%s)" +msgstr "fermeture de fd %d (« %s ») en échec (%s)" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "argument vide à l'option « --source », ignorée" +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" +msgstr "type d'arbre invalide %s dans redirect()" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" msgstr "" -"variable d'environnement « POSIXLY__CORRECT » initialisée: utilisation de « " -"--posix »" - -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "« --posix » écrase « --traditional »" - -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "« --posix »/« --traditional » écrase « --non-decimal-data »" +"l'expression de la redirection de « %s » a seulement une valeur numérique" -#: main.c:449 +#: io.c:494 #, c-format -msgid "running %s setuid root may be a security problem" +msgid "expression for `%s' redirection has null string value" msgstr "" -"l'exécution de %s en mode setuid root peut causer un problème de sécurité" +"l'expression de la redirection de « %s » a une valeur nulle pour la chaîne" -#: main.c:478 +#: io.c:499 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "ne peut initialiser le mode sur stdin (%s)" +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"nom de fichier « %s » pour le redirection « %s » peut être le résultat d'une " +"expression logique" -#: main.c:481 +#: io.c:521 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "ne peut initialiser le mode sur stdout (%s)" +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "mélange non nécessaire de « > » et de « >> » pour le fichier « %.*s »" -#: main.c:483 +#: io.c:573 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "ne peut initialiser le mode sur stderr (%s)" +msgid "can't open pipe `%s' for output (%s)" +msgstr "ne peut ouvrir un pipe « %s » en sortie (%s)" -#: main.c:512 -msgid "no program text at all!" -msgstr "aucun programme!" +#: io.c:582 +#, c-format +msgid "can't open pipe `%s' for input (%s)" +msgstr "ne peut ouvrir un pipe « %s » en entrée (%s)" -#: main.c:556 +#: io.c:595 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" -"Usage: %s [style des options POSIX ou GNU] -f fichierprog [--] fichier ...\n" +"ne peut ouvrir un socket bidirectionnel « %s » pour les entrées/sorties (%s)" -#: main.c:558 +#: io.c:599 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" -"Usage: %s [style des options POSIX ou GNU] [--] %cprogram%c fichier ...\n" +"ne peut ouvrir un pipe bidirectionnel « %s » pour les entrées/sorties (%s)" -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Options POSIX:\t\toptions de long format GNU:\n" +#: io.c:675 +#, c-format +msgid "can't redirect from `%s' (%s)" +msgstr "ne peut rediriger de « %s » (%s)" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fichierprog\t\t--file=fichierprog\n" +#: io.c:678 +#, c-format +msgid "can't redirect to `%s' (%s)" +msgstr "ne peut rediriger vers « %s » (%s)" -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "#t-F fs\t\t\t--field-separator=fs\n" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "" +"limite système atteinte pour l'ouverture des fichiers: début du multiplexage " +"des descripteurs de fichiers" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "#t-v var=valeur\t\t--assign=var=valeur\n" +#: io.c:729 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "fermeture de « %s » en échec (%s)" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valeur\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "trop de pipes ou de fichiers en lecture ouverts" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: 2e argument doit être « to » ou « from »" -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus" -#: main.c:570 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "\t-W copyright\t\t--copyright\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "fermeture de la redirection qui n'a jamais été ouverte" + +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: redirection « %s » n'a pas été ouverte ave « |& » 2e argument ignoré" + +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "constat d'échec (%d) lors de la fermeture du pipe « %s » (%s)" + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "constat d'échec (%d) lors de la fermeture du fichier « %s » (%s)" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "aucune fermeture explicite du socket « %s » fournie" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "aucune fermeture explicite du co-processus « %s » fournie" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "aucune fermeture explicite du pipe « %s » fournie" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "aucune fermeture explicite du fichier « %s » fournie" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "erreur lors de l'écriture vers stdout (%s)" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "erreur lors de l'écriture vers stderr (%s)" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "vidange du pipie de « %s » en échec (%s)" + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "vidange du pipe par le co-processus vers « %s » en échec (%s)" + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "vidange du fichier « %s » en échec (%s)" + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "le client /inet/raw n'est pas encore prêt, désolé" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "seul root peut utiliser « /inet/raw »" + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "le serveur /inet/raw n'est pas encore prêt, désolé" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "aucun protocole (connu) fourni dans le nom de fichier spécial « %s »" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "nom spécial de fichier « %s » est incomplet" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "port local invalide dans « %s »" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "un nom de hôte distant doit être fourni à « /inet »" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "un port distant doit être fournis à « /inet »" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "port distant invalide dans « %s »" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "les communications TCP/IP ne sont pas supportées" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "le fichier « %s » est un répertoire" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « %s »" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « /dev/user »" + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "ne peut ouvrir « %s », mode « %s »" + +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "échec de la fermeture du pty maître (%s)" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "échec de fermeture de stdout du processus fils (%s)" + +#: io.c:1708 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "" +"échec de redirection du pty esclave vers stdout du processus fils (dup: %s)" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "échec de fermeture de stdin du processus fils (%s)" + +#: io.c:1713 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "" +"échec de redirection du pty esclave vers stdin du processus fils (dup: %s)" + +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "échec de la fermeture du pty esclave (%s)" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "échec de redirection du pipe vers stdout du processus fils (dup: %s)" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "échec de redirection du pipe vers stdin du processus fils (dup: %s)" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "restauration de stdout par le processus parent a échoué\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "restauration de stdin par le processus parent a échoué\n" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "échec de la fermeture du pipe (%s)" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "« |& » non supporté" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "ne ouvrir un pipe « %s » (%s)" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "ne créer le processus fils pour « %s » (fork: %s)" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "le fichier de données « %s » est vide" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "ne peut allouer plus de mémoire pour l'entrée" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "erreur lors de la lecture du fichier source « %s »: %s" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "valeur de « RS » avec multiple caractères est une extension gawk" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "« -m[fr] » est une option non pertinente en gawk" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "-m usage de l'option: « -m[fr] nnn »" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: l'option « -W %s » n'est pas reconnue, ignorée\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "argument vide à l'option « --source », ignorée" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "" +"variable d'environnement « POSIXLY__CORRECT » initialisée: utilisation de « " +"--posix »" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "« --posix » écrase « --traditional »" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "« --posix »/« --traditional » écrase « --non-decimal-data »" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "" +"l'exécution de %s en mode setuid root peut causer un problème de sécurité" + +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "ne peut initialiser le mode binaire sur stdin (%s)" + +#: main.c:512 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "ne peut initialiser le mode binaire sur stdout (%s)" + +#: main.c:514 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "ne peut initialiser le mode binaire sur stderr (%s)" + +#: main.c:544 +msgid "no program text at all!" +msgstr "aucun programme!" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"Usage: %s [style des options POSIX ou GNU] -f fichierprog [--] fichier ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "" +"Usage: %s [style des options POSIX ou GNU] [--] %cprogram%c fichier ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "Options POSIX:\t\toptions de long format GNU:\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f fichierprog\t\t--file=fichierprog\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "#t-F fs\t\t\t--field-separator=fs\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "#t-v var=valeur\t\t--assign=var=valeur\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr "\t-m[fr] valeur\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr "\t-W compat\t\t--compat\n" + +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" +msgstr "\t-W copyleft\t\t--copyleft\n" + +#: main.c:626 +msgid "\t-W copyright\t\t--copyright\n" +msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fichier]\t--dump-variables[=fichier]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fichier]\t--profile[=fichier]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=program-text\t--source=program-text\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -651,7 +1481,7 @@ "Pour rapporter une anomalie, voir la rubrique « Bugs » dans « gawk.info »\n" "dans la section « Reporting Problems and Bugs » de la version imprimée.\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -661,7 +1491,7 @@ "Par défaut, il lit de l'entrée standard et écrit sur la sortie standard.\n" "\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -671,7 +1501,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' fichier\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -690,7 +1520,7 @@ "soit (selon vos préférences) toute version ultérieure.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -705,7 +1535,7 @@ "Pour plus d'informations à ce sujet, consulter la « GNU General Public " "License ».\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -715,102 +1545,119 @@ "avec ce programme; sinon, écrire à la Free Software Foundation, Inc.,\n" "59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" "-Ft ne permet pas d'initialiser FS à un tabulateur dans la version POSIX de " "awk" -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" +"%s: `%s' argument à `-v' n'a pas le format `var=valeur'\n" +"\n" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "`%s' n'est pas un nom de variable légal" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "syntaxe invalide dans le nom « %s » pour l'affectation de variable" +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "`%s' n'est pas un nom de variable, recherche du fichier `%s=%s'" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "exception de la virgule flottante" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "erreur fatale: erreur interne" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "aucun fd pré-ouvert pour %d" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "ne peut pré-ouvrir /dev/null pour le descripteud fd %d" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "n'a pu trouvé les groupes: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "ne peut ouvrir « %s » en écriture: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "cmd. ligne:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "redirection du profile vers stderr" +#: msg.c:120 +msgid "warning: " +msgstr "AVERTISSEMENT:" -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "erreur interne: Node_var avec un vname nul" +#: msg.c:142 +msgid "error: " +msgstr "Erreur: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "erreur interne: Node_var_array avec un vname nul" +#: msg.c:178 +msgid "fatal: " +msgstr "Fatal: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"fonction « %s » appelée avec un espace entre le nom et « ( »,\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "ne peut convertir la chaîne en nombre flottant" + +#: node.c:357 +msgid "backslash at end of string" +msgstr "barre oblique inverse à la fin de la chaîne" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "ou utilisée dans un autre contexte d'expression" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX ne permet pas de séquence d'échappement « \\x »" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentative d'utilisation du tableau « %s » dans un contexte scalaire" +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "aucun chiffre hexadécimal dans la séquence d'échappement « \\x » " -#: profile.c:637 eval.c:1047 +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "type illégal (%s) dans tree_eval" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "séquence d'échappement « \\%c » traitée simplement comme « %c »" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "tentative d'utilisation de la fonction « %s » dans le tableau" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s « %s »: ne peut initialiser close-on-exec: (fcntl: %s)" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "« %s » est une fonction, l'affectation n'est pas permise" +msgid "could not open `%s' for writing: %s" +msgstr "ne peut ouvrir « %s » en écriture: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "" -"l'affectation n'est pas permise pour obtenir un résultat d'une fonction " -"interne" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "erreur interne: Node_var avec un vname nul" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "# traitée de manière interne comme « delete »" -#: profile.c:1108 +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "erreur interne: Node_var_array avec un vname nul" + +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profile gawk, créé %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -818,7 +1665,7 @@ "#t# DÉBUT de bloc(s)\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -826,7 +1673,7 @@ "\t# Règle(s)\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -834,7 +1681,7 @@ "\t# FIN de bloc(s)\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -842,937 +1689,144 @@ "\n" "\t# Liste alphabétique des fonctions\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "type %s inattendu dans prec_level" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" +"échec de concordance de regex, pas assez de mémoire pour traiter la chaîne " +"\"%.*s%s\"" + +#: regcomp.c:136 msgid "Success" msgstr "Succès" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "Aucune concordance" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Expression régulière invalide" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "Caractère de collation invalide" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Nom de classe de caractères invalide" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "Barre oblique inverse de terminaison" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Mauvaise référence arrière" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "Non appariement de [ ou [^" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "Non appariement de ( ou \\(" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "Non appariement de \\{" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Contenu invalide de \\{\\}" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Borne finale invalide" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Mémoire épuisée" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Expression régulière précédente invalide" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Fin prématurée de l'expression régulière" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "Expression régulière trop grande" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr "Non appariement de ) ou \\)" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "Aucune expression régulière antérieure" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "Les blocs de DÉBUT doitvent avoir une partie action" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "Les blocs de FIN doivent avoir une partie action" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "« %s » est une fonction interne, elle ne peut être redéfinie" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "la déclaration peut n'avoir aucun effet" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "« next » utilisé dans l'action BEGIN ou END" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "« nextfile » est une extension de gawk" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "« nextfile » utilisé dans l'action BEGIN ou END" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "« return » utilisé en dehors du contexte d'une fonction" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"utilisation de « print » dans une règle BEGIN ou END doit être probablement " -"« print \"\" »" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "« delete array » est une extension de gawk" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "pipelines bidirectionnel à multi-étapes ne fonctionnent pas" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "expression régulière à la droite de l'affectation" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "« getline » non redirigé indéfini à l'intérieur de l'action END" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "expression régulière sur la gauche de l'opérateur « ~ » ou « !~ »" - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "" -"la constante d'expression régulière « /%s/ » ressemble à un commentaire en " -"C, mais ne l'est pas" - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "expression régulière sur la droite de la comparaison" - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "" -"« getline » non redirigé indéfini à l'intérieur de l'action BEGIN ou END" - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "l'appel de « length » sans les parenthèses n'est pas portable" - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "l'appel de « length » sans les parenthèses est déprécié par POSIX" - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "sous-expression invalide" - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "fptr %x n'est pas dans la table des jetons\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "nouvelle ligne inattendue" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "texte du programme sur la ligne de commande est vide" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "ne peut ouvrir le fichier source « %s » pour lecture (%s)" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "ne peut lire le fichier source « %s » (%s)" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "fichier source « %s » est vide" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "fichier source ne se termine pas par un retour de chariot" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "" -"expression régulière non termineé se terminant par « \\ » à la fin du fichier" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "expression régulière non terminée" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "expression régulière non terminée à la fin du fichier" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "" -"utilisation de « \\ #... » comme continuation de ligne n'est pas portable" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "la barre oblique inverse n'est pas le dernier caractère sur la ligne" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX ne permet un opérateur « **= »" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "l'ancien awk ne supporte pas l'opérateur « **= »" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX ne permet pas l'opérateur « ** »" - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "l'ancien awk ne supporte pas l'opérateur « ** »" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "l'opérateur « ^= » n'est pas supporté dans l'ancien awk" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "l'opérateur « ^ » n'est pas supporté dans l'ancien awk" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "chaîne non complétée" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "caractère invalide « %c » dans l'expression" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "« %s » est une extension de gawk" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "« %s » est une extension de Bell Labs" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX ne permet pas « %s »" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "« %s » n'est pas supporté dans l'ancien awk" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "« goto » considéré néfaste!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d est invalide comme nombre d'arguments pour %s" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: 3e argument est une extension de gawk" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: la chaîne litérale comme dernier argument d'une substitution n'a aucun " -"effet" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "sub: 3e paramètre n'est pas un objet interchangeable" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "gsub: 3e paramètre n'est pas un objet interchangeable" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "syntaxe invalide dans le nom « %s » pour l'affectation de variable" -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: 2e argument est une extension de gawk" +#~ msgid "or used in other expression context" +#~ msgstr "ou utilisée dans un autre contexte d'expression" -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"utilisation de dcgettext(_\"...\") est incorrect: enlever les soulignés en " -"en-tête" +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "tentative d'utilisation de la fonction « %s » dans le tableau" -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"utilisation de dcgettext(_\"...\") est incorrecte: enlever les soulignés de " -"l'en-tête" +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "« %s » est une fonction, l'affectation n'est pas permise" -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "fonction « %s »: paramètre #%d, « %s » est un double du paramètre #%d" +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "Les blocs de DÉBUT doitvent avoir une partie action" -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "fonction « %s »: paramètre « %s » porte ombrage à la variable globale" +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "« nextfile » utilisé dans l'action BEGIN ou END" -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "ne peut ourvrir « %s » en écriture (%s)" +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "" +#~ "« getline » non redirigé indéfini à l'intérieur de l'action BEGIN ou END" -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: échec de fermeture (%s)" +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "fptr %x n'est pas dans la table des jetons\n" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "shadows_funcs() appelé deux fois!" +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "gsub: 3e paramètre n'est pas un objet interchangeable" -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "fonction « %s »: ne peut utilise le nom de la fonction comme paramètre" +#~ msgid "Unbalanced [" +#~ msgstr "Non appariement de [" -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "nom de la fonction « %s » définie précédemment" +#~ msgid "Unfinished \\ escape" +#~ msgstr "séquence d'échappement \\ non terminée" -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "fonction « %s » appelé mais jamais définie" +#~ msgid "unfinished repeat count" +#~ msgstr "répétition de compteur non terminé" -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "fonction « %s » définie mais jamais utilisée" +#~ msgid "malformed repeat count" +#~ msgstr "compteur de répétition mal composé" -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"expression régulière constante pour le paramètre #%d conduit à une valeur " -"booléenne" +#~ msgid "Unbalanced (" +#~ msgstr "Non appariement de (" -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "Non appariement de [" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "séquence d'échappement \\ non terminée" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "répétition de compteur non terminé" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "compteur de répétition mal composé" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "Non appariement de (" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "Aucune syntaxe d'expression régulière des bits fournie" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr "Non appariement de )" +#~ msgid "No regexp syntax bits specified" +#~ msgstr "Aucune syntaxe d'expression régulière des bits fournie" -#: dfa.c:3014 -msgid "out of memory" -msgstr "Mémoire épuisée" +#~ msgid "Unbalanced )" +#~ msgstr "Non appariement de )" -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: 2e argument n'est pas un tableau" +#~ msgid "out of memory" +#~ msgstr "Mémoire épuisée" -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: chaîne vide pour le 3e argument est une extension de gawk" - -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "« FIELDWIDTHS » est une extension de gawk" - -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "champ %d dans FIELDWIDTHS, doit être > 0" - -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "chaîne vide pour « FS » est une extension de gawk" - -#: msg.c:57 -msgid "cmd. line:" -msgstr "cmd. ligne:" - -#: msg.c:123 -msgid "warning: " -msgstr "AVERTISSEMENT:" - -#: msg.c:145 -msgid "error: " -msgstr "Erreur: " - -#: msg.c:178 -msgid "fatal: " -msgstr "Fatal: " - -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "type de noeud inconnu %d" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "débordement de tampo dans genflag2str" - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "" -"for loop: tableau « %s » a changé de taille de %d à %d durant l'exécution de " -"la boucle" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "« break » en dehors de la boucle n'est pas portable" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "« break » en dehors de la boucle n'est pas permis" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "« continue » en dehors de la boucle n'est pas portable" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "« continue » en dehors de la boucle n'est pas permis" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "« next » ne peut être appelé depuis une règle BEGIN" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "« next » ne peut être appelé depuis une règle END" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "« nextfile » ne peut être appelé depuis une règle BEGIN" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "« nextfile » ne peut être appelé depuis une règle END" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "la déclaration n'a aucun effet" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "référence à une variable non initialisée « %s »" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "" -"ne peut utiliser le nom de la fonction « %s » comme variable ou tableau" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "référence à un argument non initialisé « %s »" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "affectation utilisé dans un contexte conditionnel" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concaténation: effects de bord dans une expression a modifié la longueur " -"d'une autre!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "tentative de division par zéro" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "tentative de division par zéro dans « %% »" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "tentative de division par zéro dans « /= »" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "tentative de division par zéro dans « %%= »" - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (de %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "fonction « %s » appelée avec plus d'arguments que déclarées" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "fonction « %s » non définie" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "fonction %s appelée\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Appel d'une fonction sur la pile:\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "#t# -- main --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "tentative de référence un champ à partir d'une valeur non numérique" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "tentative de référence à partir d'une chaîne nulle" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "tentative d'accès du champ %d" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "" -"tentative d'utilisation d'un paramètre scalaire « %s » comme un tableau" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "« IGNORECASE » est une extension de gawk" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "« BINMODE » est une extension de gawk" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "« %sFMT » spécification erronée « %s »" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "désactivation « --lint » en raison d'une affectation à « LINT »" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "NF initialisé avec une valeur négative" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "ne peut ouvrir le fichier « %s » en lecture (%s)" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "fermeture de fd %d (« %s ») en échec (%s)" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "type d'arbre invalide %s dans redirect()" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "" -"l'expression de la redirection de « %s » a seulement une valeur numérique" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "" -"l'expression de la redirection de « %s » a une valeur nulle pour la chaîne" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"nom de fichier « %s » pour le redirection « %s » peut être le résultat d'une " -"expression logique" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mélange non nécessaire de « > » et de « >> » pour le fichier « %.*s »" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "ne peut ouvrir un pipe « %s » en sortie (%s)" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "ne peut ouvrir un pipe « %s » en entrée (%s)" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "" -"ne peut ouvrir un socket bidirectionnel « %s » pour les entrées/sorties (%s)" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "" -"ne peut ouvrir un pipe bidirectionnel « %s » pour les entrées/sorties (%s)" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "ne peut rediriger de « %s » (%s)" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "ne peut rediriger vers « %s » (%s)" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"limite système atteinte pour l'ouverture des fichiers: début du multiplexage " -"des descripteurs de fichiers" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "fermeture de « %s » en échec (%s)" - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "trop de pipes ou de fichiers en lecture ouverts" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: 2e argument doit être « to » ou « from »" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: « %.*s » n'est pas ni un fichier ouvert, pipe ou co-processus" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "fermeture de la redirection qui n'a jamais été ouverte" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: redirection « %s » n'a pas été ouverte ave « |& » 2e argument ignoré" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "constat d'échec (%d) lors de la fermeture du pipe « %s » (%s)" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "constat d'échec (%d) lors de la fermeture du fichier « %s » (%s)" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "aucune fermeture explicite du socket « %s » fournie" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "aucune fermeture explicite du co-processus « %s » fournie" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "aucune fermeture explicite du pipe « %s » fournie" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "aucune fermeture explicite du fichier « %s » fournie" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "erreur lors de l'écriture vers stdout (%s)" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "erreur lors de l'écriture vers stderr (%s)" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "vidange du pipie de « %s » en échec (%s)" - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "vidange du pipe par le co-processus vers « %s » en échec (%s)" - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "vidange du fichier « %s » en échec (%s)" - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "le client /inet/raw n'est pas encore prêt, désolé" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "seul root peut utiliser « /inet/raw »" - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "le serveur /inet/raw n'est pas encore prêt, désolé" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "aucun protocole (connu) fourni dans le nom de fichier spécial « %s »" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "nom spécial de fichier « %s » est incomplet" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "port local invalide dans « %s »" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "un nom de hôte distant doit être fourni à « /inet »" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "un port distant doit être fournis à « /inet »" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "port distant invalide dans « %s »" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "les communications TCP/IP ne sont pas supportées" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "le fichier « %s » est un répertoire" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « %s »" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "utliser « PROCINFO[\"%s\"] » au lieu de « /dev/user »" - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "ne peut ouvrir « %s », mode « %s »" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "échec de redirection du pipe vers stdout du processus fils (dup: %s)" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "échec de redirection du pipe vers stdin du processus fils (dup: %s)" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "restauration de stdout par le processus parent a échoué\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "restauration de stdin par le processus parent a échoué\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "échec de fermeture de stdout du processus fils (%s)" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "échec de fermeture de stdin du processus fils (%s)" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "échec de la fermeture du pipe (%s)" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "« |& » non supporté" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "ne ouvrir un pipe « %s » (%s)" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "ne créer le processus fils pour « %s » (fork: %s)" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "le fichier de données « %s » est vide" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "erreur interne: fichier « %s », ligne %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "erreur lors de la lecture du fichier source « %s »: %s" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "valeur de « RS » avec multiple caractères est une extension gawk" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "ne peut convertir la chaîne en nombre flottant" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "barre oblique inverse à la fin de la chaîne" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX ne permet pas de séquence d'échappement « \\x »" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "aucun chiffre hexadécimal dans la séquence d'échappement « \\x » " - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "séquence d'échappement « \\%c » traitée simplement comme « %c »" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"échec de concordance de regex, pas assez de mémoire pour traiter la chaîne " -"\"%.*s%s\"" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s « %s »: ne peut initialiser close-on-exec: (fcntl: %s)" +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "erreur interne: fichier « %s », ligne %d\n" #~ msgid "" #~ "\n" diff -urN gawk-3.1.1/po/gawk.pot gawk-3.1.2/po/gawk.pot --- gawk-3.1.1/po/gawk.pot 2002-05-01 16:40:58.000000000 +0300 +++ gawk-3.1.2/po/gawk.pot 2003-03-19 14:25:12.000000000 +0200 @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,1678 +15,1673 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "" -#: array.c:373 array.c:456 +#: array.c:412 array.c:425 array.c:466 #, c-format -msgid "delete: illegal use of variable `%s' as array" +msgid "delete: index `%s' not in array `%s'" msgstr "" -#: array.c:406 +#: array.c:432 array.c:515 #, c-format -msgid "delete: index `%s' not in array `%s'" +msgid "delete: illegal use of variable `%s' as array" msgstr "" -#: array.c:571 +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "" + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" +msgid "arg count %ld greater than total number of supplied arguments" msgstr "" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "" -#: builtin.c:1221 +#: builtin.c:1263 #, c-format -msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +msgid "substr: start index %g is past end of string" msgstr "" -#: builtin.c:1227 +#: builtin.c:1271 #, c-format -msgid "substr: start index %d is past end of string" +msgid "" +"substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" +#: eval.c:262 +#, c-format +msgid "unknown nodetype %d" msgstr "" -#: ext.c:74 -#, c-format -msgid "extension: cannot open `%s' (%s)\n" +#: eval.c:310 +msgid "buffer overflow in genflags2str" msgstr "" -#: ext.c:82 +#: eval.c:555 #, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" msgstr "" -#: ext.c:180 -msgid "Operation Not Supported" +#: eval.c:576 +msgid "`break' outside a loop is not portable" msgstr "" -#: getopt.c:692 getopt.c:704 -#, c-format -msgid "%s: option `%s' is ambiguous\n" -msgstr "" - -#: getopt.c:737 getopt.c:741 -#, c-format -msgid "%s: option `--%s' doesn't allow an argument\n" -msgstr "" - -#: getopt.c:750 getopt.c:755 -#, c-format -msgid "%s: option `%c%s' doesn't allow an argument\n" -msgstr "" - -#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 -#, c-format -msgid "%s: option `%s' requires an argument\n" -msgstr "" - -#: getopt.c:842 getopt.c:845 -#, c-format -msgid "%s: unrecognized option `--%s'\n" -msgstr "" - -#: getopt.c:853 getopt.c:856 -#, c-format -msgid "%s: unrecognized option `%c%s'\n" -msgstr "" - -#: getopt.c:903 getopt.c:906 -#, c-format -msgid "%s: illegal option -- %c\n" -msgstr "" - -#: getopt.c:912 getopt.c:915 -#, c-format -msgid "%s: invalid option -- %c\n" -msgstr "" - -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 -#, c-format -msgid "%s: option requires an argument -- %c\n" -msgstr "" - -#: getopt.c:1025 getopt.c:1036 -#, c-format -msgid "%s: option `-W %s' is ambiguous\n" -msgstr "" - -#: getopt.c:1060 getopt.c:1072 -#, c-format -msgid "%s: option `-W %s' doesn't allow an argument\n" -msgstr "" - -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "" - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "" - -#: main.c:326 -#, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" +#: eval.c:580 +msgid "`break' outside a loop is not allowed" msgstr "" -#: main.c:357 -msgid "empty argument to `--source' ignored" +#: eval.c:597 +msgid "`continue' outside a loop is not portable" msgstr "" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" msgstr "" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" msgstr "" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +#: eval.c:637 +msgid "`next' cannot be called from an END rule" msgstr "" -#: main.c:449 -#, c-format -msgid "running %s setuid root may be a security problem" +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" msgstr "" -#: main.c:478 -#, c-format -msgid "can't set mode on stdin (%s)" +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" msgstr "" -#: main.c:481 -#, c-format -msgid "can't set mode on stdout (%s)" +#: eval.c:696 +msgid "statement has no effect" msgstr "" -#: main.c:483 +#: eval.c:731 eval.c:761 eval.c:1733 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "" - -#: main.c:512 -msgid "no program text at all!" +msgid "reference to uninitialized variable `%s'" msgstr "" -#: main.c:556 +#: eval.c:739 eval.c:1721 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgid "can't use function name `%s' as variable or array" msgstr "" -#: main.c:558 +#: eval.c:746 eval.c:752 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" - -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "" - -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "" - -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "" - -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "" - -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "" - -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "" - -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "" - -#: main.c:570 -msgid "\t-W copyright\t\t--copyright\n" -msgstr "" - -#: main.c:571 -msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -msgstr "" - -#: main.c:572 -msgid "\t-W gen-po\t\t--gen-po\n" -msgstr "" - -#: main.c:573 -msgid "\t-W help\t\t\t--help\n" -msgstr "" - -#: main.c:574 -msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -msgstr "" - -#: main.c:575 -msgid "\t-W lint-old\t\t--lint-old\n" -msgstr "" - -#: main.c:576 -msgid "\t-W non-decimal-data\t--non-decimal-data\n" -msgstr "" - -#: main.c:578 -msgid "\t-W nostalgia\t\t--nostalgia\n" -msgstr "" - -#: main.c:581 -msgid "\t-W parsedebug\t\t--parsedebug\n" -msgstr "" - -#: main.c:583 -msgid "\t-W profile[=file]\t--profile[=file]\n" -msgstr "" - -#: main.c:584 -msgid "\t-W posix\t\t--posix\n" -msgstr "" - -#: main.c:585 -msgid "\t-W re-interval\t\t--re-interval\n" -msgstr "" - -#: main.c:586 -msgid "\t-W source=program-text\t--source=program-text\n" -msgstr "" - -#: main.c:587 -msgid "\t-W traditional\t\t--traditional\n" -msgstr "" - -#: main.c:588 -msgid "\t-W usage\t\t--usage\n" -msgstr "" - -#: main.c:589 -msgid "\t-W version\t\t--version\n" -msgstr "" - -#: main.c:593 -msgid "" -"\n" -"To report bugs, see node `Bugs' in `gawk.info', which is\n" -"section `Reporting Problems and Bugs' in the printed version.\n" -"\n" -msgstr "" - -#: main.c:597 -msgid "" -"gawk is a pattern scanning and processing language.\n" -"By default it reads standard input and writes standard output.\n" -"\n" -msgstr "" - -#: main.c:601 -msgid "" -"Examples:\n" -"\tgawk '{ sum += $1 }; END { print sum }' file\n" -"\tgawk -F: '{ print $1 }' /etc/passwd\n" +msgid "reference to uninitialized argument `%s'" msgstr "" -#: main.c:613 +#: eval.c:810 eval.c:1728 profile.c:773 #, c-format -msgid "" -"Copyright (C) 1989, 1991-%d Free Software Foundation.\n" -"\n" -"This program is free software; you can redistribute it and/or modify\n" -"it under the terms of the GNU General Public License as published by\n" -"the Free Software Foundation; either version 2 of the License, or\n" -"(at your option) any later version.\n" -"\n" -msgstr "" - -#: main.c:621 -msgid "" -"This program is distributed in the hope that it will be useful,\n" -"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" -"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" -"GNU General Public License for more details.\n" -"\n" +msgid "attempt to use array `%s' in a scalar context" msgstr "" -#: main.c:627 +#: eval.c:910 msgid "" -"You should have received a copy of the GNU General Public License\n" -"along with this program; if not, write to the Free Software\n" -"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -msgstr "" - -#: main.c:657 -msgid "-Ft does not set FS to tab in POSIX awk" -msgstr "" - -#: main.c:888 -#, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "" - -#: main.c:957 -msgid "floating point exception" -msgstr "" - -#: main.c:964 -msgid "fatal error: internal error" -msgstr "" - -#: main.c:1014 -#, c-format -msgid "no pre-opened fd %d" -msgstr "" - -#: main.c:1019 -#, c-format -msgid "could not pre-open /dev/null for fd %d" -msgstr "" - -#: main.c:1037 main.c:1046 -#, c-format -msgid "could not find groups: %s" -msgstr "" - -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "" - -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "" - -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "" - -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" +"concatenation: side effects in one expression have changed the length of " +"another!" msgstr "" -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" +#: eval.c:935 +msgid "assignment used in conditional context" msgstr "" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" +#: eval.c:1026 +msgid "division by zero attempted" msgstr "" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 +#: eval.c:1041 #, c-format -msgid "attempt to use array `%s' in a scalar context" +msgid "division by zero attempted in `%%'" msgstr "" -#: profile.c:637 eval.c:1047 +#: eval.c:1056 profile.c:649 #, c-format msgid "illegal type (%s) in tree_eval" msgstr "" -#: profile.c:842 eval.c:1790 -#, c-format -msgid "attempt to use function `%s' as array" -msgstr "" - -#: profile.c:856 eval.c:1797 -#, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "" - -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" +#: eval.c:1232 +msgid "division by zero attempted in `/='" msgstr "" -#: profile.c:1108 +#: eval.c:1250 #, c-format -msgid "\t# gawk profile, created %s\n" -msgstr "" - -#: profile.c:1111 -msgid "" -"\t# BEGIN block(s)\n" -"\n" -msgstr "" - -#: profile.c:1121 -msgid "" -"\t# Rule(s)\n" -"\n" -msgstr "" - -#: profile.c:1127 -msgid "" -"\t# END block(s)\n" -"\n" -msgstr "" - -#: profile.c:1147 -msgid "" -"\n" -"\t# Functions, listed alphabetically\n" +msgid "division by zero attempted in `%%='" msgstr "" -#: profile.c:1357 +#: eval.c:1510 #, c-format -msgid "unexpected type %s in prec_level" -msgstr "" - -#: regex.c:1322 -msgid "Success" -msgstr "" - -#: regex.c:1323 -msgid "No match" -msgstr "" - -#: regex.c:1324 -msgid "Invalid regular expression" -msgstr "" - -#: regex.c:1325 -msgid "Invalid collation character" -msgstr "" - -#: regex.c:1326 -msgid "Invalid character class name" -msgstr "" - -#: regex.c:1327 -msgid "Trailing backslash" -msgstr "" - -#: regex.c:1328 -msgid "Invalid back reference" -msgstr "" - -#: regex.c:1329 -msgid "Unmatched [ or [^" -msgstr "" - -#: regex.c:1330 -msgid "Unmatched ( or \\(" -msgstr "" - -#: regex.c:1331 -msgid "Unmatched \\{" -msgstr "" - -#: regex.c:1332 -msgid "Invalid content of \\{\\}" -msgstr "" - -#: regex.c:1333 -msgid "Invalid range end" -msgstr "" - -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 -msgid "Memory exhausted" -msgstr "" - -#: regex.c:1335 -msgid "Invalid preceding regular expression" -msgstr "" - -#: regex.c:1336 -msgid "Premature end of regular expression" -msgstr "" - -#: regex.c:1337 -msgid "Regular expression too big" +msgid "%s (from %s)" msgstr "" -#: regex.c:1338 -msgid "Unmatched ) or \\)" +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" msgstr "" -#: regex.c:7365 -msgid "No previous regular expression" +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" msgstr "" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" +#: eval.c:1634 +#, c-format +msgid "function %s called\n" msgstr "" -#: awkgram.y:238 -msgid "END blocks must have an action part" +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" msgstr "" -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" +#: eval.c:1696 +msgid "\t# -- main --\n" msgstr "" -#: awkgram.y:362 -msgid "statement may have no effect" +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" msgstr "" -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" +#: eval.c:1852 +msgid "attempt to reference from null string" msgstr "" -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" msgstr "" -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" msgstr "" -#: awkgram.y:483 -msgid "`return' used outside function context" +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" msgstr "" -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" msgstr "" -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" msgstr "" -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" msgstr "" -#: awkgram.y:695 -msgid "regular expression on right of assignment" +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" msgstr "" -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" msgstr "" -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" msgstr "" -#: awkgram.y:733 +#: ext.c:82 #, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "" -#: awkgram.y:749 -msgid "regular expression on right of comparison" +#: ext.c:181 +msgid "Operation Not Supported" msgstr "" -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" +#: field.c:321 +msgid "NF set to negative value" msgstr "" -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" +#: field.c:819 +msgid "split: second argument is not an array" msgstr "" -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" msgstr "" -#: awkgram.y:884 -msgid "invalid subscript expression" +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" msgstr "" -#: awkgram.y:1033 +#: field.c:933 #, c-format -msgid "fptr %x not in tokentab\n" +msgid "field %d in FIELDWIDTHS, must be > 0" msgstr "" -#: awkgram.y:1068 -msgid "unexpected newline" +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" msgstr "" -#: awkgram.y:1152 -msgid "empty program text on command line" +#: getopt.c:692 getopt.c:704 +#, c-format +msgid "%s: option `%s' is ambiguous\n" msgstr "" -#: awkgram.y:1209 +#: getopt.c:737 getopt.c:741 #, c-format -msgid "can't open source file `%s' for reading (%s)" +msgid "%s: option `--%s' doesn't allow an argument\n" msgstr "" -#: awkgram.y:1244 +#: getopt.c:750 getopt.c:755 #, c-format -msgid "can't read sourcefile `%s' (%s)" +msgid "%s: option `%c%s' doesn't allow an argument\n" msgstr "" -#: awkgram.y:1252 +#: getopt.c:791 getopt.c:804 getopt.c:1093 getopt.c:1106 #, c-format -msgid "source file `%s' is empty" +msgid "%s: option `%s' requires an argument\n" msgstr "" -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" +#: getopt.c:842 getopt.c:845 +#, c-format +msgid "%s: unrecognized option `--%s'\n" msgstr "" -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" +#: getopt.c:853 getopt.c:856 +#, c-format +msgid "%s: unrecognized option `%c%s'\n" msgstr "" -#: awkgram.y:1539 -msgid "unterminated regexp" +#: getopt.c:903 getopt.c:906 +#, c-format +msgid "%s: illegal option -- %c\n" msgstr "" -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" +#: getopt.c:912 getopt.c:915 +#, c-format +msgid "%s: invalid option -- %c\n" msgstr "" -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 +#, c-format +msgid "%s: option requires an argument -- %c\n" msgstr "" -#: awkgram.y:1621 -msgid "backslash not last character on line" +#: getopt.c:1025 getopt.c:1036 +#, c-format +msgid "%s: option `-W %s' is ambiguous\n" msgstr "" -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" +#: getopt.c:1060 getopt.c:1072 +#, c-format +msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "" -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" msgstr "" -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" +#: io.c:344 +#, c-format +msgid "close of fd %d (`%s') failed (%s)" msgstr "" -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" msgstr "" -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" msgstr "" -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" msgstr "" -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -#: awkgram.y:1972 +#: io.c:521 #, c-format -msgid "invalid char '%c' in expression" +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" msgstr "" -#: awkgram.y:2032 +#: io.c:573 #, c-format -msgid "`%s' is a gawk extension" +msgid "can't open pipe `%s' for output (%s)" msgstr "" -#: awkgram.y:2035 +#: io.c:582 #, c-format -msgid "`%s' is a Bell Labs extension" +msgid "can't open pipe `%s' for input (%s)" msgstr "" -#: awkgram.y:2038 +#: io.c:595 #, c-format -msgid "POSIX does not allow `%s'" +msgid "can't open two way socket `%s' for input/output (%s)" msgstr "" -#: awkgram.y:2042 +#: io.c:599 #, c-format -msgid "`%s' is not supported in old awk" +msgid "can't open two way pipe `%s' for input/output (%s)" msgstr "" -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" +#: io.c:675 +#, c-format +msgid "can't redirect from `%s' (%s)" msgstr "" -#: awkgram.y:2134 +#: io.c:678 #, c-format -msgid "%d is invalid as number of arguments for %s" +msgid "can't redirect to `%s' (%s)" msgstr "" -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" msgstr "" -#: awkgram.y:2172 +#: io.c:729 #, c-format -msgid "%s: string literal as last arg of substitute has no effect" +msgid "close of `%s' failed (%s)." msgstr "" -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" +#: io.c:736 +msgid "too many pipes or input files open" msgstr "" -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" msgstr "" -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" msgstr "" -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +#: io.c:777 +msgid "close of redirection that was never opened" msgstr "" -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" msgstr "" -#: awkgram.y:2323 +#: io.c:866 #, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgid "failure status (%d) on pipe close of `%s' (%s)" msgstr "" -#: awkgram.y:2355 +#: io.c:869 #, c-format -msgid "function `%s': parameter `%s' shadows global variable" +msgid "failure status (%d) on file close of `%s' (%s)" msgstr "" -#: awkgram.y:2464 +#: io.c:888 #, c-format -msgid "could not open `%s' for writing (%s)" +msgid "no explicit close of socket `%s' provided" msgstr "" -#: awkgram.y:2495 +#: io.c:891 #, c-format -msgid "%s: close failed (%s)" +msgid "no explicit close of co-process `%s' provided" msgstr "" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" msgstr "" -#: awkgram.y:2680 +#: io.c:897 #, c-format -msgid "function `%s': can't use function name as parameter name" +msgid "no explicit close of file `%s' provided" msgstr "" -#: awkgram.y:2690 +#: io.c:926 io.c:980 #, c-format -msgid "function name `%s' previously defined" +msgid "error writing standard output (%s)" msgstr "" -#: awkgram.y:2838 awkgram.y:2844 +#: io.c:930 io.c:984 #, c-format -msgid "function `%s' called but never defined" +msgid "error writing standard error (%s)" msgstr "" -#: awkgram.y:2847 +#: io.c:938 #, c-format -msgid "function `%s' defined but never called" +msgid "pipe flush of `%s' failed (%s)." msgstr "" -#: awkgram.y:2874 +#: io.c:941 #, c-format -msgid "regexp constant for parameter #%d yields boolean value" +msgid "co-process flush of pipe to `%s' failed (%s)." msgstr "" -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." msgstr "" -#: dfa.c:783 -msgid "Unfinished \\ escape" +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" msgstr "" -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." msgstr "" -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" msgstr "" -#: dfa.c:1285 -msgid "Unbalanced (" +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" msgstr "" -#: dfa.c:1407 -msgid "No regexp syntax bits specified" +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" msgstr "" -#: dfa.c:1415 -msgid "Unbalanced )" +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" msgstr "" -#: dfa.c:3014 -msgid "out of memory" +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" msgstr "" -#: field.c:849 -msgid "split: second argument is not an array" +#: io.c:1287 +msgid "must supply a remote port to `/inet'" msgstr "" -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" msgstr "" -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" +#: io.c:1303 +msgid "TCP/IP communications are not supported" msgstr "" -#: field.c:943 +#: io.c:1312 io.c:1492 #, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" +msgid "file `%s' is a directory" msgstr "" -#: field.c:997 -msgid "null string for `FS' is a gawk extension" +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" msgstr "" -#: msg.c:57 -msgid "cmd. line:" +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" msgstr "" -#: msg.c:123 -msgid "warning: " +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" msgstr "" -#: msg.c:145 -msgid "error: " +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" msgstr "" -#: msg.c:178 -msgid "fatal: " +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" msgstr "" -#: eval.c:259 +#: io.c:1708 #, c-format -msgid "unknown nodetype %d" +msgid "moving slave pty to stdout in child failed (dup: %s)" msgstr "" -#: eval.c:307 -msgid "buffer overflow in genflags2str" +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" msgstr "" -#: eval.c:541 +#: io.c:1713 #, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" +msgid "moving slave pty to stdin in child failed (dup: %s)" msgstr "" -#: eval.c:565 -msgid "`break' outside a loop is not portable" +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" msgstr "" -#: eval.c:569 -msgid "`break' outside a loop is not allowed" +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" msgstr "" -#: eval.c:588 -msgid "`continue' outside a loop is not portable" +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" msgstr "" -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" msgstr "" -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" msgstr "" -#: eval.c:624 -msgid "`next' cannot be called from an END rule" +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" msgstr "" -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" +#: io.c:1913 +msgid "`|&' not supported" msgstr "" -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" msgstr "" -#: eval.c:679 -msgid "statement has no effect" +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" msgstr "" -#: eval.c:713 eval.c:743 eval.c:1622 +#: io.c:2364 #, c-format -msgid "reference to uninitialized variable `%s'" +msgid "data file `%s' is empty" msgstr "" -#: eval.c:721 eval.c:1608 +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "" + +#: io.c:2540 io.c:2782 io.c:3046 #, c-format -msgid "can't use function name `%s' as variable or array" +msgid "error reading input file `%s': %s" +msgstr "" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" msgstr "" -#: eval.c:728 eval.c:734 eval.c:1747 +#: main.c:341 #, c-format -msgid "reference to uninitialized argument `%s'" +msgid "%s: option `-W %s' unrecognized, ignored\n" msgstr "" -#: eval.c:823 -msgid "assignment used in conditional context" +#: main.c:378 +msgid "empty argument to `--source' ignored" msgstr "" -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" msgstr "" -#: eval.c:1013 -msgid "division by zero attempted" +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" msgstr "" -#: eval.c:1028 +#: main.c:468 #, c-format -msgid "division by zero attempted in `%%'" +msgid "running %s setuid root may be a security problem" msgstr "" -#: eval.c:1236 -msgid "division by zero attempted in `/='" +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" msgstr "" -#: eval.c:1254 +#: main.c:512 #, c-format -msgid "division by zero attempted in `%%='" +msgid "can't set binary mode on stdout (%s)" msgstr "" -#: eval.c:1424 +#: main.c:514 #, c-format -msgid "%s (from %s)" +msgid "can't set binary mode on stderr (%s)" msgstr "" -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" +#: main.c:544 +msgid "no program text at all!" msgstr "" -#: eval.c:1519 +#: main.c:612 #, c-format -msgid "function `%s' not defined" +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" msgstr "" -#: eval.c:1521 +#: main.c:614 #, c-format -msgid "function %s called\n" +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" msgstr "" -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" msgstr "" -#: eval.c:1583 -msgid "\t# -- main --\n" +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" msgstr "" -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" msgstr "" -#: eval.c:1761 -msgid "attempt to reference from null string" +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" msgstr "" -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" +#: main.c:623 +msgid "\t-m[fr] val\n" msgstr "" -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" msgstr "" -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" msgstr "" -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" +#: main.c:626 +msgid "\t-W copyright\t\t--copyright\n" msgstr "" -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" +#: main.c:627 +msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "" -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" +#: main.c:628 +msgid "\t-W gen-po\t\t--gen-po\n" msgstr "" -#: eval.c:2116 -msgid "NF set to negative value" +#: main.c:629 +msgid "\t-W help\t\t\t--help\n" msgstr "" -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" +#: main.c:630 +msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "" -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" +#: main.c:631 +msgid "\t-W lint-old\t\t--lint-old\n" msgstr "" -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" +#: main.c:632 +msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "" -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" +#: main.c:634 +msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "" -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" +#: main.c:637 +msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "" -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" +#: main.c:639 +msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "" -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +#: main.c:640 +msgid "\t-W posix\t\t--posix\n" msgstr "" -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" +#: main.c:641 +msgid "\t-W re-interval\t\t--re-interval\n" msgstr "" -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" +#: main.c:642 +msgid "\t-W source=program-text\t--source=program-text\n" msgstr "" -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" +#: main.c:643 +msgid "\t-W traditional\t\t--traditional\n" msgstr "" -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" +#: main.c:644 +msgid "\t-W usage\t\t--usage\n" msgstr "" -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" +#: main.c:645 +msgid "\t-W version\t\t--version\n" msgstr "" -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" +#: main.c:649 +msgid "" +"\n" +"To report bugs, see node `Bugs' in `gawk.info', which is\n" +"section `Reporting Problems and Bugs' in the printed version.\n" +"\n" msgstr "" -#: io.c:667 +#: main.c:653 msgid "" -"reached system limit for open files: starting to multiplex file descriptors" +"gawk is a pattern scanning and processing language.\n" +"By default it reads standard input and writes standard output.\n" +"\n" msgstr "" -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." +#: main.c:657 +msgid "" +"Examples:\n" +"\tgawk '{ sum += $1 }; END { print sum }' file\n" +"\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" -#: io.c:686 -msgid "too many pipes or input files open" +#: main.c:669 +#, c-format +msgid "" +"Copyright (C) 1989, 1991-%d Free Software Foundation.\n" +"\n" +"This program is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +"\n" msgstr "" -#: io.c:709 -msgid "close: second argument must be `to' or `from'" +#: main.c:677 +msgid "" +"This program is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +"\n" msgstr "" -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" +#: main.c:683 +msgid "" +"You should have received a copy of the GNU General Public License\n" +"along with this program; if not, write to the Free Software\n" +"Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" msgstr "" -#: io.c:727 -msgid "close of redirection that was never opened" +#: main.c:713 +msgid "-Ft does not set FS to tab in POSIX awk" msgstr "" -#: io.c:754 +#: main.c:944 #, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" msgstr "" -#: io.c:811 +#: main.c:964 #, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" +msgid "`%s' is not a legal variable name" msgstr "" -#: io.c:814 +#: main.c:967 #, c-format -msgid "failure status (%d) on file close of `%s' (%s)" +msgid "`%s' is not a variable name, looking for file `%s=%s'" msgstr "" -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" +#: main.c:995 +msgid "floating point exception" msgstr "" -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" +#: main.c:1002 +msgid "fatal error: internal error" msgstr "" -#: io.c:839 +#: main.c:1052 #, c-format -msgid "no explicit close of pipe `%s' provided" +msgid "no pre-opened fd %d" msgstr "" -#: io.c:842 +#: main.c:1057 #, c-format -msgid "no explicit close of file `%s' provided" +msgid "could not pre-open /dev/null for fd %d" msgstr "" -#: io.c:871 io.c:925 +#: main.c:1080 main.c:1089 #, c-format -msgid "error writing standard output (%s)" +msgid "could not find groups: %s" msgstr "" -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" +#: msg.c:54 +msgid "cmd. line:" msgstr "" -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." +#: msg.c:120 +msgid "warning: " msgstr "" -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." +#: msg.c:142 +msgid "error: " msgstr "" -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." +#: msg.c:178 +msgid "fatal: " msgstr "" -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" msgstr "" -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." +#: node.c:357 +msgid "backslash at end of string" msgstr "" -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" msgstr "" -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" msgstr "" -#: io.c:1193 +#: node.c:584 #, c-format -msgid "special file name `%s' is incomplete" +msgid "escape sequence `\\%c' treated as plain `%c'" msgstr "" -#: io.c:1205 +#: posix/gawkmisc.c:172 #, c-format -msgid "local port invalid in `%s'" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" msgstr "" -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" +#: profile.c:91 +#, c-format +msgid "could not open `%s' for writing: %s" msgstr "" -#: io.c:1232 -msgid "must supply a remote port to `/inet'" +#: profile.c:409 +msgid "internal error: Node_var with null vname" msgstr "" -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" +#: profile.c:471 +msgid "# treated internally as `delete'" msgstr "" -#: io.c:1248 -msgid "TCP/IP communications are not supported" +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" msgstr "" -#: io.c:1257 io.c:1438 +#: profile.c:1127 #, c-format -msgid "file `%s' is a directory" +msgid "\t# gawk profile, created %s\n" msgstr "" -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +#: profile.c:1130 +msgid "" +"\t# BEGIN block(s)\n" +"\n" msgstr "" -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" +#: profile.c:1140 +msgid "" +"\t# Rule(s)\n" +"\n" msgstr "" -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" +#: profile.c:1146 +msgid "" +"\t# END block(s)\n" +"\n" msgstr "" -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" +#: profile.c:1166 +msgid "" +"\n" +"\t# Functions, listed alphabetically\n" msgstr "" -#: io.c:1554 io.c:1607 +#: profile.c:1376 #, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" +msgid "unexpected type %s in prec_level" msgstr "" -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" msgstr "" -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" +#: regcomp.c:136 +msgid "Success" msgstr "" -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" +#: regcomp.c:139 +msgid "No match" msgstr "" -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" +#: regcomp.c:142 +msgid "Invalid regular expression" msgstr "" -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" +#: regcomp.c:145 +msgid "Invalid collation character" msgstr "" -#: io.c:1655 -msgid "`|&' not supported" +#: regcomp.c:148 +msgid "Invalid character class name" msgstr "" -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" +#: regcomp.c:151 +msgid "Trailing backslash" msgstr "" -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" +#: regcomp.c:154 +msgid "Invalid back reference" msgstr "" -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" +#: regcomp.c:157 +msgid "Unmatched [ or [^" msgstr "" -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" +#: regcomp.c:160 +msgid "Unmatched ( or \\(" msgstr "" -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" +#: regcomp.c:163 +msgid "Unmatched \\{" msgstr "" -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" +#: regcomp.c:166 +msgid "Invalid content of \\{\\}" msgstr "" -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" +#: regcomp.c:169 +msgid "Invalid range end" msgstr "" -#: node.c:342 -msgid "backslash at end of string" +#: regcomp.c:172 +msgid "Memory exhausted" msgstr "" -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" +#: regcomp.c:175 +msgid "Invalid preceding regular expression" msgstr "" -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" +#: regcomp.c:178 +msgid "Premature end of regular expression" msgstr "" -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" +#: regcomp.c:181 +msgid "Regular expression too big" msgstr "" -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +#: regcomp.c:184 +msgid "Unmatched ) or \\)" msgstr "" -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +#: regcomp.c:621 +msgid "No previous regular expression" msgstr "" diff -urN gawk-3.1.1/po/he.po gawk-3.1.2/po/he.po --- gawk-3.1.1/po/he.po 2002-05-01 16:40:59.000000000 +0300 +++ gawk-3.1.2/po/he.po 2003-03-19 14:25:12.000000000 +0200 @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gawk 3.1.1a\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" "PO-Revision-Date: 2002-04-28 21:46+0300\n" "Last-Translator: Eli Zaretskii \n" "Language-Team: Hebrew \n" @@ -13,413 +13,916 @@ "Content-Type: text/plain; charset=ISO-8859-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "êøòîë `%s' øàì÷ñá éåâù ùåîéù" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "ìçåúî åðéàù `%s[\"%s\"]' èðîìàì äééðô" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "`%s' êøòî ïééöîë ä÷éø úæåøçîá ùåîéù" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "êøòîë `%s' äðúùîá éåâù ùåîéù :delete" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "`%s' ïééöî ìéëî åðéà `%s' êøòî :delete" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "êøòîë `%s' äðúùîá éåâù ùåîéù :delete" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: (ñôåàî) ÷éø\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: (ä÷éø hash úìáè) ÷éø\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: table_size = %d, array_size = %d\n" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "øèîøô åðéä %s\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: %s-ì (array_ref) äéðôä\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "êøòî åðéà ïåùàø èðîåâøà :asort" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "êøòî åðéà éðù èðîåâøà :asort" -#: builtin.c:107 +#: awkgram.y:208 +#, fuzzy, c-format +msgid "%s blocks must have an action part" +msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá" + +#: awkgram.y:211 +#, fuzzy +msgid "each rule must have a pattern or an action part" +msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "äúøãâä úà úåðùì ïéà ,úéðáåî äéö÷ðåô äðéä `%s'" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé" + +#: awkgram.y:431 awkgram.y:451 +#, fuzzy, c-format +msgid "`%s' used in %s action" +msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "äéö÷ðåô ìù èñ÷èðå÷á àìù `return'-á ùåîéù" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "`print \"\"' úåéäì íúñä ïî êéøö END åà BEGIN éììëá èåùô `print'" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" + +#: awkgram.y:528 awkgram.y:535 +#, fuzzy +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "íéãáåò íðéà íéáìù éáåøî íééðååéë-åã íé÷éôà" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "êøò úîùä úàøåä ìù ïéîé ãöá éøìåâø éåèéá" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "`!~' åà `~' øåèøôåàì ìàîùî éøìåâø éåèéá" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "äàååùä ìù ïéîé ãöá éøìåâø éåèéá" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "END úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "úéìéáèøåô äðéà íééøâåñ àìì `length'-ì äàéø÷" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "êøòî ïééöîá éåâù øéáçú ìòá éåèéá" + +#: awkgram.y:1020 +#, fuzzy +msgid "unexpected newline or end of string" +msgstr "éåôö-éúìá íå÷îá äøåù óåñ" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "åúàéø÷ íùì `%s' øå÷î õáå÷ úçéúôá (%s) äì÷ú" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "÷éø åðéä `%s' øå÷î õáå÷" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "äøåù-óåñ åúá íééúñî åðéà øå÷îä õáå÷" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "õáå÷ä óñá `\\'-á íééúñî øåîâ-éúìá éøìåâø éåèéá" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "øåîâ-éúìá éøìåâø éåèéá" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "õáå÷ä óåñá øåîâ-éúìá éøìåâø éåèéá" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "éìéáèøåô åðéà äøåù êùîäì ïîéñë `\\ #...'-á ùåîéù" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "äøåùá ïåøçà åú åðéàù êåôä ïñëåì" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "`**=' øåèøôåà äùøî åðéà POSIX" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "`**=' øåèøôåàá êîåú åðéà ïùé awk" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "`**' øåèøôåà äùøî åðéà POSIX" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "ïùé awk-á êîúð åðéà `^=' øåèøôåà" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "ïùé awk-á êîúð åðéà `^' øåèøôåà" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "äøåîâ-éúìá úæåøçî" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "éåèéáá '%c' éåâù åú" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "Bell úåãáòî úñøâá awk-ì úéôéöôñ äáçøä åðéä `%s'" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "`%s' äùøî åðéà POSIX" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "ïùé awk-á êîúð åðéà `%s'" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "!òø-òâô áùçð `goto'\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "íéèðîåâøà øôñîë %d ìá÷ì ìåëé åðéà %s" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "úéìëú íåù äì ïéà `%s' ìù ïåøçà èðîåâøàë äòåá÷ úæåøçî" + +#: awkgram.y:2140 +#, fuzzy, c-format +msgid "%s third parameter is not a changeable object" +msgstr "éåðéù-øá è÷ééáåà åðéà `sub' ìù éùéìù èðîåâøà" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `close' ìù éðù èðîåâøà" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dcgettext(_\"...\")-á éåâù ùåîéù" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dncgettext(_\"...\")-á éåâù ùåîéù" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "`%s' äéö÷ðåôá %d 'ñî øèîøôì ääæ ,`%s' ,%d 'ñî øèîøô ìù åîù" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "éìáåìâ äðúùî ìò ìéôàî `%s' äéö÷ðåôá `%s' øèîøô" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "äáéúë íùì `%s' úçéúôá (%s) äì÷ú" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "éð÷ú úåàéâù õåøòì çìùð òåöéá ìéôåøô" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "`%s' úøéâñ úòá (%s) äì÷ú" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "!íééîòô äàø÷ð shadow_funcs()" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "" + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "úøãâåî äðéàù `%s' äéö÷ðåôì äàéø÷" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "éðàéìåá êøò áéðî %d 'ñî øèîøôë òåá÷ éøìåâø éåèéá" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +",`(' ïéáì äîù ïéá íéçååø íò `%s' äéö÷ðåôì äàéø÷\n" +"%s" + +#: awkgram.y:2878 +#, fuzzy +msgid "or used as a variable or an array" +msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s é\"ò \"%s\"-ì äáéúëá (%s) äì÷ú" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "úéèøãðèñ èìô úãéçé" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "äòåãé-éúìá äáéñî" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :exp" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "øúåîä íåçúá åðéà %g èðîåâøà :exp" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' ÷éôà :õöåçä ï÷åøì ïúéð àì :fflush" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "äáéúëì àì ,äàéø÷ì çåúô `%s' õáå÷ :õöåçä ï÷åøì ïúéð àì :fflush" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%s' :fflush" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "úæåøçî åðéà ïåùàø èðîåâøà :index" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "úæåøçî åðéà éðù èðîåâøà :index" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :int" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :length" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :log" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "%g éìéìù èðîåâøà íò àø÷ð :log" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "ãçà óàá åà íéèîøåôä ìëá åà øúåî `count$'-á ùåîéù" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "awk ìù íéèîøåôá ùåîéùì øåñà `$'" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "0-î ìåãâ úåéäì áééç `$' ãéì èðîåâøàä äðåî" -#: builtin.c:711 -#, c-format -msgid "arg count %d greater than total number of supplied arguments" +#: builtin.c:722 +#, fuzzy, c-format +msgid "arg count %ld greater than total number of supplied arguments" msgstr "íéèðîåâøàä ìù ììåëä íøôñîî ìåãâ %d èðîåâøàä äðåî" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "èîøåôá äãå÷ðä éøçà òéôåäì ìåëé åðéà `$'" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "å÷åéã åà äãù áçåø ïééöîá èðîåâøàä äðåî øåáò `$' àöîð àì" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `l'" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `l'" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `L'" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `L'" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "çðæåä ;awk ìù èîøåôá úåòîùî øñç åðéä `h'" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "POSIX éô-ìò awk ìù èîøåôá òéôåäì ìåëé åðéà `h'" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "èîøåôä øåáò íéèðîåâøà ÷éôñî ïéà" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ íéèðîåâøàä éì åøîâð ïàë" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "äøîää úø÷á úåà ìéëî åðéà èîøåôä :[s]printf" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "èîøåôä øåáò íéèðîåâøà éãî øúåé" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "èðîåâøà óà ïéà :printf" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :sqrt" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "%g éìéìù èðîåâøà íò àø÷ð :sqrt" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "1-á óìçåä ,éåâù åðéä %g äìçúä ïééöî :substr" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "õöå÷é ,íìù øôñî åðéàù, %g äìçúä ïééöî ìù åëøò :substr" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" -#: builtin.c:1207 +#: builtin.c:1233 +#, fuzzy, c-format +msgid "substr: length %g is < 0" +msgstr "0-î ìåãâ øôñî åððéà %g êøåà :substr" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "õöå÷é ,íìù øôñî åðéàù ,%g êøåà :substr" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "ñôà êøåàá äðéä øå÷îä úæåøçî :substr" -#: builtin.c:1221 -#, c-format +#: builtin.c:1263 +#, fuzzy, c-format +msgid "substr: start index %g is past end of string" +msgstr "úæåøçîä óåñì øáòî åðéä %d äìçúä ïééöî :substr" + +#: builtin.c:1271 +#, fuzzy, c-format msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +"substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" "%d äëøåàå %d ïééöîá äúìéçúù úæåøçî-úúì ÷éôñî åðéà (%d) úæåøçî êøåà :substr" -#: builtin.c:1227 -#, c-format -msgid "substr: start index %d is past end of string" -msgstr "úæåøçîä óåñì øáòî åðéä %d äìçúä ïééöî :substr" - -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "úæåøçî åðéà ïåùàø èðîåâøà :strftime" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "ä÷éø èîøåô úæåøçî :strftime" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "øôñî åðéà éðù èðîåâøà :strftime" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :mktime" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :system" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :tolower" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "úæåøçî åðéà èðîåâøà :toupper" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :atan2" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "øôñî åðéà éðù èðîåâøà :atan2" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :sin" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :cos" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :srand" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "êøòî åðéà éùéìù èðîåâøà :match" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "1-á óìçåä 0 åëøòù éùéìù èðîåâøà :gensub" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :lshift" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :lshift(%lf, %lf)" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :lshift(%lf, %lf)" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :lshift(%lf, %lf)" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :rshift" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :rshift(%lf, %lf)" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :rshift(%lf, %lf)" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éãî ìåãâ äææä øåòéù :rshift(%lf, %lf)" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :and" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :and(%lf, %lf)" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :and(%lf, %lf)" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :or" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :or(%lf, %lf)" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :or(%lf, %lf)" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "øôñî åðéà ïåùàø èðîåâøà :xor" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "úåéåôö-éúìá úåàöåú åáéðé íééìéìù íéëøò :xor(%lf, %lf)" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "åööå÷é íéøåáù íéëøò :xor(%lf, %lf)" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "øôñî åðéà èðîåâøà :compl" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "úåéåôö-éúìá úåàöåú áéðé éìéìù êøò :compl(%lf)" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "õöå÷é øåáù êøò :compl(%lf)" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "äðé÷ú íå÷éî úééøåâè÷ åðéà `%s' :dcgettext" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `extension'" - -#: ext.c:74 +#: eval.c:262 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n" +msgid "unknown nodetype %d" +msgstr "%d ääåæî-éúìá âåñ ìòá node" + +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "genflags2str-á õöåç úùéìâ" + +#: eval.c:555 +#, fuzzy, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "úéìëú-úìåèð äàøåä" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :concatenation" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "éàðú ìù èñ÷èðå÷á äîùäá ùåîéù" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "ñôàá ä÷åìç ïåéñð" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "`%%'-á ñôàá ä÷åìç ïåéñð" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "tree_eval-á (%s) éåâù âåñ" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "`/='-á ñôàá ä÷åìç ïåéñð" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "`%%='-á ñôàá ä÷åìç ïåéñð" + +# This is not translated because it cannot be reworded in Hebrew +# without looking awkward. +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (from %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "úøãâåî äðéà `%s' äéö÷ðåô" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "`%s' äéö÷ðåôì äàéø÷\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- main --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "%d 'ñî äãùì äùéâ ïåéñð" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî" + +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä äðéä `extension'" + +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" +msgstr "`%s' úçéúô úòá (%s) äì÷ú äòøéà :extension\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "`%s' äéøôñî `%s' äéö÷ðåôì äàéø÷á (%s) äì÷ú äòøéà :extension\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "úëîúð äðéà åæ äìåòô" +#: field.c:321 +msgid "NF set to negative value" +msgstr "éìéìù êøò ìáé÷ NF" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä äðéä `split'-ì éùéìù èðåîâøàë úñôåàî úæåøçî" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä åðéä `FIELDWIDTHS'" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "0-î ìåãâ úåéäì áééç FIELDWIDTHS-á %d 'ñî äãù" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä äðéä `FS'-ë úñôåàî úæåøçî" + # The way the leading "%s:" is translated is a terrible kludge, # but what can I do? FIXME. #: getopt.c:692 getopt.c:704 @@ -464,7 +967,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s úéðëú øåáò éåâù ïééôàî -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: èðîåâøà áééçî ïééôàî -- %c\n" @@ -479,164 +982,466 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s úéðëú øåáò èðîåâøà ìá÷î åðéà `-W %s' ïééôàî\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "gawk øåáò éèðååìø åðéà `-m[fr]' ïééôàî" - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "`-m[fr] nnn' :-m ïééôàîá ùåîéù ïôåà" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "åúàéø÷ íùì `%s' õáå÷ úçéúôá (%s) äì÷ú" -#: main.c:326 +#: io.c:344 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "çðæåä ,%s úéðëú øåáò øëåî åðéà `-W %s' ïééôàî\n" +msgid "close of fd %d (`%s') failed (%s)" +msgstr "(%d èìô/èì÷ õåøò) `%s' úøéâñá (%s) äì÷ú" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "çðæåä `--source'-ì ÷éø èðîåâøà" +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" +msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "`--posix' ìéòôî :øãâåî `POSIXLY_CORRECT' äáéáñ äðúùî" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "ãáìá éøîåð êøò áéðî `%s' èìô/èì÷ úééðôäá éåèéá" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "`--traditional' ìò øáåâ `--posix'" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "ä÷éø úæåøçî áéðî `%s' èìô/èì÷ úééðôäá éåèéá" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--non-decimal-data' ìò øáåâ `--posix'/`--traditional'" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "éâåì éåèéá ìù äàöåú úåéäì ìåìò `%s' õáå÷ íù `%s' èìô/èì÷ úééðôäá" -#: main.c:449 +#: io.c:521 #, c-format -msgid "running %s setuid root may be a security problem" -msgstr "òãéî úçèáàá òåâôì äìåìò setuid root-ë %s úöøä" +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "`%.*s' õáå÷ øåáò `>>'-á ïäå `>'-á ïä øúåéî ùåîéù" -#: main.c:478 +#: io.c:573 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "stdin úìåòô ïôåà úòéá÷á (%s) äì÷ú" +msgid "can't open pipe `%s' for output (%s)" +msgstr "èìô êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" -#: main.c:481 +#: io.c:582 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "stdout úìåòô ïôåà úòéá÷á (%s) äì÷ú" +msgid "can't open pipe `%s' for input (%s)" +msgstr "èì÷ êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" -#: main.c:483 +#: io.c:595 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "stderr úìåòô ïôåà úòéá÷á (%s) äì÷ú" +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú" -#: main.c:512 -msgid "no program text at all!" -msgstr "!ììë àöîðá äéä àì úéðëú ìù èñ÷è" +#: io.c:599 +#, c-format +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "èìô/èì÷ êøåöì éðååéë-åã (pipe) ÷éôàë `%s' úçéúôá (%s) äì÷ú" -#: main.c:556 +#: io.c:675 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"%s [GNU åà POSIX ïåðâñá íéðééôàî] -f úéðëú-íù [--] õáå÷-íù ... :ùåîéù ïôåà\n" +msgid "can't redirect from `%s' (%s)" +msgstr "`%s'-î äééðôäá (%s) äì÷ú" -#: main.c:558 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"%s [GNU åà POSIX ïåðâñá íéðééôàî] [--] %cúéðëú%c õáå÷-íù ... :ùåîéù ïôåà\n" +msgid "can't redirect to `%s' (%s)" +msgstr "`%s' ìà äééðôäá (%s) äì÷ú" -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "èìô/èì÷ éöåøò áåáéø úìéçú ;íéçåúô íéöá÷ øôñî ìù úëøòî úìáâîì äòâä" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f úéðëú-õáå÷\t\t--file=úéðëú-õáå÷\n" +#: io.c:729 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "`%s' úøéâñá (%s) äì÷ú" -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F úåãù-ãéøôî\t\t--field-separator=úåãù-ãéøôî\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "úéðîæ-åá íéçåúô èì÷ éöá÷ åà (pipes) íé÷éôà éãî øúåé" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v äðúùî=êøò\t\t--assign=äðúùî=êøò\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "`from' åà `to' úåéäì áééç `close' ìù éðùä èðîåâøàä" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] êøò\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "íìåòî äçúôð àìù äééðôä úøéâñ" -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr "\t-W copyleft\t\t--copyleft\n" +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "çðæåä éðùä èðîåâøàä ,`|&' é\"ò äçúôð àì `%s' äééðôä" + +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "(%d äì÷ú ãå÷) `%s'-ì ÷éôà úøéâñá (%s) äì÷ú" + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "(%d äì÷ú ãå÷) `%s' õáå÷ úøéâñá (%s) äì÷ú" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "ùøåôîá øâñð àì (socket) `%s' ò÷ù" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "ùøåôîá øâñð àì (co-process) `%s' ìéá÷î êéìäú" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "ùøåôîá øâñð àì (pipe) `%s' ÷éôà" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "ùøåôîá øâñð àì `%s' õáå÷" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "éð÷ú èìô õåøòì äáéúëá (%s) äì÷ú" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "éð÷ú úåàéâù õåøòì äáéúëá (%s) äì÷ú" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "`%s'-ì ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "`%s'-ì ìéá÷î êéìäú ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "`%s' ìù õáå÷ éðåúð õöåç ïå÷éøá (%s) äì÷ú" + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "ïëåî íøè /inet/raw çå÷ì ,íéøòèöî" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "ãáìá root ùîúùîì øúåî `inet/raw'-á ùåîéù" + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "ïëåî íøè /inet/raw úøù ,íéøòèöî" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "`%s' ãçåéî õáå÷ íùá ääåæî-éúìá åà øñç ìå÷åèåøô" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "íìù åðéà `%s' ãçåéî õáå÷" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "`%s'-á äéåâù úéîå÷î äàéöé" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "`/inet' øåáò ÷çåøî çøàî-áùçî íù øéãâäì äáåç" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "`/inet' øåáò ú÷çåøî äàéöé øéãâäì äáåç" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "`%s'-á äéåâù ú÷çåøî äàéöé" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "TCP/IP úøåù÷úá äëéîú ïéà" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "äé÷éú åðéä `%s' õáå÷" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "`/dev/user' éðô-ìò óéãò `PROCINFO[...]'-á ùåîéù" + +# This probably sounds nonsensical in Hebrew, but what can I do, +# given the original message text? +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "`%s' øåáò `%s' äìåòô ïôåà úçéúôá ïåìùë" + +#: io.c:1703 +#, fuzzy, c-format +msgid "close of master pty failed (%s)" +msgstr "÷éôà úøéâñá (%s) äì÷ú" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "úá-úéðëúá stdout úøéâñá (%s) äì÷ú" + +#: io.c:1708 +#, fuzzy, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "úá-úéðëúá stdin úøéâñá (%s) äì÷ú" + +#: io.c:1713 +#, fuzzy, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" + +#: io.c:1715 io.c:1734 +#, fuzzy, c-format +msgid "close of slave pty failed (%s)" +msgstr "÷éôà úøéâñá (%s) äì÷ú" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "áà-úéðëúá stdout ÷éôà øåæçùá äì÷ú\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "áà-úéðëúá stdin ÷éôà øåæçùá äì÷ú\n" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "÷éôà úøéâñá (%s) äì÷ú" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "`|&'-á äëéîú ïéà" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "`%s' ÷éôà úçéúôá (%s) äì÷ú" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "`%s' úá-úéðëúì êéìäú úøéöéá (fork: %s) äì÷ú" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "÷éø åðéä `%s' íéðåúð õáå÷" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "`%s' õáå÷ úàéø÷á (%s) äì÷ú" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "gawk-ì úéôéöôñ äáçøä äðéä `RS' ìù êøòá íéåú øôñîá äëéîú" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "gawk øåáò éèðååìø åðéà `-m[fr]' ïééôàî" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "`-m[fr] nnn' :-m ïééôàîá ùåîéù ïôåà" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "çðæåä ,%s úéðëú øåáò øëåî åðéà `-W %s' ïééôàî\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "çðæåä `--source'-ì ÷éø èðîåâøà" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "`--posix' ìéòôî :øãâåî `POSIXLY_CORRECT' äáéáñ äðúùî" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "`--traditional' ìò øáåâ `--posix'" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "`--non-decimal-data' ìò øáåâ `--posix'/`--traditional'" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "òãéî úçèáàá òåâôì äìåìò setuid root-ë %s úöøä" + +#: main.c:509 +#, fuzzy, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "stdin úìåòô ïôåà úòéá÷á (%s) äì÷ú" + +#: main.c:512 +#, fuzzy, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "stdout úìåòô ïôåà úòéá÷á (%s) äì÷ú" + +#: main.c:514 +#, fuzzy, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "stderr úìåòô ïôåà úòéá÷á (%s) äì÷ú" + +#: main.c:544 +msgid "no program text at all!" +msgstr "!ììë àöîðá äéä àì úéðëú ìù èñ÷è" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"%s [GNU åà POSIX ïåðâñá íéðééôàî] -f úéðëú-íù [--] õáå÷-íù ... :ùåîéù ïôåà\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "" +"%s [GNU åà POSIX ïåðâñá íéðééôàî] [--] %cúéðëú%c õáå÷-íù ... :ùåîéù ïôåà\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr ":POSIX éðééôàî\t\t:íéëåøà GNU éðééôàî\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f úéðëú-õáå÷\t\t--file=úéðëú-õáå÷\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "\t-F úåãù-ãéøôî\t\t--field-separator=úåãù-ãéøôî\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "\t-v äðúùî=êøò\t\t--assign=äðúùî=êøò\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr "\t-m[fr] êøò\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr "\t-W compat\t\t--compat\n" + +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" +msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:570 +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=õáå÷-íù]\t--dump-variables[=õáå÷-íù]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=õáå÷-íù]\t--profile[=õáå÷-íù]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=úéðëú-èñ÷è\t--source=úéðëú-èñ÷è\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -648,7 +1453,7 @@ " .ñôãåîä êéøãîá `Reporting Problems and Bugs' ä÷ñô\n" "\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -657,7 +1462,7 @@ ".èñ÷è úåéðáú ìù ãåáéòå äé÷øñì äôù åðéä gawk\n" ".éð÷ú èìôì áúåëå éð÷ú èì÷ õåøò àøå÷ àåä ìãçî úøéøáë\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -667,7 +1472,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -685,7 +1490,7 @@ " íàå ,ïåéùøä ìù 2 àñøâá íà ;Free Software Foundation\n" " .øúåé úøçåàî àñøâ ìëá (íëì äøåîùä äéöôåàë)\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -698,7 +1503,7 @@ ",íéèøôì .úîéåñî úéìëú åæéàì äîàúä åà úåøéçñ ìù\n" " .GNU General Public License-á åðééò àðà\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -708,100 +1513,121 @@ "Free Software Foundation, Inc.-ì åáúë àðà ,åúåà íúìáé÷ àì íà\n" ".59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "awk ìù POSIX úñøâá TAB úåéäì FS-ì íøåâ åðéà -Ft" -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "êøò úîùäá `%s' äðúùî íù ìù éåâù øéáçú" +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "äôö äãå÷ð éáåùéçá äâéøç" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "úéîéðô äðëú úàéâù :äøåîç äì÷ú" # FIXME: I wonder how many people will understand what "fd 2" means. -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "ùàøî çåúô åðéà %d èìô/èì÷ õåøò" # FIXME: /dev/null might not be known to all. -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "/dev/null-ì %d èìô/èì÷ õåøò çåúôì ïúéð àì" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "%s :úëøòîá íéùîúùî úåöåá÷ ìò òãéî ïéà" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "äáéúë êøåöì `%s' úçéúô úòá (%s) äì÷ú" +# The next 4 strings are untranslated because msg.c prints the actual +# message after "warning:", "error:", etc., which will look terribly +# wrong if both these headings and the message text after them is in +# Hebrew, due to changed directionality. +#: msg.c:54 +msgid "cmd. line:" +msgstr "cmd. line:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "éð÷ú úåàéâù õåøòì çìùð òåöéá ìéôåøô" +#: msg.c:120 +msgid "warning: " +msgstr "warning: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù" +#: msg.c:142 +msgid "error: " +msgstr "error: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "ñôåàî åìù vname-äù Node_var_array :úéîéðô äðëú úàéâù" +#: msg.c:178 +msgid "fatal: " +msgstr "fatal: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -",`(' ïéáì äîù ïéá íéçååø íò `%s' äéö÷ðåôì äàéø÷\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "øçà éåèéá ìù èñ÷èðå÷á äá ùåîéù åà" +#: node.c:357 +msgid "backslash at end of string" +msgstr "úæåøçî óåñá êåôä ïñëåì" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "øàì÷ñ ùøåãä èñ÷èðå÷á `%s' êøòîá ùåîéù ïåéñð" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "`\\x' âåñî äø÷á úåøãñ äùøî åðéà POSIX ï÷ú" + +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "`\\x' äø÷á úøãñá úåéìîéöãñ÷ä úåøôñá ùîúùäì ïéà" -#: profile.c:637 eval.c:1047 +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval-á (%s) éåâù âåñ" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "éìåìéî åúë ìôåè `\\%c' äø÷á úøãñá `%c' åú" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s `%s' øåáò close-on-exec ïééôàî úìòôäá (fcntl: %s) äì÷ú" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "äøåñà äá êøò úîùä ,äéö÷ðåô àéä `%s'" +msgid "could not open `%s' for writing: %s" +msgstr "äáéúë êøåöì `%s' úçéúô úòá (%s) äì÷ú" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "úéðáåî äéö÷ðåô ìù äàöåúá êøò áéöäì ïéà" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "ñôåàî åìù vname-äù Node_var :úéîéðô äðëú úàéâù" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "" + +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "ñôåàî åìù vname-äù Node_var_array :úéîéðô äðëú úàéâù" -#: profile.c:1108 +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# %s êéøàúî gawk ìù ìéôåøô\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -809,7 +1635,7 @@ "\t# BEGIN ÷åìá\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -817,7 +1643,7 @@ "\t# (íé)ììë\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -825,7 +1651,7 @@ "\t# END ÷åìá\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -833,911 +1659,138 @@ "\n" "\t# úéá-óìà øãñá ,úåéö÷ðåô\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "prec_level-á %s éåâù âåñ" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç" + +#: regcomp.c:136 msgid "Success" msgstr "äçìöä" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "äîéàúî úæåøçî äàöîð àì" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "éåâù éøìåâø éåèéá" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "øãâåî-éúìá øåãéñ åú" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "íéåú úöåá÷ ìù øãâåî-éúìá íù" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "`\\' éøåçà ïñëåìá íééúñî éøìåâø éåèéá" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "íãå÷ éåèéá-úúì äéåâù äééðôä" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "âåæ-ïá åì ïéàù [^ åà [" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "âåæ-ïá åì ïéàù \\( åà (" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "âåæ-ïá åì ïéàù \\{" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "\\{\\} êåúá éåâù äðáî" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "íéåú íåçú ìù äéåâù äøãâä" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "ïåøëæä øîâð" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "íéé÷ åðéà åà éåâù íãå÷ éøìåâø éåèéá" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "éãî íã÷åî íééúñî éøìåâø éåèéá" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "éãî áëøåî åà ìåãâ éøìåâø éåèéá" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr "âåæ-ïá åì ïéàù \\) åà )" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "íãå÷ éøìåâø éåèéá ïéà" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "äìåòô úøãâä ìåìëì áééç BEGIN ÷åìá" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "äìåòô úøãâä ìåìëì áééç END ÷åìá" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "äúøãâä úà úåðùì ïéà ,úéðáåî äéö÷ðåô äðéä `%s'" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "úéìëú íåù äéäú àì äæ éåèéáìù ïëúé" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "END åà BEGIN ìù äìåòô úøãâäá `next'-á ùåîéù" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `nextfile'" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "END åà BEGIN ìù äìåòô úøãâäá `nextfile'-á ùåîéù" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "äéö÷ðåô ìù èñ÷èðå÷á àìù `return'-á ùåîéù" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "`print \"\"' úåéäì íúñä ïî êéøö END åà BEGIN éììëá èåùô `print'" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `delete array'" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "íéãáåò íðéà íéáìù éáåøî íééðååéë-åã íé÷éôà" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "êøò úîùä úàøåä ìù ïéîé ãöá éøìåâø éåèéá" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "END úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "`!~' åà `~' øåèøôåàì ìàîùî éøìåâø éåèéá" - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "äøòä åðéà êà ,C úôùá äøòä åîë äàøð `/%s/' éøìåâø éåèéá" - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "äàååùä ìù ïéîé ãöá éøìåâø éåèéá" - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "END åà BEGIN úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "úéìéáèøåô äðéà íééøâåñ àìì `length'-ì äàéø÷" - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "POSIX ï÷úì ãåâéðá äðéä íééøâåñ àìì `length'-ì äàéø÷" - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "êøòî ïééöîá éåâù øéáçú ìòá éåèéá" - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "tokentab-á àöîð àì fptr %x\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "éåôö-éúìá íå÷îá äøåù óåñ" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "äãå÷ôä úøåùî äìá÷úä ä÷éø úéðëú" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "åúàéø÷ íùì `%s' øå÷î õáå÷ úçéúôá (%s) äì÷ú" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "`%s' øå÷î õáå÷î äàéø÷á (%s) äì÷ú" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "÷éø åðéä `%s' øå÷î õáå÷" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "äøåù-óåñ åúá íééúñî åðéà øå÷îä õáå÷" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "õáå÷ä óñá `\\'-á íééúñî øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "õáå÷ä óåñá øåîâ-éúìá éøìåâø éåèéá" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "éìéáèøåô åðéà äøåù êùîäì ïîéñë `\\ #...'-á ùåîéù" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "äøåùá ïåøçà åú åðéàù êåôä ïñëåì" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "`**=' øåèøôåà äùøî åðéà POSIX" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "`**=' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "`**' øåèøôåà äùøî åðéà POSIX" - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "`**' øåèøôåàá êîåú åðéà ïùé awk" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `^=' øåèøôåà" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `^' øåèøôåà" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "äøåîâ-éúìá úæåøçî" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "éåèéáá '%c' éåâù åú" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `%s'" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "Bell úåãáòî úñøâá awk-ì úéôéöôñ äáçøä åðéä `%s'" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "`%s' äùøî åðéà POSIX" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "ïùé awk-á êîúð åðéà `%s'" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "!òø-òâô áùçð `goto'\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "íéèðîåâøà øôñîë %d ìá÷ì ìåëé åðéà %s" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `match' ìù éùéìù èðîåâøà" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "úéìëú íåù äì ïéà `%s' ìù ïåøçà èðîåâøàë äòåá÷ úæåøçî" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "éåðéù-øá è÷ééáåà åðéà `sub' ìù éùéìù èðîåâøà" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "éåðéù-øá è÷ééáåà åðéà `gsub' ìù éùéìù èðîåâøà" - -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `close' ìù éðù èðîåâøà" - -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dcgettext(_\"...\")-á éåâù ùåîéù" - -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "èðîåâøà úîã÷áù ïåúçú-ó÷î ÷ìñì ùé :dncgettext(_\"...\")-á éåâù ùåîéù" - -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "`%s' äéö÷ðåôá %d 'ñî øèîøôì ääæ ,`%s' ,%d 'ñî øèîøô ìù åîù" +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "äìåòô úøãâä ìåìëì áééç BEGIN ÷åìá" -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "éìáåìâ äðúùî ìò ìéôàî `%s' äéö÷ðåôá `%s' øèîøô" +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "END åà BEGIN ìù äìåòô úøãâäá `nextfile'-á ùåîéù" -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "äáéúë íùì `%s' úçéúôá (%s) äì÷ú" +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "éåðéù-øá è÷ééáåà åðéà `gsub' ìù éùéìù èðîåâøà" -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "`%s' úøéâñ úòá (%s) äì÷ú" +#~ msgid "or used in other expression context" +#~ msgstr "øçà éåèéá ìù èñ÷èðå÷á äá ùåîéù åà" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "!íééîòô äàø÷ð shadow_funcs()" +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "êøòîë `%s' äéö÷ðåôá ùåîéù ïåéñð" -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "øèîøô íùë ùîùì ìåëé åðéà äéö÷ðåô íù :`%s' äéö÷ðåôá" +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "äøåñà äá êøò úîùä ,äéö÷ðåô àéä `%s'" -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "úøãâåî øáë `%s' íùá äéö÷ðåô" +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "`%s' õáå÷ ìù %d äøåùá úéîéðô äðëú äàéâù\n" -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "úøãâåî äðéàù `%s' äéö÷ðåôì äàéø÷" +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "END åà BEGIN úìåòô êåúá øãâåî åðéà äééðôä àìì `getline'" -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "úàø÷ð àì êà ,äøãâåä `%s' äéö÷ðåô" +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "tokentab-á àöîð àì fptr %x\n" -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "éðàéìåá êøò áéðî %d 'ñî øèîøôë òåá÷ éøìåâø éåèéá" +#~ msgid "Unbalanced [" +#~ msgstr "âåæ-ïá åì ïéàù [" -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "âåæ-ïá åì ïéàù [" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "äøåîâ-éúìá \\ äø÷á úøãñ" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "äøåîâ-éúìá úåðùéä äðåî úøãâä" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "úåðùéä äðåî úøãâäá éåâù øéáçú" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "âåæ-ïá åì ïéàù (" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "íééøìåâø íééåèéá ìù øéáçú úøãâä ïéà" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr "âåæ-ïá åì ïéàù )" +#~ msgid "Unfinished \\ escape" +#~ msgstr "äøåîâ-éúìá \\ äø÷á úøãñ" -#: dfa.c:3014 -msgid "out of memory" -msgstr "ïåøëæä øîâð" +#~ msgid "unfinished repeat count" +#~ msgstr "äøåîâ-éúìá úåðùéä äðåî úøãâä" -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "êøòî åðéà `split' ìù éðùä èðîåâøàä" +#~ msgid "malformed repeat count" +#~ msgstr "úåðùéä äðåî úøãâäá éåâù øéáçú" -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `split'-ì éùéìù èðåîâøàë úñôåàî úæåøçî" +#~ msgid "Unbalanced (" +#~ msgstr "âåæ-ïá åì ïéàù (" -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `FIELDWIDTHS'" +#~ msgid "No regexp syntax bits specified" +#~ msgstr "íééøìåâø íééåèéá ìù øéáçú úøãâä ïéà" -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "0-î ìåãâ úåéäì áééç FIELDWIDTHS-á %d 'ñî äãù" +#~ msgid "Unbalanced )" +#~ msgstr "âåæ-ïá åì ïéàù )" -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `FS'-ë úñôåàî úæåøçî" +#~ msgid "out of memory" +#~ msgstr "ïåøëæä øîâð" -# The next 4 strings are untranslated because msg.c prints the actual -# message after "warning:", "error:", etc., which will look terribly -# wrong if both these headings and the message text after them is in -# Hebrew, due to changed directionality. -#: msg.c:57 -msgid "cmd. line:" -msgstr "cmd. line:" - -#: msg.c:123 -msgid "warning: " -msgstr "warning: " - -#: msg.c:145 -msgid "error: " -msgstr "error: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatal: " - -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "%d ääåæî-éúìá âåñ ìòá node" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str-á õöåç úùéìâ" - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "(`%s' êøòî) äàìåìä òåöéá êìäîá %d-î %d-ì äðåù êøòî ìù åìãåâ :for úàìåì" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "éìéáèøåô åðéà äàìåìì õåçî `break'" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "äàìåìì õåçî `break'-á ùîúùäì ïéà" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "éìéáèøåô åðéà äàìåìì õåçî `continue'" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "äàìåìì õåçî `continue'-á ùîúùäì ïéà" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "BEGIN éììë êåúî `next'-ì àåø÷ì ïéà" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "END éììë êåúî `next'-ì àåø÷ì ïéà" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "BEGIN éììë êåúî `nextfile'-ì àåø÷ì ïéà" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "END éììë êåúî `nextfile'-ì àåø÷ì ïéà" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "úéìëú-úìåèð äàøåä" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "`%s' ìçåúî-éúìá äðúùîì äéðôä" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "êøòî åà äðúùîë `%s' äéö÷ðåô íùá ùîúùäì ïéà" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "`%s' ìçåúî-éúìá èðîåâøàì äéðôä" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "éàðú ìù èñ÷èðå÷á äîùäá ùåîéù" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"!øçà éåèéá ìù åëøåà éåðéùì åîøâ ãçà éåèéá áåùéç ìù éàåì-úåòôåú :concatenation" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "ñôàá ä÷åìç ïåéñð" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "`%%'-á ñôàá ä÷åìç ïåéñð" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "`/='-á ñôàá ä÷åìç ïåéñð" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "`%%='-á ñôàá ä÷åìç ïåéñð" - -# This is not translated because it cannot be reworded in Hebrew -# without looking awkward. -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (from %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "äúæøëäá øùàî íéèðîåâøà øúåé íò `%s' äéö÷ðåôì äàéø÷" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "úøãâåî äðéà `%s' äéö÷ðåô" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "`%s' äéö÷ðåôì äàéø÷\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# :úåéö÷ðåôì úåàéø÷ä úéðñçî\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "øôñî åðéàù êøò úåòöîàá äãùì äéðôä ïåéñð" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "ä÷éø úæåøçî úåòöîàá äãùì äéðôä ïåéñð" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "%d 'ñî äãùì äùéâ ïåéñð" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "êøòî äéä åìéàë `%s' éøì÷ñ øèîøôá ùåîéù ïåéñð" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `IGNORECASE'" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä åðéä `BINMODE'" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "äðé÷ú `%sFMT' úøãâä åðéà `%s'" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT'-ì êøò úîùä á÷ò `--lint' ìèáî" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "éìéìù êøò ìáé÷ NF" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "åúàéø÷ íùì `%s' õáå÷ úçéúôá (%s) äì÷ú" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "(%d èìô/èì÷ õåøò) `%s' úøéâñá (%s) äì÷ú" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "redirect() äéö÷ðåôá %s éåâù õò âåñ" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "ãáìá éøîåð êøò áéðî `%s' èìô/èì÷ úééðôäá éåèéá" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "ä÷éø úæåøçî áéðî `%s' èìô/èì÷ úééðôäá éåèéá" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "éâåì éåèéá ìù äàöåú úåéäì ìåìò `%s' õáå÷ íù `%s' èìô/èì÷ úééðôäá" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "`%.*s' õáå÷ øåáò `>>'-á ïäå `>'-á ïä øúåéî ùåîéù" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "èìô êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "èì÷ êøåöì `%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "èìô/èì÷ êøåöì éðååéë-åã (socket) ò÷ùë `%s' úçéúôá (%s) äì÷ú" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "èìô/èì÷ êøåöì éðååéë-åã (pipe) ÷éôàë `%s' úçéúôá (%s) äì÷ú" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "`%s'-î äééðôäá (%s) äì÷ú" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "`%s' ìà äééðôäá (%s) äì÷ú" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "èìô/èì÷ éöåøò áåáéø úìéçú ;íéçåúô íéöá÷ øôñî ìù úëøòî úìáâîì äòâä" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "`%s' úøéâñá (%s) äì÷ú" - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "úéðîæ-åá íéçåúô èì÷ éöá÷ åà (pipes) íé÷éôà éãî øúåé" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "`from' åà `to' úåéäì áééç `close' ìù éðùä èðîåâøàä" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "ìéá÷î êéìäú åà çåúô ÷éôà ,çåúô õáå÷ åðéà `%.*s' :close" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "íìåòî äçúôð àìù äééðôä úøéâñ" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "çðæåä éðùä èðîåâøàä ,`|&' é\"ò äçúôð àì `%s' äééðôä" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "(%d äì÷ú ãå÷) `%s'-ì ÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "(%d äì÷ú ãå÷) `%s' õáå÷ úøéâñá (%s) äì÷ú" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "ùøåôîá øâñð àì (socket) `%s' ò÷ù" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "ùøåôîá øâñð àì (co-process) `%s' ìéá÷î êéìäú" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "ùøåôîá øâñð àì (pipe) `%s' ÷éôà" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "ùøåôîá øâñð àì `%s' õáå÷" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "éð÷ú èìô õåøòì äáéúëá (%s) äì÷ú" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "éð÷ú úåàéâù õåøòì äáéúëá (%s) äì÷ú" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "`%s'-ì ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "`%s'-ì ìéá÷î êéìäú ÷éôà ìù õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "`%s' ìù õáå÷ éðåúð õöåç ïå÷éøá (%s) äì÷ú" - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "ïëåî íøè /inet/raw çå÷ì ,íéøòèöî" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "ãáìá root ùîúùîì øúåî `inet/raw'-á ùåîéù" - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "ïëåî íøè /inet/raw úøù ,íéøòèöî" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "`%s' ãçåéî õáå÷ íùá ääåæî-éúìá åà øñç ìå÷åèåøô" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "íìù åðéà `%s' ãçåéî õáå÷" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "`%s'-á äéåâù úéîå÷î äàéöé" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "`/inet' øåáò ÷çåøî çøàî-áùçî íù øéãâäì äáåç" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "`/inet' øåáò ú÷çåøî äàéöé øéãâäì äáåç" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "`%s'-á äéåâù ú÷çåøî äàéöé" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP úøåù÷úá äëéîú ïéà" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "äé÷éú åðéä `%s' õáå÷" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "`PROCINFO[\"%s\"]'-á ùîúùäì óéãò `%s' íå÷îá" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "`/dev/user' éðô-ìò óéãò `PROCINFO[...]'-á ùåîéù" - -# This probably sounds nonsensical in Hebrew, but what can I do, -# given the original message text? -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "`%s' øåáò `%s' äìåòô ïôåà úçéúôá ïåìùë" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "úá-úéðëúá stdout-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "úá-úéðëúá stdin-ì ÷éôà ìåôëùá (dup: %s) äì÷ú" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "áà-úéðëúá stdout ÷éôà øåæçùá äì÷ú\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "áà-úéðëúá stdin ÷éôà øåæçùá äì÷ú\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "úá-úéðëúá stdout úøéâñá (%s) äì÷ú" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "úá-úéðëúá stdin úøéâñá (%s) äì÷ú" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "÷éôà úøéâñá (%s) äì÷ú" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "`|&'-á äëéîú ïéà" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "`%s' ÷éôà úçéúôá (%s) äì÷ú" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "`%s' úá-úéðëúì êéìäú úøéöéá (fork: %s) äì÷ú" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "÷éø åðéä `%s' íéðåúð õáå÷" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "`%s' õáå÷ ìù %d äøåùá úéîéðô äðëú äàéâù\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "`%s' õáå÷ úàéø÷á (%s) äì÷ú" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "gawk-ì úéôéöôñ äáçøä äðéä `RS' ìù êøòá íéåú øôñîá äëéîú" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "øôñîì äøîäì úðúéð äðéà úæåøçî" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "úæåøçî óåñá êåôä ïñëåì" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "`\\x' âåñî äø÷á úåøãñ äùøî åðéà POSIX ï÷ú" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "`\\x' äø÷á úøãñá úåéìîéöãñ÷ä úåøôñá ùîúùäì ïéà" - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "éìåìéî åúë ìôåè `\\%c' äø÷á úøãñá `%c' åú" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "\"%.*s%s\" úæåøçî úîàúäì ïåøëæ éã ïéà ,ìùëð éøìåâø éåèéáì äîàúä ùåôéç" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s' øåáò close-on-exec ïééôàî úìòôäá (fcntl: %s) äì÷ú" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "êøò úîùäá `%s' äðúùî íù ìù éåâù øéáçú" diff -urN gawk-3.1.1/po/it.po gawk-3.1.2/po/it.po --- gawk-3.1.1/po/it.po 2002-05-01 16:40:59.000000000 +0300 +++ gawk-3.1.2/po/it.po 2003-03-19 14:25:12.000000000 +0200 @@ -1,430 +1,934 @@ # Italian messages for GNU Awk -# Copyright (C) 2002 Free Software Foundation, Inc. -# Antonio Colombo , 2002. +# Copyright (C) 2002-2003 Free Software Foundation, Inc. +# Antonio Colombo , 2003. # msgid "" msgstr "" "Project-Id-Version: gawk 3.1.35\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" -"PO-Revision-Date: 2002-04-21 22:22+0100\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" +"PO-Revision-Date: 2003-02-18 11:11+0100\n" "Last-Translator: Antonio Colombo \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-8\n" "Content-Transfer-Encoding: 8-bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "tentativo di usare scalare '%s' come vettore" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referenza a elemento non inizializzato `%s[\"%s\"]'" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "l'indice del vettore '%s' è una stringa nulla" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "delete: use non permesso della variabile `%s' come vettore" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: indice `%s' non presente nel vettore `%s'" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "delete: use non permesso della variabile `%s' come vettore" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: vuoto (nullo)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: vuoto (zero)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: dimensione_tabella = %d, dimensione_vettore = %d\n" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "%s: è parametro\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: referenza_vettoriale a %s\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: il primo argomento non è un vettore" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: il secondo argomento non è un vettore" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "blocchi %s richiedono una 'azione'" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "ogni regola deve avere una parte 'espressione' o una parte 'azione'" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "`%s' è una funzione interna, non si può ridefinire" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "costante 'regexp' `/%s/' sembra un commento commento C, ma non lo è" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "istruzione che può non aver alcun effetto" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "`%s' usato in 'azione' %s" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "`nextfile' è un'estensione gawk" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "`return' usato fuori da una funzione" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "`print' da solo in BEGIN o END dovrebbe forse essere `print \"\"'" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "`delete array' è un'estensione gawk" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "`delete(array)' è un'estensione tawk non-portabile" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "'pipelines' multistadio bidirezionali non funzionano" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "espressione regolare usata per assegnare un valore" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "espressione regolare prima di operatore `~' o `!~'" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "espressione regolare a destra in un confronto" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "`getline' non re-diretta indefinita dentro 'azione' END" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "chiamata a `length' senza parentesi non portabile" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "espressione indice invalida" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "carattere 'a capo' o fine stringa inaspettati" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "programma nullo sulla linea comandi" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "non riesco a leggere file sorgente `%s' (%s)" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "file sorgente `%s' vuoto" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "file sorgente non termina con carattere 'a capo'" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "espressione regolare non completata termina con `\\' a fine file" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "espressione regolare non completata" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "espressione regolare non completata a fine file" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "uso di `\\ #...' continuazione linea non portabile" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "'\\' non è l'ultimo carattere della linea" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX non permette l'operatore `**='" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "il vecchio awk non supporta l'operatore `**='" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX non permette l'operatore `**'" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "il vecchio awk non supporta l'operatore `**'" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "l'operatore `^=' non è supportato nel vecchio awk" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "l'operatore `^' non è supportato nel vecchio awk" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "stringa non terminata" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "carattere '%c' invalido in un'espressione" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "`%s' è un'estensione gawk" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "`%s' è un'estensione Bell Labs" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX non permette `%s'" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "`%s' non è supportato nel vecchio awk" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "`goto' considerato pericoloso!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d invalido come numero di argomenti per %s" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: il terzo argomento è un'estensione gawk" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "%s: una stringa come ultimo argomento di 'substitute' non ha effetto" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "il terzo parametro di '%s' non è un oggetto modificabile" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: il secondo argomento è un'estensione gawk" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "funzione `%s': parametro `%s' nasconde variabile globale" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "non riesco ad aprire `%s' in scrittura (%s)" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "mando profilo a 'standard error'" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: 'close' fallita (%s)" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "shadow_funcs() chiamata due volte!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "c'erano variabili nascoste." + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "funzione `%s': non posso usare nome della funzione come nome parametro" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "funzione di nome `%s' definita in precedenza" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "funzione `%s' chiamata ma mai definita" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "funzione `%s' definita ma mai chiamata" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "" +"espressione regolare di valore costante per parametro #%d genera valore " +"booleano" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"funzione `%s' chiamata con spazio tra il nome e `(',\n" +"%s" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "o usato come variabile o come vettore" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s a \"%s\" fallita (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "standard output" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "ragione indeterminata" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: argomento non numerico" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argomento %g non accettabile" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: non posso scaricare: 'pipe' `%s' aperta in lettura, non in scrittura" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: non posso scaricare: file `%s' aperto in lettura, non in scrittura" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' non è un file aperto, una 'pipe' o un co-processo" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: il primo argomento non è una stringa" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: il secondo argomento non è una stringa" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: argomento non numerico" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: l'argomento non è una stringa" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: argomento non numerico" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: argomento negativo %g" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "'count$' va usato per tutti i formati o per nessuno" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "`$' non permesso nei 'format' awk" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "il numero di argomento con `$' deve essere > 0" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" +msgid "arg count %ld greater than total number of supplied arguments" msgstr "" -"numero di argomento %d maggiore del numero totale di argomenti specificati" +"numero di argomenti (%ld) maggiore del numero totale di argomenti specificati" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "`$' non permesso dopo un punto nel 'format'" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "" "nessun `$' specificato per larghezza o precisione di un campo posizionale" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' non ha senso nei 'format' awk; ignorata" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' non permessa nei 'format' awk POSIX" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' non ha senso nei 'format' awk; ignorata" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' non permessa nei 'format' awk POSIX" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' non ha senso nei 'format' awk; ignorata" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' non permessa nei 'format' awk POSIX" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "mancano argomenti per completare il 'format'" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ uscito per questo" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: il designatore di 'format' non ha una lettera di controllo" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "troppi argomenti specificati per il 'format'" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: manca argomento" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: argomento non numerico" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: chiamata con argomento negativo %g" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: indice di partenza %g invalido, uso 1" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: indice di partenza non intero %g: sarà troncato" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: lunghezza %g <= 0" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "substr: lunghezza %g < 0" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: lunghezza non intera %g: sarà truncata" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "substr: lunghezza %g troppo elevata per indice stringa, tronco a %g" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: stringa di partenza lunga zero" -#: builtin.c:1221 +#: builtin.c:1263 #, c-format -msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" -msgstr "" -"substr: lunghezza %d dell'indice di partenza %d supera lunghezza del primo " -"argomento (%d)" +msgid "substr: start index %g is past end of string" +msgstr "substr: indice di partenza %g oltre la fine della stringa" -#: builtin.c:1227 +#: builtin.c:1271 #, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: indice di partenza %d supera la fine della stringa" +msgid "" +"substr: length %g at start index %g exceeds length of first argument (%lu)" +msgstr "" +"substr: lunghezza %g all'indice di partenza %g supera la lunghezza del primo " +"argomento (%lu)" -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: il primo argomento non è una stringa" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: 'format' è una stringa nulla" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "strftime: il secondo argomento non è numerico" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: l'argomento non è una stringa" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: l'argomento non è una stringa" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: l'argomento non è una stringa" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: l'argomento non è una stringa" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: il primo argomento non è numerico" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: il secondo argomento non è numerico" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: l'argomento non è numerico" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: l'argomento non è numerico" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: l'argomento non è numerico" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: il terzo argomento non è un vettore" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: il terzo argomento è 0, trattato come 1" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: il primo argomento non è numerico" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): valori troppo alti daranno risultati strani" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: il primo argomento non è numerico" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): valori troppo alti daranno risultati strani" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: il primo argomento non è numerico" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: il primo argomento non è numerico" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: il primo argomento non è numerico" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): valori negativi daranno risultati strani" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): valori con decimali verranno troncati" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: l'argomento non è numerico" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): valore negativo darà risultati strani" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): valore con decimali verrà troncato" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' non è una categoria 'locale' valida" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" -msgstr "`extension' è un'estensione gawk" - -#: ext.c:74 +#: eval.c:262 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: non riesco ad aprire `%s' (%s)\n" +msgid "unknown nodetype %d" +msgstr "tipo nodo sconosciuto %d" -#: ext.c:82 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "superament limiti buffer in 'genflags2str'" + +#: eval.c:555 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"ciclo for: vettore `%s' ha cambiato dimensione da %ld a %ld durante " +"l'esecuzione del ciclo" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "`break' all'esterno di un ciclo non è portabile" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "`break' all'esterno di un ciclo non è consentito" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "`continue' all'esterno di un ciclo non è portabile" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "`continue' all'esterno di un ciclo non è consentito" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "`next' non può essere chiamato da una regola BEGIN" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "`next' non può essere chiamato da una regola END" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "`nextfile' non può essere chiamato da una regola BEGIN" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "`nextfile' non può essere chiamato da una regola END" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "istruzione che non fa nulla" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referenza a variabile non inizializzata `%s'" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "non posso usare nome di funzione `%s' come variabile o vettore" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "referenza ad argomento non inizializzato `%s'" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "tentativo di usare vettore `%s' in un contesto scalare" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"concatenatione: effetti secondari in una espressione hanno modificato la " +"lunghezza di un'altra espressione!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "assegnamento usato nel contesto di un test condizionale" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "tentativo di dividere per zero" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "divisione per zero tentata in `%%'" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "tipo non ammesso (%s) in 'tree_eval'" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "divisione per zero tentata in `/='" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "divisione per zero tentata in `%%='" + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (da %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "funzione `%s' non definita" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "funzione %s chiamata\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# 'Stack' (Pila) Chiamate Funzione:\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- principale --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "tentativo di referenziare campo da valore non numerico" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "tentativo to referenziare da stringa nulla" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "tentativo di accedere al campo %d" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "tentativo di unare il parametro scalare `%s' come un vettore" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "assegnamento non permesso al risultato di una funzione interna" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' è un'estensione gawk" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' è un'estensione gawk" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "specificazione invalida `%sFMT' `%s'" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" + +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" +msgstr "`extension' è un'estensione gawk" + +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" +msgstr "extension: non riesco ad aprire `%s' (%s)\n" + +#: ext.c:82 +#, c-format +msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: biblioteca `%s': non riesco a chiamare funzione `%s' (%s)\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "Operazione Non Supportata" +#: field.c:321 +msgid "NF set to negative value" +msgstr "NF impostato a un valore negativo" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: il secondo argomento non è un vettore" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "`FIELDWIDTHS' è un'estensione gawk" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "campo %d in FIELDWIDTHS, deve essere > 0" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "la stringa nulla usata come `FS' è un'estensione gawk" + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -465,7 +969,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: opzione non valida -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: l'opzione richiede un argomento -- %c\n" @@ -480,162 +984,471 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: opzione `-W %s' non prevede un argomento\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-m[fr]' opzione irrilevante per gawk" - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m uso opzione: `-m[fr] nnn'" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "non riesco ad aprire file `%s' in lettura (%s)" -#: main.c:326 +#: io.c:344 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" +msgid "close of fd %d (`%s') failed (%s)" +msgstr "chiusura di fd %d (`%s') fallita (%s)" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "argomento di `--source' mancante, comando ignorato" +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" +msgstr "tipo di albero invalido %s in redirect()" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' annulla `--traditional'" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"nome file `%s' per la re-direzione `%s' può essere il risultato di una " +"espressione logica" -#: main.c:449 +#: io.c:521 #, c-format -msgid "running %s setuid root may be a security problem" -msgstr "eseguire %s con 'setuid' root può essere un rischio per la sicurezza" +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" -#: main.c:478 +#: io.c:573 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "non posso impostare mode su 'stdin'(%s)" +msgid "can't open pipe `%s' for output (%s)" +msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" -#: main.c:481 +#: io.c:582 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "non posso impostare mode su 'stdout'(%s)" +msgid "can't open pipe `%s' for input (%s)" +msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" -#: main.c:483 +#: io.c:595 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "non posso impostare mode su 'stderr'(%s)" +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "" +"non posso aprire 'socket' bidirezionale `%s' per lettura/scrittura (%s)" -#: main.c:512 -msgid "no program text at all!" -msgstr "manca del tutto il testo del programma!" +#: io.c:599 +#, c-format +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)" -#: main.c:556 +#: io.c:675 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f fileprog [--] file ...\n" +msgid "can't redirect from `%s' (%s)" +msgstr "non posso re-dirigere da `%s' (%s)" -#: main.c:558 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ...\n" +msgid "can't redirect to `%s' (%s)" +msgstr "non posso re-dirigere a `%s' (%s)" -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "" +"numero massimo consentito di file aperti raggiunto: comincio a riutilizzare " +"i descrittori di file" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f fileprog\t\t--file=fileprog\n" +#: io.c:729 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "chiusura di `%s' fallita (%s)." -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "troppe 'pipe' o file di input aperti" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=valore\t\t--assign=var=valore\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: il secondo argomento deve essere `a' o `da'" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] valore\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "chiusura di una re-direzione mai aperta" -#: main.c:569 +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento" + +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "nessuna chiusura esplicita richiesta per file `%s'" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "errore scrivendo 'standard output' (%s)" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "errore scrivendo 'standard error' (%s)" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "scaricamento di 'pipe' `%s' fallita (%s)." + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "scaricamento da co-processo di 'pipe' a `%s' fallita (%s)." + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "scaricamento di file `%s' fallita (%s)." + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "spiacente, 'client' /inet/raw non ancora pronto" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "solo root può usare `/inet/raw'." + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "spiacente, 'server' /inet/raw non ancora pronto" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "nessuno protocollo (conosciuto) specificato nel filename speciale `%s'" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "nome file speciale `%s' incompleto" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "porta locale invalida in `%s'" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "va fornito nome di 'host' remoto a `/inet'" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "va fornita porta remota a `/inet'" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "porta remota invalida in `%s'" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "comunicazioni TCP/IP non supportate" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "file `%s' è una 'directory'" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "usa `PROCINFO[...]' invece che `/dev/user'" + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "non riesco ad aprire `%s', modo `%s'" + +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "fallita chiusura di 'pty' principale (%s)" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" + +#: io.c:1708 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "" +"fallito trasferimento di 'pty' secondaria a 'stdout' nel processo-figlio " +"(dup: %s)" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" + +#: io.c:1713 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "" +"fallito trasferimento di 'pty' secondaria a 'stdin' nel processo-figlio " +"(dup: %s)" + +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "fallita chiusura di 'pty' secondaria (%s)" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "fallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "fallito ripristino di 'stdout' nel processo-padre\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "fallito ripristino di 'stdin' nel processo-padre\n" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "fallita chiusura di 'pipe' (%s)" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "`|&' non supportato" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "non riesco ad aprire 'pipe' `%s' (%s)" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "file dati `%s' vuoto" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "non riesco ad allocare ulteriore memoria per l'input" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "errore leggendo file di input `%s': %s" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "valore multicarattere per `RS' è un'estensione gawk" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "`-m[fr]' opzione irrilevante per gawk" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "-m uso opzione: `-m[fr] nnn'" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: opzione `-W %s' non riconosciuta, ignorata\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "argomento di `--source' mancante, comando ignorato" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "variable d'ambiente `POSIXLY_CORRECT' impostata: attivo `--posix'" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "`--posix' annulla `--traditional'" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "`--posix'/`--traditional' annulla `--non-decimal-data'" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "eseguire %s con 'setuid' root può essere un rischio per la sicurezza" + +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "non posso impostare modalità binaria su 'stdin'(%s)" + +#: main.c:512 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "non posso impostare modalità binaria su 'stdout'(%s)" + +#: main.c:514 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "non posso impostare modalità binaria su 'stderr'(%s)" + +#: main.c:544 +msgid "no program text at all!" +msgstr "manca del tutto il testo del programma!" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "Uso: %s [opzioni in stile POSIX o GNU] -f fileprog [--] file ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "Usage: %s [opzioni in stile POSIX o GNU] [--] %cprogramma%c file ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "Opzioni POSIX:\t\topzioni lunghe GNU:\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f fileprog\t\t--file=fileprog\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "\t-F fs\t\t\t--field-separator=fs\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "\t-v var=valore\t\t--assign=var=valore\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr "\t-m[fr] valore\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr "\t-W compat\t\t--compat\n" + +#: main.c:625 msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:570 +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=file]\t--dump-variables[=file]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=file]\t--profile[=file]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=testo-programma\t--source=testo-programma\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -647,7 +1460,7 @@ "sezione `Reporting Problems and Bugs' nella versione a stampa.\n" "\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -657,7 +1470,7 @@ "Senza parametri, legge da 'standard input' e scrive su 'standard output'.\n" "\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -667,7 +1480,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -680,13 +1493,13 @@ msgstr "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" "\n" -"Questo programma è libero software; lo puoi distribuire e/o modificare\n" +"Questo software è libero; lo puoi distribuire e/o modificare\n" "alle condizioni stabilite nella 'GNU General Public License' pubblicata\n" "dalla Free Software Foundation; fai riferimento alla versione 2 della\n" "Licenza, o (a tua scelta) a una qualsiasi versione successiva.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -696,11 +1509,11 @@ msgstr "" "Questo programma è distribuito con la speranza che sia utile,\n" "ma SENZA ALCUNA GARANZIA; senza neppure la garanzia implicita\n" -"di COMMERCIABILITA' o UTILITA' per UNO SCOPO PARTICOLARE.\n" +"di COMMERCIABILITA' o IDONEITA' AD UN PARTICOLARE SCOPO.\n" "Vedi la 'GNU General Public License' per ulteriori dettagli.\n" "\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -710,98 +1523,117 @@ "assieme a questo programma; se non è così, scrivi alla Free Software\n" "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft non imposta FS a 'tab' nell'awk POSIX" -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" +"%s: `%s' argomento di `-v' non in forma `var=valore'\n" +"\n" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "`%s' non è un nome di variabile ammesso" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "sintassi invalida nel nome di variabile `%s'" +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "`%s' non è un nome di variabile, cerco il file `%s=%s'" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "eccezione floating point" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "errore fatale: errore interno" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "manca 'fd' predefinita %d" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "non riesco a predefinire /dev/null per 'fd' %d" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "non riesco a trovare gruppi: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "non riesco ad aprire `%s' in scrittura: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "linea progr.:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "mando profilo a 'standard error'" +#: msg.c:120 +msgid "warning: " +msgstr "attenzione: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "errore interno: 'Node_var' con 'vname' nullo" +#: msg.c:142 +msgid "error: " +msgstr "errore: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "errore interno: 'Node_var_array' con 'vname' nullo" +#: msg.c:178 +msgid "fatal: " +msgstr "fatale: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"funzione `%s' chiamata con spazio tra il nome e `(',\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "non riesco a convertire stringa a valore in virgola mobile" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "o usata nel contesto di altra espressione" +#: node.c:357 +msgid "backslash at end of string" +msgstr "'\\' a fine stringa" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "tentativo di usare vettore `%s' in un contesto scalare" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX non permette formato `\\x'" + +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "niente cifre esadecimanli nel formato `\\x'" -#: profile.c:637 eval.c:1047 +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tipo non ammesso (%s) in 'tree_eval'" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr " sequenza in formato `\\%c' considerata come semplice `%c'" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "tentativo di usare funzione `%s' come vettore" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl: %s)" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "`%s' è una funzione, assegnamento non permesso" +msgid "could not open `%s' for writing: %s" +msgstr "non riesco ad aprire `%s' in scrittura: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "assegnamento non permesso al risultato di una funzione interna" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "errore interno: 'Node_var' con 'vname' nullo" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "# gestito internamente come 'delete' (cancellazione)" -#: profile.c:1108 +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "errore interno: 'Node_var_array' con 'vname' nullo" + +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# profilo gawk, creato %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -809,7 +1641,7 @@ "\t# blocco(hi) BEGIN\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -817,7 +1649,7 @@ "\t# Regola(e)\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -825,7 +1657,7 @@ "\t# blocco(hi) END\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -833,917 +1665,86 @@ "\n" "\t# Funzioni, listate in ordine alfabetico\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "tipo non previsto %s in 'prec_level'" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" +"fallita ricerca di 'espressione regolare', non c'è memoria sufficiente a " +"ricercare la stringa \"%.*s%s\"" + +#: regcomp.c:136 msgid "Success" msgstr "Successo" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "Nessuna corrispondenza" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Espressione regolare invalida" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "Carattere di ordinamento non valido" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Nome di 'classe di caratteri' invalido" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "'\\' finale" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Riferimento indietro invalido" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "[ or [^ non chiusa" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "( or \\( non chiusa" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "\\{ non chiusa" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Contenuto di \\{\\} invalido" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Fine di intervallo invalido" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Memoria esaurita" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Espressione regolare precedente invalida" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Fine di expressione regolare inaspettata" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "Espressione regolare troppo complessa" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr ") or \\) non aperta" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "Nessuna espressione regolare precedente" - -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "blocchi BEGIN richiedono una 'azione'" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "blocchi END richiedono una 'azione'" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' è una funzione interna, non si può ridefinire" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "istruzione che può non aver alcun effetto" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "`next' usato in 'azione' BEGIN o END" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' è un'estensione gawk" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "`nextfile' usato in 'azione' BEGIN o END" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "`return' usato fuori da una funzione" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "`print' da solo in BEGIN o END dovrebbe forse essere `print \"\"'" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' è un'estensione gawk" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "'pipelines' multistadio bidirezionali non funzionano" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "espressione regolare usata per assegnare un valore" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "`getline' non re-diretta indefinita dentro 'azione' END" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "espressione regolare prima di operatore `~' o `!~'" - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "costante 'regexp' `/%s/' sembra un commento commento C, ma non lo è" - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "espressione regolare a destra in un confronto" - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "`getline' non re-diretta indefinita dentro 'azione' BEGIN o END" - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "chiamata a `length' senza parentesi non portabile" - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "chiamata a `length' senza parentesi sconsigliata da POSIX" - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "espressione indice invalida" - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "puntatore a funzione %x non in tabella\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "carattere 'a capo' inaspettato" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "programma nullo sulla linea comandi" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "non riesco ad aprire file sorgente `%s' in lettura (%s)" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "non riesco a leggere file sorgente `%s' (%s)" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "file sorgente `%s' vuoto" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "file sorgente non termina con carattere 'a capo'" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "espressione regolare non completata termina con `\\' a fine file" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "espressione regolare non completata" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "espressione regolare non completata a fine file" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "uso di `\\ #...' continuazione linea non portabile" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "'\\' non è l'ultimo carattere della linea" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX non permette l'operatore `**='" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "il vecchio awk non supporta l'operatore `**='" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX non permette l'operatore `**'" - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "il vecchio awk non supporta l'operatore `**'" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "l'operatore `^=' non è supportato nel vecchio awk" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "l'operatore `^' non è supportato nel vecchio awk" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "stringa non terminata" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "carattere '%c' invalido in un'espressione" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' è un'estensione gawk" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' è un'estensione Bell Labs" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX non permette `%s'" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' non è supportato nel vecchio awk" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "`goto' considerato pericoloso!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d invalido come numero di argomenti per %s" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: il terzo argomento è un'estensione gawk" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: una stringa come ultimo argomento di 'substitute' non ha effetto" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "il terzo parametro di 'sub' non è un oggetto modificabile" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "il terzo parametro di 'gsub' non è un oggetto modificabile" - -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: il secondo argomento è un'estensione gawk" - -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"uso scorretto di dcgettext(_\"...\"): togliere il carattere '_' iniziale" - -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"uso scorretto di dcngettext(_\"...\"): togliere il carattere '_' iniziale" - -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funzione `%s': parametro #%d, `%s', duplica parametro #%d" - -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "funzione `%s': parametro `%s' nasconde variabile globale" - -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "non riesco ad aprire `%s' in scrittura (%s)" - -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: 'close' fallita (%s)" - -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() chiamata due volte!" - -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "funzione `%s': non posso usare nome della funzione come nome parametro" - -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "funzione di nome `%s' definita in precedenza" - -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "funzione `%s' chiamata ma mai definita" - -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "funzione `%s' definita ma mai chiamata" - -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "" -"espressione regolare di valore costante per parametro #%d genera valore " -"booleano" - -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "[ sbilanciata" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "Escape \\ non terminato" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "contatore di ripetizioni potenzialmente infinito" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "contatore di ripetizioni non valido" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "( sbilanciata" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "Nessun'espressione regolare di bits sintattici specificata" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr ") sbilanciata" - -#: dfa.c:3014 -msgid "out of memory" -msgstr "non c'è più memoria" - -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: il secondo argomento non è un vettore" - -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: la stringa nulla come terzo arg. è un'estensione gawk" - -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' è un'estensione gawk" - -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "campo %d in FIELDWIDTHS, deve essere > 0" - -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "la stringa nulla usata come `FS' è un'estensione gawk" - -#: msg.c:57 -msgid "cmd. line:" -msgstr "linea progr.:" - -#: msg.c:123 -msgid "warning: " -msgstr "attenzione: " - -#: msg.c:145 -msgid "error: " -msgstr "errore: " - -#: msg.c:178 -msgid "fatal: " -msgstr "fatale: " - -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "tipo nodo sconosciuto %d" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "superament limiti buffer in 'genflags2str'" - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "" -"ciclo for: vettore `%s' ha cambiato dimensione da %d a %d durante " -"l'esecuzione del ciclo" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "`break' all'esterno di un ciclo non è portabile" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "`break' all'esterno di un ciclo non è consentito" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "`continue' all'esterno di un ciclo non è portabile" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "`continue' all'esterno di un ciclo non è consentito" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' non può essere chiamato da una regola BEGIN" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "`next' non può essere chiamato da una regola END" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' non può essere chiamato da una regola BEGIN" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' non può essere chiamato da una regola END" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "istruzione che non fa nulla" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referenza a variabile non inizializzata `%s'" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "non posso usare nome di funzione `%s' come variabile o vettore" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referenza ad argomento non inizializzato `%s'" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "assegnamento usato nel contesto di un test condizionale" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenatione: effetti secondari in una espressione hanno modificato la " -"lunghezza di un'altra espressione!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "tentativo di dividere per zero" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "divisione per zero tentata in `%%'" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "divisione per zero tentata in `/='" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "divisione per zero tentata in `%%='" - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (da %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funzione `%s' chiamata con più argomenti di quelli previsti" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "funzione `%s' non definita" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "funzione %s chiamata\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# 'Stack' (Pila) Chiamate Funzione:\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- principale --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "tentativo di referenziare campo da valore non numerico" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "tentativo to referenziare da stringa nulla" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "tentativo di accedere al campo %d" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "tentativo di unare il parametro scalare `%s' come un vettore" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' è un'estensione gawk" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' è un'estensione gawk" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "specificazione invalida `%sFMT' `%s'" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "disabilito `--lint' a causa di assegnamento a `LINT'" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "NF impostato a un valore negativo" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "non riesco ad aprire file `%s' in lettura (%s)" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "chiusura di fd %d (`%s') fallita (%s)" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "tipo di albero invalido %s in redirect()" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "espressione nella re-direzione `%s' ha solo un valore numerico" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "espressione nella re-direzione `%s' ha per valore la stringa nulla" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"nome file `%s' per la re-direzione `%s' può essere il risultato di una " -"espressione logica" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "mistura non necessaria di `>' e `>>' per il file `%.*s'" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "non posso aprire 'pipe' `%s' in scrittura (%s)" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "non posso aprire 'pipe' `%s' in lettura (%s)" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "" -"non posso aprire 'socket' bidirezionale `%s' per lettura/scrittura (%s)" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "non posso aprire 'pipe' bidirezionale `%s' per lettura/scrittura (%s)" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "non posso re-dirigere da `%s' (%s)" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "non posso re-dirigere a `%s' (%s)" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"numero massimo consentito di file aperti raggiunto: comincio a riutilizzare " -"i descrittori di file" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "chiusura di `%s' fallita (%s)." - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "troppe 'pipe' o file di input aperti" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: il secondo argomento deve essere `a' o `da'" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: `%.*s' non è un file aperto, una 'pipe' o un co-processo" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "chiusura di una re-direzione mai aperta" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "close: re-direzione `%s' non aperta con `|&', ignoro secondo argomento" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "errore ritornato (%d) dalla chiusura della 'pipe' `%s' (%s)" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "errore ritornato (%d) dalla chiusura del file `%s' (%s)" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "nessuna chiusura esplicita richiesta per 'socket' `%s'" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "nessuna chiusura esplicita richiesta per co-processo `%s'" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "nessuna chiusura esplicita richiesta per 'pipe' `%s'" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "nessuna chiusura esplicita richiesta per file `%s'" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "errore scrivendo 'standard output' (%s)" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "errore scrivendo 'standard error' (%s)" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "scaricamento di 'pipe' `%s' fallita (%s)." - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "scaricamento da co-processo di 'pipe' a `%s' fallita (%s)." - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "scaricamento di file `%s' fallita (%s)." - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "spiacente, 'client' /inet/raw non ancora pronto" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "solo root può usare `/inet/raw'." - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "spiacente, 'server' /inet/raw non ancora pronto" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "nessuno protocollo (conosciuto) specificato nel filename speciale `%s'" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "nome file speciale `%s' incompleto" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "porta locale invalida in `%s'" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "va fornito nome di 'host' remoto a `/inet'" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "va fornita porta remota a `/inet'" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "porta remota invalida in `%s'" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "comunicazioni TCP/IP non supportate" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "file `%s' è una 'directory'" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "usa `PROCINFO[\"%s\"]' invece che `%s'" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "usa `PROCINFO[...]' invece che `/dev/user'" - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "non riesco ad aprire `%s', modo `%s'" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "fallito passaggio di 'pipe' a 'stdout' nel processo-figlio (dup: %s)" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "fallito passaggio di pipe a 'stdin' nel processo-figlio (dup: %s)" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "fallito ripristino di 'stdout' nel processo-padre\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "fallito ripristino di 'stdin' nel processo-padre\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "fallita chiusura di 'stdout' nel processo-figlio (%s)" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "fallita chiusura di 'stdin' nel processo-figlio (%s)" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "fallita chiusura di 'pipe' (%s)" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "`|&' non supportato" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "non riesco ad aprire 'pipe' `%s' (%s)" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "non riesco a creare processo-figlio per `%s' (fork: %s)" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "file dati `%s' vuoto" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "errore interno: file `%s', linea %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "errore leggendo file di input `%s': %s" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "valore multicarattere per `RS' è un'estensione gawk" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "non riesco a convertire stringa a valore in virgola mobile" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "'\\' a fine stringa" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX non permette formato `\\x'" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "niente cifre esadecimanli nel formato `\\x'" - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr " sequenza in formato `\\%c' considerata come semplice `%c'" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"fallita ricerca di 'espressione regolare', non c'è memoria sufficiente a " -"ricercare la stringa \"%.*s%s\"" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': non riesco a impostare 'close-on-exec': (fcntl: %s)" diff -urN gawk-3.1.1/po/sv.po gawk-3.1.2/po/sv.po --- gawk-3.1.1/po/sv.po 2002-05-01 16:40:59.000000000 +0300 +++ gawk-3.1.2/po/sv.po 2003-03-19 14:25:12.000000000 +0200 @@ -1,435 +1,935 @@ # Swedish translation of gawk -# Copyright (C) 2001 Free Software Foundation, Inc. -# Martin Sjögren , 2001. +# Copyright (C) 2003 Free Software Foundation, Inc. +# Martin Sjögren , 2001-2002. # -# $Id: sv.po,v 1.18 2002/01/14 09:09:22 martin Exp $ +# $Id: sv.po,v 1.23 2003/02/27 18:54:30 martin Exp $ # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.31\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" -"PO-Revision-Date: 2002-01-14 10:09+0100\n" +"Project-Id-Version: gawk 3.1.1m\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" +"PO-Revision-Date: 2003-02-27 19:54+0100\n" "Last-Translator: Martin Sjögren \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "försök att använda skalären \"%s\" som vektor" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "referens till ickeinitierat element \"%s[\"%s\"]\"" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "index i vektorn \"%s\" är en tom sträng" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "delete: otillåten användning av variabeln \"%s\" som vektor" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: index \"%s\" finns inte i vektorn \"%s\"" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "delete: otillåten användning av variabeln \"%s\" som vektor" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: tom (null)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: tom (noll)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tabellstorlek = %d, vektorstorlek = %d\n" -#: array.c:612 -#, fuzzy, c-format +#: array.c:671 +#, c-format msgid "%s: is parameter\n" msgstr "%s: är en parameter\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: vektorreferens till %s\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: första argumentet är inte en vektor" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: andra argumentet är inte en vektor" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "%s-block måste ha en åtgärdsdel" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "varje regel måste ha ett mönster eller en åtgärdsdel" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "\"%s\" är en inbyggd funktion, den kan inte definieras om" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "kommandot kanske inte har någon effekt" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "\"%s\" använd i %s-åtgärden" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "\"nextfile\" är en gawk-utökning" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "\"return\" använd utanför funktion" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "" +"ensamt \"print\" i BEGIN eller END-regel bör troligen vara 'print \"\"'" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "\"delete array\" är en gawk-utökning" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "\"delete(array)\" är en icke portabel tawk-utökning" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "flerstegs dubbelriktade rör fungerar inte" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "reguljärt uttryck i högerledet av en tilldelning" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "reguljärt uttryck i högerledet av en jämförelse" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "anrop av \"length\" utan parenteser är inte portabelt" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "ogiltig indexuttryck" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "oväntat nyradstecken eller slut på strängen" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "tom programtext på kommandoraden" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "kan inte läsa källfilen \"%s\" (%s)" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "källfilen \"%s\" är tom" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "källfilen slutar inte med en ny rad" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "oavslutat reguljärt uttryck" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "oavslutat reguljärt uttryck i slutet av filen" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "sista tecknet på raden är inte ett omvänt snedstreck" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "POSIX tillåter inte operatorn \"**=\"" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "gamla awk stöder inte operatorn \"**=\"" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "POSIX tillåter inte operatorn \"**\"" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "gamla awk stöder inte operatorn \"**\"" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "operatorn \"^=\" stöds inte i gamla awk" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "operatorn \"^\" stöds inte i gamla awk" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "oavslutad sträng" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "ogiltigt tecken \"%c\" i uttryck" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "\"%s\" är en gawk-utökning" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "\"%s\" är en Bell Labs-utökning" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "POSIX tillåter inte \"%s\"" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "\"%s\" stöds inte i gamla awk" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "\"goto\" anses skadlig!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d är ett ogiltigt antal argument för %s" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: tredje argumentet är en gawk-utökning" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "" +"%s: bokstavlig sträng som sista argument till ersättning har ingen effekt" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "%s: tredje argumentet är inte ett ändringsbart objekt" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: andra argumentet är en gawk-utökning" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " +"understrykningstecknet" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "" +"användandet av dcngettext(_\"...\") är felaktigt: ta bort det inledande " +"understrykningstecknet" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "kunde inte öpnna \"%s\" för skrivning (%s)" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "skickar profilen till standard fel" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: misslyckades att stänga (%s)" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "shadow_funcs() anropad två gånger!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "det fanns överskuggade variabler." + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "funktionen \"%s\" anropad men aldrig definierad" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "funktionen \"%s\" definierad men aldrig anropad" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "konstant reguljärt uttryck för parameter %d ger ett booleskt värde" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" +"%s" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "eller använd som variabel eller vektor" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s till \"%s\" misslyckades (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "standard ut" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "okänd anledning" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: fick ett ickenumeriskt argument" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: argumentet %g är inte inom tillåten gräns" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kan inte spola: röret \"%s\" öppnat för läsning, inte skrivning" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: kan inte spola: filen \"%s\" öppnad för läsning, inte skrivning" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: \"%s\" är inte en öppen fil, rör eller koprocess" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: första argumentet är inte en sträng" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: andra argumentet är inte en sträng" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: fick ett ickenumeriskt argument" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: fick ett argument som inte är en sträng" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: fick ett ickenumeriskt argument" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: fick ett negativt argumentet %g" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" -msgstr "" +msgstr "måste använda \"count$\" på alla eller inga format" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "\"$\" tillåts inte i awkformat" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "argumentantalet med \"$\" måste vara > 0" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" -msgstr "argumentantalet %d är större än antalet givna argument" +msgid "arg count %ld greater than total number of supplied arguments" +msgstr "argumentantalet %ld är större än antalet givna argument" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "\"$\" tillåts inte efter en punkt i formatet" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "inget \"$\" bifogat för positionsangiven fältbredd eller precision" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "\"l\" är meningslös i awk-format, ignorerad" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "\"l\" tillåts inte i POSIX awk-format" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "\"L\" är meningslös i awk-format, ignorerad" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "\"L\" tillåts inte i POSIX awk-format" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "\"h\" är meningslös i awk-format, ignorerad" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "\"h\" tillåts inte i POSIX awk-format" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "för få argument för formatsträngen" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "^ tog slut här" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: formatspecifieraren har ingen kommandobokstav" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "för många argument för formatsträngen" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: inga argument" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: fick ickenumeriskt argument" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: anropad med negativt argument %g" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: startindex %g är ogiltigt, använder 1" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "substr: startindex %g som inte är ett heltal kommer trunkeras" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: längden %g är <= 0" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "substr: längden %g är < 0" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: längden %g som inte är ett heltal kommer trunkeras" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "substr: längden %g är för stor för strängindexering, trunkeras till %g" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: källsträngen är tom" -#: builtin.c:1221 +#: builtin.c:1263 +#, c-format +msgid "substr: start index %g is past end of string" +msgstr "substr: startindex %g är bortom strängens slut" + +#: builtin.c:1271 #, c-format msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +"substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -"substr: längden %d vid startindex %d överskrider längden av första " -"argumentet (%d)" - -#: builtin.c:1227 -#, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: startindex %d är bortom slutet på strängen" +"substr: längden %g vid startindex %g överskrider det första argumentets " +"längd (%lu)" -#: builtin.c:1263 -#, fuzzy +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: fick ett första argument som inte är en sträng" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: fick en tom formatsträng" -#: builtin.c:1278 -#, fuzzy +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "strftime: fick ett ickenumeriskt andra argument" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: fick ett argument som inte är en sträng" -#: builtin.c:1386 -#, fuzzy +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: fick ett argument som inte är en sträng" -#: builtin.c:1512 -#, fuzzy +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: fick ett argument som inte är en sträng" -#: builtin.c:1561 -#, fuzzy +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: fick ett argument som inte är en sträng" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: fick ett ickenumeriskt första argument" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: fick ett ickenumeriskt andra argument" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: fick ett ickenumeriskt argument" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: fick ett ickenumeriskt argument" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: fick ett ickenumeriskt argument" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: tredje argumentet är inte en vektor" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: Nollan i tredje argumentet behandlad som en etta" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: fick ett ickenumeriskt första argument" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: fick ett ickenumeriskt första argument" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): för stora skiftvärden kommer ge konstiga resultat" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: fick ett ickenumeriskt första argument" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: fick ett ickenumeriskt första argument" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: fick ett ickenumeriskt första argument" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: fick ett ickenumeriskt argument" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negativa värden kommer ge konstiga resultat" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): flyttalsvärden kommer trunkeras" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: \"%s\" är inte en giltig lokalkategori" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" -msgstr "\"extension\" är en gawk-utökning" - -#: ext.c:74 +#: eval.c:262 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: kan inte öppna \"%s\" (%s)\n" +msgid "unknown nodetype %d" +msgstr "okänd nodtyp %d" + +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "buffertöverflöd i genflags2str" + +#: eval.c:555 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"forslinga: vektorn \"%s\" ändrade storlek från %ld till %ld under " +"slingexekvering" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "\"break\" utanför en slinga är inte portabelt" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "\"break\" utanför en slinga är inte tillåtet" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "\"continue\" utanför en slinga är inte portabelt" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "\"continue\" utanför en slinga är inte tillåtet" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "\"next\" kan inte anropas från en BEGIN-regel" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "\"next\" kan inte anropas från en END-regel" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "\"nextfile\" kan inte anropas från en END-regel" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "kommandot har ingen effekt" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "referens till icke initierad variabel \"%s\"" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "referens till icke initierat argument \"%s\"" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"concatenation: sidoeffekter i ett uttryck har ändrat längden av ett annat!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "tilldelning använt i jämförelsesammanhang" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "försökte dividera med noll" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "försökte dividera med noll i \"%%\"" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "otillåten typ (%s) i tree_eval" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "försökte dividera med noll i \"/=\"" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "försökte dividera med noll i \"%%=\"" + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (från %s)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "funktionen \"%s\" är inte definierad" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "funktionen %s anropad\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Funktionsanropsstack:\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- main --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "försök att fältreferera från ickenumeriskt värde" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "försök att referera från tom sträng" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "försök att komma åt fält nummer %d" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "försök att använda skalärparametern \"%s\" som en vektor" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "det är inte tillåtet att tilldela resultatet från en inbyggd funktion" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "\"IGNORECASE\" är en gawk-utökning" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "\"BINMODE\" är en gawk-utökning" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" + +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" +msgstr "\"extension\" är en gawk-utökning" + +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" +msgstr "extension: kan inte öppna \"%s\" (%s)\n" #: ext.c:82 #, c-format msgid "extension: library `%s': cannot call function `%s' (%s)\n" msgstr "extension: bibliotek \"%s\": kan inte anropa funktionen \"%s\" (%s)\n" -#: ext.c:180 +#: ext.c:181 msgid "Operation Not Supported" msgstr "Operationen stöds inte" +#: field.c:321 +msgid "NF set to negative value" +msgstr "NF satt till ett negativt värde" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: andra argumentet är inte en vektor" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: tom sträng som tredje argument är en gawk-utökning" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "\"FIELDWIDTHS\" är en gawk-utökning" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "fält %d i FIELDWIDTHS måste vara > 0" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "tom sträng som \"FS\" är en gawk-utökning" + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -470,7 +970,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: ogiltig flagga -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: flaggan kräver ett argument -- %c\n" @@ -485,188 +985,503 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: flaggan \"-W %s\" tillåter inte något argument\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "kan inte öppna filen \"%s\" för läsning (%s)" -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m-flaggans användning: \"-m[fr] nnn\"" +#: io.c:344 +#, c-format +msgid "close of fd %d (`%s') failed (%s)" +msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" -#: main.c:326 +#: io.c:482 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n" +msgid "invalid tree type %s in redirect()" +msgstr "ogiltig trädtyp %s i redirect()" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "tomt argument till \"--source\" ignorerat" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "uttrycket för \"%s\"-omdirigering har en tom sträng som värde" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "\"--posix\" åsidosätter \"--traditional\"" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" +msgstr "" +"filnamnet \"%s\" för \"%s\"-omdirigering kan vara resultatet av ett logiskt " +"uttryck" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" -msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" +#: io.c:521 +#, c-format +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" -#: main.c:449 -#, fuzzy, c-format -msgid "running %s setuid root may be a security problem" -msgstr "att köra av %s setuid root kan vara ett säkerhetsproblem" +#: io.c:573 +#, c-format +msgid "can't open pipe `%s' for output (%s)" +msgstr "kan inte öppna röret \"%s\" för utmatning (%s)" -#: main.c:478 +#: io.c:582 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "kan inte sätta läge på standard in (%s)" +msgid "can't open pipe `%s' for input (%s)" +msgstr "kan inte öppna röret \"%s\" för inmatning (%s)" -#: main.c:481 +#: io.c:595 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "kan inte sätta läge på standard ut (%s)" +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "kan inte öppna tvåvägsuttaget \"%s\" för in-/utmatning (%s)" -#: main.c:483 +#: io.c:599 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "kan inte sätta läge på standard fel (%s)" +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "kan inte öppna tvåvägsröret \"%s\" för in-/utmatning (%s)" -#: main.c:512 -msgid "no program text at all!" -msgstr "ingen programtext alls!" +#: io.c:675 +#, c-format +msgid "can't redirect from `%s' (%s)" +msgstr "kan inte dirigera om från \"%s\" (%s)" -#: main.c:556 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgid "can't redirect to `%s' (%s)" +msgstr "kan inte dirigera om till \"%s\" (%s)" + +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" msgstr "" -"Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ...\n" +"nådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorer" -#: main.c:558 +#: io.c:729 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ...\n" - -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n" +msgid "close of `%s' failed (%s)." +msgstr "stängning av \"%s\" misslyckades (%s)" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr "\t-f progfil\t\t--file=progfil\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "för många rör eller indatafiler öppna" -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr "\t-F fs\t\t\t--field-separator=fs\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr "\t-v var=värde\t\t--assign=var=värde\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr "\t-m[fr] värde\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "stängning av omdirigering som aldrig öppnades" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr "\t-W compat\t\t--compat\n" +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet " +"ignorerat" -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "felstatus (%d) från rörstängning av \"%s\" (%s)" + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "felstatus (%d) från filstängning av \"%s\" (%s)" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "fel vid skrivning till standard ut (%s)" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "fel vid skrivning till standard fel (%s)" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "rörspolning av \"%s\" misslyckades (%s)" + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)" + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "filspolning av \"%s\" misslyckades (%s)" + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "/inet/raw-klient är tyvärr inte klar än" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "bara root kan använda \"/inet/raw\"." + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "/inet/raw-server inte redo än, ledsen" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "" +"inget (känt) protokoll tillhandahållet i det speciella filnamnet \"%s\"" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "speciellt filnamn \"%s\" är ofullständigt" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "lokal port ogiltig i \"%s\"" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "måste tillhandahålla en fjärrport till \"/inet\"" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "fjärrporten ogiltig i \"%s\"" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "TCP/IP-kommunikation stöds inte" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "filen \"%s\" är en katalog" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\"" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\"" + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "kunde inte öppna \"%s\", läge \"%s\"" + +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "stängning av huvudpty misslyckades (%s)" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "stängning av standard ut i barnet misslyckades (%s)" + +#: io.c:1708 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "flyttandet av slavpty till standard ut i barnet misslyckades (dup: %s)" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "stängning av standard in i barnet misslyckades (%s)" + +#: io.c:1713 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "flyttandet av slavpty till standard in i barnet misslyckades (dup: %s)" + +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "stängning av slavpty misslyckades (%s)" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "flyttande av rör till standard ut i barnet misslyckades (dup: %s)" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "flyttande av rör till standard in i barnet misslyckades (dup: %s)" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "återställande av standard ut i förälderprocessen misslyckades\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "återställande av standard in i förälderprocessen misslyckades\n" + +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "stängning av röret misslyckades (%s)" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "\"|&\" stöds inte" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "kan inte öppna röret \"%s\" (%s)" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "datafilen \"%s\" är tom" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "kunde inte allokera mer indataminne" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "fel vid läsning av indatafilen \"%s\": %s" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "\"-m[fr]\"-flaggan är irrelevant i gawk" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "-m-flaggans användning: \"-m[fr] nnn\"" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: flaggan \"-W %s\" okänd, ignorerad\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "tomt argument till \"--source\" ignorerat" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "miljövariabeln \"POSIXLY_CORRECT\" satt: slår på \"--posix\"" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "\"--posix\" åsidosätter \"--traditional\"" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "\"--posix\"/\"--traditional\" åsidosätter \"--non-decimal-data\"" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "att köra %s setuid root kan vara ett säkerhetsproblem" + +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "kan inte sätta binärläge på standard in (%s)" + +#: main.c:512 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "kan inte sätta binärläge på standard ut (%s)" + +#: main.c:514 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "kan inte sätta binärläge på standard fel (%s)" + +#: main.c:544 +msgid "no program text at all!" +msgstr "ingen programtext alls!" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"Användning: %s [POSIX- eller GNU-stilsflaggor] -f progfil [--] fil ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "Användning: %s [POSIX- eller GNU-stilsflaggor] %cprogram%c fil ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "POSIX-flaggor:\t\tGNU långa flaggor:\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr "\t-f progfil\t\t--file=progfil\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr "\t-F fs\t\t\t--field-separator=fs\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr "\t-v var=värde\t\t--assign=var=värde\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr "\t-m[fr] värde\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr "\t-W compat\t\t--compat\n" + +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" msgstr "\t-W copyleft\t\t--copyleft\n" -#: main.c:570 +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr "\t-W copyright\t\t--copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr "\t-W dump-variables[=fil]\t--dump-variables[=fil]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr "\t-W gen-po\t\t--gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr "\t-W help\t\t\t--help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr "\t-W lint[=fatal]\t\t--lint[=fatal]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr "\t-W lint-old\t\t--lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr "\t-W non-decimal-data\t--non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr "\t-W nostalgia\t\t--nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr "\t-W parsedebug\t\t--parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr "\t-W profile[=fil]\t--profile[=fil]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr "\t-W posix\t\t--posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr "\t-W re-interval\t\t--re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr "\t-W source=programtext\t--source=programtext\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr "\t-W traditional\t\t--traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr "\t-W usage\t\t--usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr "\t-W version\t\t--version\n" -#: main.c:593 -#, fuzzy +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" "section `Reporting Problems and Bugs' in the printed version.\n" "\n" msgstr "" -"sektionen \"Reporting Problems and Bugs\" i den utskrivna versionen.\n" +"\n" +"För att rapportera buggar, se noden \"Bugs\" i \"gawk.info\",\n" +"vilket är sektionen \"Reporting Problems and Bugs\" i den utskrivna\n" +"versionen.\n" "Rapportera synpunkter på översättningen till .\n" +"\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" "\n" msgstr "" +"gawk är ett mönsterskannande och -bearbetande språk.\n" +"Normalt läser det från standard in och skriver till standard ut.\n" +"\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" msgstr "" +"Exempel:\n" +"\tgawk '{ sum += $1 }; END { print sum }' fil\n" +"\tgawk -F: '{print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -685,7 +1500,7 @@ "någon senare version.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -699,7 +1514,7 @@ "General Public License för ytterligare information.\n" "\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -709,98 +1524,115 @@ "med detta program. Om inte, skriv till Free Software Foundation,\n" "Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "-Ft sätter inte FS till tab i POSIX-awk" -#: main.c:888 +#: main.c:944 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "ogiltig syntax i namnet \"%s\" för variabeltilldelning" +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "%s: Argumentet \"%s\" till \"-v\" är inte på formatet \"var=värde\"\n" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "\"%s\" är inte ett giltigt variabelnamn" + +#: main.c:967 +#, c-format +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "\"%s\" är inte ett variabelnamn, letar efter filen \"%s=%s\"" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "flyttalsundantag" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "ödesdigert fel: internt fel" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "ingen föröppnad fd %d" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "kunde inte föröppna /dev/null för fd %d" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "kunde inte hitta grupper: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "kunde inte öppna \"%s\" för skrivning: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "kommandorad:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "skickar profilen till standard fel" +#: msg.c:120 +msgid "warning: " +msgstr "varning: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "internt fel: Node_var med null vname" +#: msg.c:142 +msgid "error: " +msgstr "fel: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "internt fel: Node_var_vektor med null vname" +#: msg.c:178 +msgid "fatal: " +msgstr "ödesdigert: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"funktionen \"%s\" anropad med blanktecken mellan namnet och \"(\",\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "kan inte konvertera en sträng till flyttal" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "eller använt i andra uttryckssammanhang" +#: node.c:357 +msgid "backslash at end of string" +msgstr "omvänt snedstreck i slutet av strängen" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "försök att använda vektorn \"%s\" i skalärsammanhang" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser" -#: profile.c:637 eval.c:1047 +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser" + +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "otillåten typ (%s) i tree_eval" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\"" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "försök att använda funktionen \"%s\" som vektor" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s \"%s\": kunde inte sätta stäng-vid-exec (fcntl: %s)" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "\"%s\" är en funktion, tilldelning är inte tillåtet" +msgid "could not open `%s' for writing: %s" +msgstr "kunde inte öppna \"%s\" för skrivning: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "det är inte tillåtet att tilldela resultatet från en inbyggd funktion" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "internt fel: Node_var med null vname" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "# behandlad internt som \"delete\"" + +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "internt fel: Node_var_vektor med null vname" -#: profile.c:1108 +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawkprofil, skapad %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -808,7 +1640,7 @@ "\t# BEGIN-block\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -816,7 +1648,7 @@ "\t# Regel/regler\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -824,7 +1656,7 @@ "\t# END-block\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -832,926 +1664,148 @@ "\n" "\t# Funktioner, listade alfabetiskt\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "oväntad typ %s i prec_level" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" +"regexmatchning misslyckades, inte tillräckligt mycket minne för att matcha " +"\"%.*s%s\"" + +#: regcomp.c:136 msgid "Success" msgstr "Lyckades" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "Misslyckades" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Ogiltigt reguljärt uttryck" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "Ogiltigt kollationeringstecken" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Ogiltigt teckenklassnamn" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "Eftersläpande omvänt snedstreck" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Ogiltig bakåtrerefens" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "Obalanserad [ eller [^" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "Obalanserad ( eller \\(" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "Obalanserad \\{" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "Ogiltigt innehåll i \\{\\}" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Ogiltigt omfångsslut" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Minnet slut" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "Ogiltigt föregående reguljärt uttryck" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "För tidigt slut på reguljärt uttryck" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "Reguljärt uttryck för stort" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr "Obalanserad ) eller \\)" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "Inget föregående reguljärt uttryck" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "BEGIN-block måste ha en åtgärdsdel" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "END-block måste ha en åtgärdsdel" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "\"%s\" är en inbyggd funktion, den kan inte definieras om" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "kommandot kanske inte har någon effekt" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "\"next\" använd i BEGIN- eller END-åtgärd" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "\"nextfile\" är en gawk-utökning" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "\"nextfile\" använd i BEGIN- eller END-åtgärd" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "\"return\" använd utanför funktion" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "" -"ensamt \"print\" i BEGIN eller END-regel bör troligen vara 'print \"\"'" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "\"delete array\" är en gawk-utökning" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "flerstegs dubbelriktade rör fungerar inte" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "reguljärt uttryck i högerledet av en tilldelning" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "icke omdirigerad \"getline\" odefinierad inuti END-åtgärd" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "reguljärt uttryck på vänster sida om en \"~\"- eller \"!~\"-operator" - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "regexp-konstanten \"/%s/\" ser ut som en C-kommentar men är inte det" - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "reguljärt uttryck i högerledet av en jämförelse" - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "" -"icke omdirigerad \"getline\" odefinierade inuti BEGIN- eller END-åtgärd" - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "anrop av \"length\" utan parenteser är inte portabelt" - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "anrop av \"length\" utan parenteser är föråldrat enligt POSIX" - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "ogiltig indexuttryck" - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "fptr %x är inte i tokentab\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "oväntat nyradstecken" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "tom programtext på kommandoraden" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "kan inte öppna källfilen \"%s\" för läsning (%s)" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "kan inte läsa källfilen \"%s\" (%s)" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "källfilen \"%s\" är tom" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "källfilen slutar inte med en ny rad" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "oavslutat reguljärt uttryck slutar med \"\\\" i slutet av filen" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "oavslutat reguljärt uttryck" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "oavslutat reguljärt uttryck i slutet av filen" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "Användning av \"\\ #...\" för radfortsättning är inte portabelt" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "sista tecknet på raden är inte ett omvänt snedstreck" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "POSIX tillåter inte operatorn \"**=\"" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "gamla awk stöder inte operatorn \"**=\"" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "POSIX tillåter inte operatorn \"**\"" - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "gamla awk stöder inte operatorn \"**\"" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "operatorn \"^=\" stöds inte i gamla awk" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "operatorn \"^\" stöds inte i gamla awk" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "oavslutad sträng" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "ogiltigt tecken \"%c\" i uttryck" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "\"%s\" är en gawk-utökning" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "\"%s\" är en Bell Labs-utökning" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "POSIX tillåter inte \"%s\"" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "\"%s\" stöds inte i gamla awk" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "\"goto\" anses skadlig!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d är ett ogiltigt antal argument för %s" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: tredje argumentet är en gawk-utökning" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "" -"%s: bokstavlig sträng som sista argument till ersättning har ingen effekt" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "sub: tredje argumentet är inte ett ändringsbart objekt" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "gsub: tredje argumentet är inte ett ändringsbart objekt" - -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: andra argumentet är en gawk-utökning" - -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " -"understrykningstecknet" - -#: awkgram.y:2232 -#, fuzzy -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "" -"användandet av dcgettext(_\"...\") är felaktigt: ta bort det inledande " -"understrykningstecknet" - -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "funktionen \"%s\": parameter %d, \"%s\", är samma som parameter %d" - -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "funktionen \"%s\": parametern \"%s\" överskuggar en global variabel" - -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "kunde inte öpnna \"%s\" för skrivning (%s)" +#~ msgid "" +#~ "\n" +#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" +#~ msgstr "" +#~ "\n" +#~ "För att rapportera fel, se noden \"Bugs\" i \"gawk.info\" som är\n" -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: misslyckades att stänga (%s)" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "ogiltig syntax i namnet \"%s\" för variabeltilldelning" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() anropad två gånger!" +#~ msgid "or used in other expression context" +#~ msgstr "eller använt i andra uttryckssammanhang" -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "funktionen \"%s\": kan inte använda funktionsnamn som parameternamn" +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "försök att använda funktionen \"%s\" som vektor" -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "funktionsnamnet \"%s\" är definierat sedan tidigare" +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "\"%s\" är en funktion, tilldelning är inte tillåtet" -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "funktionen \"%s\" anropad men aldrig definierad" +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "BEGIN-block måste ha en åtgärdsdel" -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "funktionen \"%s\" definierad men aldrig anropad" +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "\"nextfile\" använd i BEGIN- eller END-åtgärd" -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "konstant reguljärt uttryck för parameter %d ger ett booleskt värde" +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "" +#~ "icke omdirigerad \"getline\" odefinierade inuti BEGIN- eller END-åtgärd" -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "Obalanserad [" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "Oavslutad \\-kontrollsekvens" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "oavslutat upprepningsantal" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "felaktigt utformat upprepningsantal" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "Obalanserad (" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "Inga syntaxbitar för reguljära uttryck angivna" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr "Obalanserad )" - -#: dfa.c:3014 -msgid "out of memory" -msgstr "slut på minne" +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "fptr %x är inte i tokentab\n" -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: andra argumentet är inte en vektor" +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "gsub: tredje argumentet är inte ett ändringsbart objekt" -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: tom sträng som tredje argument är en gawk-utökning" +#~ msgid "Unfinished \\ escape" +#~ msgstr "Oavslutad \\-kontrollsekvens" -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "\"FIELDWIDTHS\" är en gawk-utökning" +#~ msgid "unfinished repeat count" +#~ msgstr "oavslutat upprepningsantal" -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "fält %d i FIELDWIDTHS måste vara > 0" +#~ msgid "malformed repeat count" +#~ msgstr "felaktigt utformat upprepningsantal" -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "tom sträng som \"FS\" är en gawk-utökning" +#~ msgid "Unbalanced [" +#~ msgstr "Obalanserad [" -#: msg.c:57 -msgid "cmd. line:" -msgstr "kommandorad:" +#~ msgid "Unbalanced (" +#~ msgstr "Obalanserad (" -#: msg.c:123 -msgid "warning: " -msgstr "varning: " +#~ msgid "No regexp syntax bits specified" +#~ msgstr "Inga syntaxbitar för reguljära uttryck angivna" -#: msg.c:145 -msgid "error: " -msgstr "fel: " +#~ msgid "Unbalanced )" +#~ msgstr "Obalanserad )" -#: msg.c:178 -msgid "fatal: " -msgstr "ödesdigert: " +#~ msgid "out of memory" +#~ msgstr "slut på minne" -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "okänd nodtyp %d" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "buffertöverflöd i genflags2str" - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "" -"forslinga: vektorn \"%s\" ändrade storlek från %d till %d under " -"slingexekvering" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "\"break\" utanför en slinga är inte portabelt" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "\"break\" utanför en slinga är inte tillåtet" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "\"continue\" utanför en slinga är inte portabelt" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "\"continue\" utanför en slinga är inte tillåtet" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "\"next\" kan inte anropas från en BEGIN-regel" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "\"next\" kan inte anropas från en END-regel" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "\"nextfile\" kan inte anropas från en BEGIN-regel" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "\"nextfile\" kan inte anropas från en END-regel" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "kommandot har ingen effekt" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "referens till icke initierad variabel \"%s\"" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "kan inte använda funktionsnamnet \"%s\" som variabel eller vektor" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "referens till icke initierat argument \"%s\"" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "tilldelning använt i jämförelsesammanhang" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"concatenation: sidoeffekter i ett uttryck har ändrat längden av ett annat!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "försökte dividera med noll" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "försökte dividera med noll i \"%%\"" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "försökte dividera med noll i \"/=\"" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "försökte dividera med noll i \"%%=\"" - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (från %s)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "funktionen \"%s\" anropad med fler argument än vad som deklarerats" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "funktionen \"%s\" är inte definierad" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "funktionen %s anropad\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Funktionsanropsstack:\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "försök att fältreferera från ickenumeriskt värde" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "försök att referera från tom sträng" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "försök att komma åt fält nummer %d" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "försök att använda skalärparametern \"%s\" som en vektor" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "\"IGNORECASE\" är en gawk-utökning" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "\"BINMODE\" är en gawk-utökning" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "felaktig \"%sFMT\"-specifikation \"%s\"" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "slår av \"--lint\" på grund av en tilldelning till \"LINT\"" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "NF satt till ett negativt värde" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "kan inte öppna filen \"%s\" för läsning (%s)" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "stängning av fd %d (\"%s\") misslyckades (%s)" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "ogiltig trädtyp %s i redirect()" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "uttrycket i \"%s\"-omdirigering har bara numeriskt värde" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "uttrycket för \"%s\"-omdirigering har en tom sträng som värde" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"filnamnet \"%s\" för \"%s\"-omdirigering kan vara resultatet av ett logiskt " -"uttryck" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "onödig blandning av \">\" och \">>\" för filen \"%.*s\"" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "kan inte öppna röret \"%s\" för utmatning (%s)" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "kan inte öppna röret \"%s\" för inmatning (%s)" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "kan inte öppna tvåvägsuttaget \"%s\" för in-/utmatning (%s)" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "kan inte öppna tvåvägsröret \"%s\" för in-/utmatning (%s)" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "kan inte dirigera om från \"%s\" (%s)" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "kan inte dirigera om till \"%s\" (%s)" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"nådde systembegränsningen för öppna filer: börjar multiplexa fildeskriptorer" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "stängning av \"%s\" misslyckades (%s)" - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "för många rör eller indatafiler öppna" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: andra argumentet måste vara \"to\" eller \"from\"" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: \"%.*s\" är inte en öppen fil, rör eller koprocess" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "stängning av omdirigering som aldrig öppnades" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: omdirigeringen \"%s\" öppnades inte med \"|&\", andra argumentet " -"ignorerat" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "felstatus (%d) från rörstängning av \"%s\" (%s)" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "felstatus (%d) från filstängning av \"%s\" (%s)" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "ingen explicit stängning av uttaget \"%s\" tillhandahållen" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "ingen explicit stängning av koprocessen \"%s\" tillhandahållen" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "ingen explicit stängning av röret \"%s\" tillhandahållen" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "ingen explicit stängning av filen \"%s\" tillhandahållen" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "fel vid skrivning till standard ut (%s)" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "fel vid skrivning till standard fel (%s)" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "rörspolning av \"%s\" misslyckades (%s)" - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "koprocesspolning av röret till \"%s\" misslyckades (%s)" - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "filspolning av \"%s\" misslyckades (%s)" - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw-klient är tyvärr inte klar än" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "bara root kan använda \"/inet/raw\"." - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw-server inte redo än, ledsen" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "" -"inget (känt) protokoll tillhandahållet i det speciella filnamnet \"%s\"" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "speciellt filnamn \"%s\" är ofullständigt" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "lokal port ogiltig i \"%s\"" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "måste tillhandahålla ett fjärrdatornamn till \"/inet\"" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "måste tillhandahålla en fjärrport till \"/inet\"" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "fjärrporten ogiltig i \"%s\"" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP-kommunikation stöds inte" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "filen \"%s\" är en katalog" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "använd \"PROCINFO[\"%s\"]\" istället för \"%s\"" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "använd \"PROCINFO[...]\" istället för \"dev/user\"" - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "kunde inte öppna \"%s\", läge \"%s\"" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "flyttande av rör till standard ut i barnet misslyckades (dup: %s)" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "flyttande av rör till standard in i barnet misslyckades (dup: %s)" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "återställande av standard ut i förälderprocessen misslyckades\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "återställande av standard in i förälderprocessen misslyckades\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "stängning av standard ut i barnet misslyckades (%s)" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "stängning av standard in i barnet misslyckades (%s)" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "stängning av röret misslyckades (%s)" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "\"|&\" stöds inte" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "kan inte öppna röret \"%s\" (%s)" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "kan inte skapa barnprocess för \"%s\" (fork: %s)" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "datafilen \"%s\" är tom" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "internt fel: filen \"%s\", rad %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "fel vid läsning av indatafilen \"%s\": %s" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "flerteckensvärdet av \"RS\" är en gawk-utökning" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "kan inte konvertera en sträng till flyttal" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "omvänt snedstreck i slutet av strängen" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX tillåter inte \"\\x\"-kontrollsekvenser" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "inga hexadecimala siffror i \"\\x\"-kontrollsekvenser" - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "kontrollsekvensen \"\\%c\" behandlad som bara \"%c\"" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s \"%s\": kunde inte sätta stäng-vid-exec (fcntl: %s)" - -#~ msgid "" -#~ "\n" -#~ "To report bugs, see node `Bugs' in `gawk.info', which is\n" -#~ msgstr "" -#~ "\n" -#~ "För att rapportera fel, se noden \"Bugs\" i \"gawk.info\" som är\n" +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "internt fel: filen \"%s\", rad %d\n" diff -urN gawk-3.1.1/po/tr.po gawk-3.1.2/po/tr.po --- gawk-3.1.1/po/tr.po 2002-05-01 16:41:00.000000000 +0300 +++ gawk-3.1.2/po/tr.po 2003-03-19 14:25:12.000000000 +0200 @@ -1,434 +1,932 @@ # Turkish translations for GNU awk messages -# Copyright (C) 2002 Free Software Foundation, Inc. -# Nilgün Belma Bugüner , 2001, 2002. +# Copyright (C) 2003 Free Software Foundation, Inc. +# Nilgün Belma Bugüner , 2001, 2002, 2003. # msgid "" msgstr "" -"Project-Id-Version: gawk 3.1.1a\n" -"POT-Creation-Date: 2002-05-01 16:40+0300\n" -"PO-Revision-Date: 2002-04-29 18:03+0300\n" -"Last-Translator: Nilgün Belma Bugüner \n" +"Project-Id-Version: gawk 3.1.1k\n" +"POT-Creation-Date: 2003-03-19 14:25+0200\n" +"PO-Revision-Date: 2003-02-04 18:55+0200\n" +"Last-Translator: Nilgün Belma Bugüner \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.6\n" -# ÖNEMLÄ°: Türkçe iletileri elde edebilmek için 3.1.0 sürümünde -# paketi yapılandırırken --with-included-gettext seçeneÄŸi -# kullanılmalıdır.(GNU-TR - 07.07.2001) -#: array.c:243 array.c:275 array.c:280 eval.c:483 +#: array.c:274 array.c:309 array.c:314 eval.c:494 #, c-format msgid "attempt to use scalar `%s' as array" msgstr "sayısal `%s' dizi olarak kullanılmaya çalışılıyor" -#: array.c:304 +#: array.c:338 #, c-format msgid "reference to uninitialized element `%s[\"%s\"]'" msgstr "ön deÄŸer atanmamış öğeye ( %s[\"%s\"] ) baÅŸvuru yapılıyor" -#: array.c:310 +#: array.c:344 #, c-format msgid "subscript of array `%s' is null string" msgstr "dizinin indisi `%s' bir null dizge" -#: array.c:373 array.c:456 -#, c-format -msgid "delete: illegal use of variable `%s' as array" -msgstr "delete: `%s' deÄŸiÅŸkeninin dizi olarak kullanımı kuraldışı" - -#: array.c:406 +#: array.c:412 array.c:425 array.c:466 #, c-format msgid "delete: index `%s' not in array `%s'" msgstr "delete: `%s' indeksi `%s' dizisinde deÄŸil" -#: array.c:571 +#: array.c:432 array.c:515 +#, c-format +msgid "delete: illegal use of variable `%s' as array" +msgstr "delete: `%s' deÄŸiÅŸkeninin dizi olarak kullanımı kuraldışı" + +#: array.c:633 #, c-format msgid "%s: empty (null)\n" msgstr "%s: boÅŸ (null)\n" -#: array.c:576 +#: array.c:638 #, c-format msgid "%s: empty (zero)\n" msgstr "%s: boÅŸ (sıfır)\n" -#: array.c:580 +#: array.c:642 #, c-format msgid "%s: table_size = %d, array_size = %d\n" msgstr "%s: tablo_uzunluÄŸu = %d, dizi_indisi = %d\n" -#: array.c:612 +#: array.c:671 #, c-format msgid "%s: is parameter\n" msgstr "%s: parametredir\n" -#: array.c:617 +#: array.c:676 #, c-format msgid "%s: array_ref to %s\n" msgstr "%s: %s için dizi baÅŸvurusu\n" -#: array.c:844 +#: array.c:975 msgid "asort: first argument is not an array" msgstr "asort: ilk argüman bir dizi deÄŸil" -#: array.c:853 +#: array.c:984 msgid "asort: second argument is not an array" msgstr "asort: ikinci argüman bir dizi deÄŸil" -#: builtin.c:107 +#: awkgram.y:208 +#, c-format +msgid "%s blocks must have an action part" +msgstr "%s blokları bir eylem bölümü içermeli" + +#: awkgram.y:211 +msgid "each rule must have a pattern or an action part" +msgstr "her kural bir eylem bölümü veya bir kalıp içermeli" + +#: awkgram.y:267 +#, c-format +msgid "`%s' is a built-in function, it cannot be redefined" +msgstr "`%s' bir yerleÅŸik iÅŸlevdir, yeniden atanamaz" + +#: awkgram.y:314 +#, c-format +msgid "regexp constant `/%s/' looks like a C comment, but is not" +msgstr "düzenli ifade sabiti `/%s/' bir C açıklaması gibi görünüyor ama deÄŸil" + +#: awkgram.y:340 +msgid "statement may have no effect" +msgstr "deyim bir etkiye sahip olmayabilir" + +#: awkgram.y:431 awkgram.y:451 +#, c-format +msgid "`%s' used in %s action" +msgstr "`%s' %s eyleminde kullanılmış" + +#: awkgram.y:444 awkgram.y:447 +msgid "`nextfile' is a gawk extension" +msgstr "`nextfile' bir gawk uzantısıdır" + +#: awkgram.y:461 +msgid "`return' used outside function context" +msgstr "`return' iÅŸlev baÄŸlamının dışında kullanılmış" + +#: awkgram.y:500 +msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" +msgstr "BEGIN veya END kuralındaki `print' aslında `print \"\"' olmalıydı" + +#: awkgram.y:513 awkgram.y:520 +msgid "`delete array' is a gawk extension" +msgstr "`delete array' bir gawk uzantısıdır" + +#: awkgram.y:528 awkgram.y:535 +msgid "`delete(array)' is a non-portable tawk extension" +msgstr "`delete array' uyarlanabilir olmayan bir gawk uzantısıdır" + +#: awkgram.y:578 +msgid "multistage two-way pipelines don't work" +msgstr "çok katlı iki yönlü veriyolları çalışmaz" + +#: awkgram.y:669 +msgid "regular expression on right of assignment" +msgstr "düzenli ifade atamanın sağında" + +#: awkgram.y:679 +msgid "regular expression on left of `~' or `!~' operator" +msgstr "düzenli ifade `~' ya da `!~' iÅŸlemiminin solunda" + +#: awkgram.y:687 +msgid "regular expression on right of comparison" +msgstr "düzenli ifade karşılaÅŸtırmanın sağında" + +#: awkgram.y:754 +msgid "non-redirected `getline' undefined inside END action" +msgstr "END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" + +#: awkgram.y:781 +msgid "call of `length' without parentheses is not portable" +msgstr "parantezsiz `length' çaÄŸrısı taşınabilir deÄŸil" + +#: awkgram.y:784 +msgid "call of `length' without parentheses is deprecated by POSIX" +msgstr "parantezsiz `length' çaÄŸrısı POSIX'e uygun deÄŸil" + +#: awkgram.y:835 +msgid "invalid subscript expression" +msgstr "indis ifadesi geçersiz" + +#: awkgram.y:1020 +msgid "unexpected newline or end of string" +msgstr "beklenmeyen satırsonu ya da dizge sonu" + +#: awkgram.y:1115 +msgid "empty program text on command line" +msgstr "komut satırında boÅŸ program metni" + +#: awkgram.y:1172 +#, c-format +msgid "can't open source file `%s' for reading (%s)" +msgstr "kaynak dosyası `%s' okumak için açılamıyor (%s)" + +#: awkgram.y:1207 +#, c-format +msgid "can't read sourcefile `%s' (%s)" +msgstr "kaynak dosyası `%s' okunamıyor (%s)" + +#: awkgram.y:1215 +#, c-format +msgid "source file `%s' is empty" +msgstr "kaynak dosyası `%s' boÅŸ" + +#: awkgram.y:1417 awkgram.y:1527 awkgram.y:1545 awkgram.y:1895 awkgram.y:1980 +msgid "source file does not end in newline" +msgstr "kaynak dosyasının sonunda satırsonu eksik" + +#: awkgram.y:1481 +msgid "unterminated regexp ends with `\\' at end of file" +msgstr "sonlandırılmamış düzenli ifade dosya sonunda `\\' ile bitiyor" + +#: awkgram.y:1501 +msgid "unterminated regexp" +msgstr "sonlandırılmamış düzenli ifade" + +#: awkgram.y:1504 +msgid "unterminated regexp at end of file" +msgstr "dosya sonunda sonlandırılmamış düzenli ifade" + +#: awkgram.y:1571 +msgid "use of `\\ #...' line continuation is not portable" +msgstr "`\\ #...' satır uzatma kullanımı taşınabilir deÄŸil" + +#: awkgram.y:1583 +msgid "backslash not last character on line" +msgstr "tersbölü satırdaki son karakter deÄŸil" + +#: awkgram.y:1628 +msgid "POSIX does not allow operator `**='" +msgstr "`**=' iÅŸlemimi POSIX uyumlu deÄŸil" + +#: awkgram.y:1630 +msgid "old awk does not support operator `**='" +msgstr "`**=' iÅŸlemimini eski awk desteklemiyor" + +#: awkgram.y:1639 +msgid "POSIX does not allow operator `**'" +msgstr "`**' iÅŸlemimi POSIX uyumlu deÄŸil" + +#: awkgram.y:1641 +msgid "old awk does not support operator `**'" +msgstr "`**' iÅŸlemimini eski awk desteklemiyor" + +#: awkgram.y:1672 +msgid "operator `^=' is not supported in old awk" +msgstr "`^=' iÅŸlemimini eski awk desteklemiyor" + +#: awkgram.y:1680 +msgid "operator `^' is not supported in old awk" +msgstr "`^' iÅŸlemimini eski awk desteklemiyor" + +#: awkgram.y:1764 awkgram.y:1781 +msgid "unterminated string" +msgstr "sonlandırılmamış dizge" + +#: awkgram.y:1941 +#, c-format +msgid "invalid char '%c' in expression" +msgstr "ifade içinde '%c' karakteri geçersiz" + +#: awkgram.y:2001 +#, c-format +msgid "`%s' is a gawk extension" +msgstr "`%s' bir gawk uzantısıdır" + +#: awkgram.y:2004 +#, c-format +msgid "`%s' is a Bell Labs extension" +msgstr "`%s' bir Bell Laboratuarları uzantısıdır" + +#: awkgram.y:2007 +#, c-format +msgid "POSIX does not allow `%s'" +msgstr "`%s' POSIX uyumlu deÄŸil" + +#: awkgram.y:2011 +#, c-format +msgid "`%s' is not supported in old awk" +msgstr "`%s' eski awk tarafından desteklemiyor" + +#: awkgram.y:2038 +msgid "`goto' considered harmful!\n" +msgstr "`goto' zararlı sayılır!\n" + +#: awkgram.y:2102 +#, c-format +msgid "%d is invalid as number of arguments for %s" +msgstr "%d argüman sayısı olarak %s için geçersiz" + +#: awkgram.y:2121 awkgram.y:2124 +msgid "match: third argument is a gawk extension" +msgstr "match: üçüncü argüman bir gawk uzantısı" + +#: awkgram.y:2137 +#, c-format +msgid "%s: string literal as last arg of substitute has no effect" +msgstr "%s: yerine kullanılan son argüman olarak dizge sabiti etkisiz" + +#: awkgram.y:2140 +#, c-format +msgid "%s third parameter is not a changeable object" +msgstr "üçüncü %s parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" + +#: awkgram.y:2167 awkgram.y:2170 +msgid "close: second argument is a gawk extension" +msgstr "close: ikinci argüman bir gawk uzantısı" + +#: awkgram.y:2180 +msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" +msgstr "dcgettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" + +#: awkgram.y:2195 +msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" +msgstr "dcngettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" + +#: awkgram.y:2266 +#, c-format +msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" +msgstr "`%s' iÅŸlevi: %d. parametre, `%s', %d. parametrenin tekrarı" + +#: awkgram.y:2299 +#, c-format +msgid "function `%s': parameter `%s' shadows global variable" +msgstr "`%s' iÅŸlevi: parametre, `%s'global deÄŸiÅŸkeni gölgeliyor" + +#: awkgram.y:2411 +#, c-format +msgid "could not open `%s' for writing (%s)" +msgstr "`%s' yazmak için açılamadı (%s)" + +#: awkgram.y:2412 profile.c:93 +msgid "sending profile to standard error" +msgstr "profil standart hataya gönderiliyor" + +#: awkgram.y:2442 +#, c-format +msgid "%s: close failed (%s)" +msgstr "%s: kapatma baÅŸarısız (%s)" + +#: awkgram.y:2566 +msgid "shadow_funcs() called twice!" +msgstr "shadow_funcs() iki kere çaÄŸrıldı!" + +#: awkgram.y:2593 +msgid "there were shadowed variables." +msgstr "gölgeli deÄŸiÅŸkenler vardı." + +#: awkgram.y:2666 +#, c-format +msgid "function `%s': can't use function name as parameter name" +msgstr "iÅŸlev `%s': iÅŸlev ismi parametre ismi olarak kullanılamaz" + +#: awkgram.y:2676 +#, c-format +msgid "function name `%s' previously defined" +msgstr "iÅŸlev ismi `%s' önceden atanmış" + +#: awkgram.y:2827 awkgram.y:2833 +#, c-format +msgid "function `%s' called but never defined" +msgstr "`%s' iÅŸlevi çaÄŸrıldı ama hiç atanmamış" + +#: awkgram.y:2836 +#, c-format +msgid "function `%s' defined but never called" +msgstr "`%s' iÅŸlevi atanmış ama hiç çaÄŸrılmadı" + +#: awkgram.y:2863 +#, c-format +msgid "regexp constant for parameter #%d yields boolean value" +msgstr "%d numaralı argüman bir düzenli ifade sabiti" + +#: awkgram.y:2876 +#, c-format +msgid "" +"function `%s' called with space between name and `(',\n" +"%s" +msgstr "" +"`%s' iÅŸlevi `(' ile isim arasında boÅŸlukla çaÄŸrılmış,\n" +"%s" + +#: awkgram.y:2878 +msgid "or used as a variable or an array" +msgstr "ya da bir deÄŸiÅŸken ya da dizi olarak kullanılmış" + +#: builtin.c:111 #, c-format msgid "%s to \"%s\" failed (%s)" msgstr "%s \"%s\"ya yazılamadı (%s)" -#: builtin.c:108 +#: builtin.c:112 msgid "standard output" msgstr "standart çıktı" -#: builtin.c:109 +#: builtin.c:113 msgid "reason unknown" msgstr "sebebi bilinmiyor" -#: builtin.c:122 +#: builtin.c:126 msgid "exp: received non-numeric argument" msgstr "exp: sayısal olmayan argüman alındı" -#: builtin.c:128 +#: builtin.c:132 #, c-format msgid "exp: argument %g is out of range" msgstr "exp: %g kapsamdışı" -#: builtin.c:186 +#: builtin.c:190 #, c-format msgid "fflush: cannot flush: pipe `%s' opened for reading, not writing" msgstr "" "fflush: kanala yazılamadı: veriyolu `%s' okumak için açıldı, yazmak için " "deÄŸil" -#: builtin.c:189 +#: builtin.c:193 #, c-format msgid "fflush: cannot flush: file `%s' opened for reading, not writing" msgstr "" "fflush: kanala yazılamadı: dosya `%s' okumak için açıldı, yazmak için deÄŸil" -#: builtin.c:201 +#: builtin.c:205 #, c-format msgid "fflush: `%s' is not an open file, pipe or co-process" msgstr "fflush: `%s' bir açık dosya, veriyolu ya da bir yan iÅŸlem deÄŸil" -#: builtin.c:295 +#: builtin.c:299 msgid "index: received non-string first argument" msgstr "index: ilk argüman dizge olmayan türde alındı" -#: builtin.c:297 +#: builtin.c:301 msgid "index: received non-string second argument" msgstr "index: ikinci argüman dizge olmayan türde alındı" -#: builtin.c:407 +#: builtin.c:411 msgid "int: received non-numeric argument" msgstr "int: sayısal olmayan argüman alındı" -#: builtin.c:424 +#: builtin.c:428 msgid "length: received non-string argument" msgstr "length: dizge olmayan argüman alındı" -#: builtin.c:440 +#: builtin.c:444 msgid "log: received non-numeric argument" msgstr "log: sayısal olmayan argüman alındı" -#: builtin.c:443 +#: builtin.c:447 #, c-format msgid "log: received negative argument %g" msgstr "log: negatif argüman %g alındı" -#: builtin.c:605 builtin.c:608 +#: builtin.c:609 builtin.c:612 msgid "must use `count$' on all formats or none" msgstr "tüm biçemlerde ya `count$' kullanmalısınız ya da hiçbir ÅŸey" -#: builtin.c:703 +#: builtin.c:714 msgid "`$' is not permitted in awk formats" msgstr "`$' awk biçemlerde kullanılmaz" -#: builtin.c:709 +#: builtin.c:720 msgid "arg count with `$' must be > 0" msgstr "`$' ile birlikte verilen argüman sayısı > 0 olmalıdır" -#: builtin.c:711 +#: builtin.c:722 #, c-format -msgid "arg count %d greater than total number of supplied arguments" -msgstr "argüman sayısı %d saÄŸlanmış toplam argüman sayısından büyük olmalıdır" +msgid "arg count %ld greater than total number of supplied arguments" +msgstr "argüman sayısı %ld saÄŸlanmış toplam argüman sayısından büyük" -#: builtin.c:713 +#: builtin.c:724 msgid "`$' not permitted after period in format" msgstr "`$' biçem içinde noktadan sonra kullanılmaz" -#: builtin.c:726 +#: builtin.c:737 msgid "no `$' supplied for positional field width or precision" msgstr "konumsal alan geniÅŸliÄŸi ya da duyarlığı için `$' kullanılmamış" -#: builtin.c:784 +#: builtin.c:795 msgid "`l' is meaningless in awk formats; ignored" msgstr "`l' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:788 +#: builtin.c:799 msgid "`l' is not permitted in POSIX awk formats" msgstr "`l' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:799 +#: builtin.c:810 msgid "`L' is meaningless in awk formats; ignored" msgstr "`L' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:803 +#: builtin.c:814 msgid "`L' is not permitted in POSIX awk formats" msgstr "`L' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:814 +#: builtin.c:825 msgid "`h' is meaningless in awk formats; ignored" msgstr "`h' awk biçemlerde anlamsız; yoksayıldı" -#: builtin.c:818 +#: builtin.c:829 msgid "`h' is not permitted in POSIX awk formats" msgstr "`h' POSIX awk biçemlerde kullanılmaz" -#: builtin.c:1067 +#: builtin.c:1078 msgid "not enough arguments to satisfy format string" msgstr "biçem dizgesini oluÅŸturacak yeterli argüman yok" -#: builtin.c:1069 +#: builtin.c:1080 msgid "^ ran out for this one" msgstr "bir bunun için ^ tükendi" -#: builtin.c:1074 +#: builtin.c:1085 msgid "[s]printf: format specifier does not have control letter" msgstr "[s]printf: biçem belirteci denetim karakteri içermiyor" -#: builtin.c:1077 +#: builtin.c:1088 msgid "too many arguments supplied for format string" msgstr "biçem dizgesi için çok fazla argüman saÄŸlanmış" -#: builtin.c:1120 builtin.c:1123 +#: builtin.c:1154 builtin.c:1157 msgid "printf: no arguments" msgstr "printf: argüman yok" -#: builtin.c:1156 +#: builtin.c:1181 msgid "sqrt: received non-numeric argument" msgstr "sqrt: sayısal olmayan argüman alındı" -#: builtin.c:1160 +#: builtin.c:1185 #, c-format msgid "sqrt: called with negative argument %g" msgstr "sqrt: negatif argüman %g ile çaÄŸrıldı" -#: builtin.c:1182 +#: builtin.c:1207 #, c-format msgid "substr: start index %g is invalid, using 1" msgstr "substr: baÅŸlangıç indeksi olarak %g geçersiz, 1 kullanılıyor" -#: builtin.c:1187 +#: builtin.c:1212 #, c-format msgid "substr: non-integer start index %g will be truncated" msgstr "" "substr: tamsayı olmayan baÅŸlangıç indeksi %g den ondalık kısım çıkarılacak" -#: builtin.c:1201 +#: builtin.c:1231 #, c-format msgid "substr: length %g is <= 0" msgstr "substr: uzunluk %g <= 0 dır" -#: builtin.c:1207 +#: builtin.c:1233 +#, c-format +msgid "substr: length %g is < 0" +msgstr "substr: uzunluk %g < 0" + +#: builtin.c:1240 #, c-format msgid "substr: non-integer length %g will be truncated" msgstr "substr: tamsayı olmayan uzunluk %g den ondalık kısım çıkarılacak" -#: builtin.c:1214 +#: builtin.c:1245 +#, c-format +msgid "substr: length %g too big for string indexing, truncating to %g" +msgstr "" +"substr: dizge indislemesi için uzunluk olarak %g çok fazla, %g den sonrası " +"gözardı ediliyor" + +#: builtin.c:1257 msgid "substr: source string is zero length" msgstr "substr: kaynak dizge sıfır uzunlukta" -#: builtin.c:1221 +#: builtin.c:1263 +#, c-format +msgid "substr: start index %g is past end of string" +msgstr "substr: baÅŸlangıç indisi %g dizgenin sonundan sonra" + +#: builtin.c:1271 #, c-format msgid "" -"substr: length %d at start index %d exceeds length of first argument (%d)" +"substr: length %g at start index %g exceeds length of first argument (%lu)" msgstr "" -"substr: uzunluk %d, %d baÅŸlangıç indeksinde ilk argümanın uzunluÄŸunu (%d) " +"substr: uzunluk %g, %g baÅŸlangıç indisinde ilk argümanın uzunluÄŸunu (%lu) " "aÅŸar" -#: builtin.c:1227 -#, c-format -msgid "substr: start index %d is past end of string" -msgstr "substr: baÅŸlangıç indeksi %d dizgenin sonundan sonra" - -#: builtin.c:1263 +#: builtin.c:1306 msgid "strftime: received non-string first argument" msgstr "strftime: ilk argüman dizge olmayan türde alındı" -#: builtin.c:1269 +#: builtin.c:1312 msgid "strftime: received empty format string" msgstr "strftime: boÅŸ biçem dizgesi alındı" -#: builtin.c:1278 +#: builtin.c:1321 msgid "strftime: received non-numeric second argument" msgstr "strftime: ikinci argüman sayısal olmayan türde alındı" -#: builtin.c:1341 +#: builtin.c:1384 msgid "mktime: received non-string argument" msgstr "mktime: dizge olmayan argüman alındı" -#: builtin.c:1386 +#: builtin.c:1429 msgid "system: received non-string argument" msgstr "system: dizge olmayan argüman alındı" -#: builtin.c:1512 +#: builtin.c:1573 msgid "tolower: received non-string argument" msgstr "tolower: dizge olmayan argüman alındı" -#: builtin.c:1561 +#: builtin.c:1622 msgid "toupper: received non-string argument" msgstr "toupper: dizge olmayan argüman alındı" -#: builtin.c:1606 +#: builtin.c:1667 msgid "atan2: received non-numeric first argument" msgstr "atan2: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:1608 +#: builtin.c:1669 msgid "atan2: received non-numeric second argument" msgstr "atan2: ikinci argüman sayısal olmayan türde alındı" -#: builtin.c:1627 +#: builtin.c:1688 msgid "sin: received non-numeric argument" msgstr "sin: sayısal olmayan argüman alındı" -#: builtin.c:1643 +#: builtin.c:1704 msgid "cos: received non-numeric argument" msgstr "cos: sayısal olmayan argüman alındı" -#: builtin.c:1687 +#: builtin.c:1748 msgid "srand: received non-numeric argument" msgstr "srand: sayısal olmayan argüman alındı" -#: builtin.c:1721 +#: builtin.c:1787 msgid "match: third argument is not an array" msgstr "match: üçüncü argüman bir dizi deÄŸil" -#: builtin.c:2157 +#: builtin.c:2264 msgid "gensub: 3rd argument of 0 treated as 1" msgstr "gensub: 0 olan 3. argüman 1 kabul edildi" -#: builtin.c:2268 builtin.c:2270 +#: builtin.c:2375 builtin.c:2377 msgid "lshift: received non-numeric first argument" msgstr "lshift: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2272 +#: builtin.c:2379 #, c-format msgid "lshift(%lf, %lf): negative values will give strange results" msgstr "lshift(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2274 +#: builtin.c:2381 #, c-format msgid "lshift(%lf, %lf): fractional values will be truncated" msgstr "lshift(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2276 +#: builtin.c:2383 #, c-format msgid "lshift(%lf, %lf): too large shift value will give strange results" msgstr "lshift(%lf, %lf): çok büyük kaydırma deÄŸeri tuhaf sonuçlar verecek" -#: builtin.c:2305 builtin.c:2307 +#: builtin.c:2412 builtin.c:2414 msgid "rshift: received non-numeric first argument" msgstr "rshift: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2309 +#: builtin.c:2416 #, c-format msgid "rshift(%lf, %lf): negative values will give strange results" msgstr "rshift(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2311 +#: builtin.c:2418 #, c-format msgid "rshift(%lf, %lf): fractional values will be truncated" msgstr "rshift(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2313 +#: builtin.c:2420 #, c-format msgid "rshift(%lf, %lf): too large shift value will give strange results" msgstr "rshift(%lf, %lf): çok büyük kaydırma deÄŸeri tuhaf sonuçlar verecek" -#: builtin.c:2342 builtin.c:2344 +#: builtin.c:2449 builtin.c:2451 msgid "and: received non-numeric first argument" msgstr "and: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2346 +#: builtin.c:2453 #, c-format msgid "and(%lf, %lf): negative values will give strange results" msgstr "and(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2348 +#: builtin.c:2455 #, c-format msgid "and(%lf, %lf): fractional values will be truncated" msgstr "and(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2377 builtin.c:2379 +#: builtin.c:2484 builtin.c:2486 msgid "or: received non-numeric first argument" msgstr "or: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2381 +#: builtin.c:2488 #, c-format msgid "or(%lf, %lf): negative values will give strange results" msgstr "or(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2383 +#: builtin.c:2490 #, c-format msgid "or(%lf, %lf): fractional values will be truncated" msgstr "or(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2412 builtin.c:2414 +#: builtin.c:2519 builtin.c:2521 msgid "xor: received non-numeric first argument" msgstr "xor: ilk argüman sayısal olmayan türde alındı" -#: builtin.c:2416 +#: builtin.c:2523 #, c-format msgid "xor(%lf, %lf): negative values will give strange results" msgstr "xor(%lf, %lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2418 +#: builtin.c:2525 #, c-format msgid "xor(%lf, %lf): fractional values will be truncated" msgstr "xor(%lf, %lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2446 +#: builtin.c:2553 msgid "compl: received non-numeric argument" msgstr "compl: sayısal olmayan argüman alındı" -#: builtin.c:2448 +#: builtin.c:2555 #, c-format msgid "compl(%lf): negative value will give strange results" msgstr "compl(%lf): negatif deÄŸerler tuhaf sonuçlar verecek" -#: builtin.c:2450 +#: builtin.c:2557 #, c-format msgid "compl(%lf): fractional value will be truncated" msgstr "compl(%lf): tamsayı kısım kalacak ÅŸekilde kalanı atılacak" -#: builtin.c:2621 +#: builtin.c:2728 #, c-format msgid "dcgettext: `%s' is not a valid locale category" msgstr "dcgettext: `%s' geçerli bir yerel kategori deÄŸil" -#: ext.c:60 ext.c:64 -msgid "`extension' is a gawk extension" -msgstr "`extension' bir gawk uzantısıdır" - -#: ext.c:74 +#: eval.c:262 #, c-format -msgid "extension: cannot open `%s' (%s)\n" -msgstr "extension: `%s' açılamıyor (%s)\n" +msgid "unknown nodetype %d" +msgstr "%d. düğümtürü bilinmiyor" -#: ext.c:82 -#, c-format -msgid "extension: library `%s': cannot call function `%s' (%s)\n" -msgstr "extension: kitaplık `%s': `%s' iÅŸlevi çaÄŸrılamıyor (%s)\n" +#: eval.c:310 +msgid "buffer overflow in genflags2str" +msgstr "genflags2str içinde tampon taÅŸtı" -#: ext.c:180 +#: eval.c:555 +#, c-format +msgid "for loop: array `%s' changed size from %ld to %ld during loop execution" +msgstr "" +"for loop: `%s' dizisinin boyu döngünün yorumlanması sırasında %ld iken %ld " +"oldu" + +#: eval.c:576 +msgid "`break' outside a loop is not portable" +msgstr "döngü dışında `break' kullanımı taşınabilir deÄŸil" + +#: eval.c:580 +msgid "`break' outside a loop is not allowed" +msgstr "döngü dışında `break' kullanımı yasak" + +#: eval.c:597 +msgid "`continue' outside a loop is not portable" +msgstr "döngü dışında `continue' kullanımı taşınabilir deÄŸil" + +#: eval.c:601 +msgid "`continue' outside a loop is not allowed" +msgstr "döngü dışında `continue' kullanımı yasak" + +#: eval.c:635 +msgid "`next' cannot be called from a BEGIN rule" +msgstr "`next' bir BEGIN kuralından çaÄŸrılamaz" + +#: eval.c:637 +msgid "`next' cannot be called from an END rule" +msgstr "`next' bir END kuralından çaÄŸrılamaz" + +#: eval.c:646 +msgid "`nextfile' cannot be called from a BEGIN rule" +msgstr "`nextfile' bir BEGIN kuralından çaÄŸrılamaz" + +#: eval.c:648 +msgid "`nextfile' cannot be called from an END rule" +msgstr "`nextfile' bir END kuralından çaÄŸrılamaz" + +#: eval.c:696 +msgid "statement has no effect" +msgstr "deyim etkisiz" + +#: eval.c:731 eval.c:761 eval.c:1733 +#, c-format +msgid "reference to uninitialized variable `%s'" +msgstr "öndeÄŸer ataması yapılmamış `%s' deÄŸiÅŸkenine baÅŸvuru" + +#: eval.c:739 eval.c:1721 +#, c-format +msgid "can't use function name `%s' as variable or array" +msgstr "`%s' iÅŸlev ismi bir deÄŸiÅŸken ya da dizi olarak kullanılamaz" + +#: eval.c:746 eval.c:752 +#, c-format +msgid "reference to uninitialized argument `%s'" +msgstr "baÅŸlangıç deÄŸeri olmayan `%s' argümanına baÅŸvuru" + +#: eval.c:810 eval.c:1728 profile.c:773 +#, c-format +msgid "attempt to use array `%s' in a scalar context" +msgstr "`%s' dizisi bir sayısal baÄŸlamda kullanılmaya çalışılıyor" + +#: eval.c:910 +msgid "" +"concatenation: side effects in one expression have changed the length of " +"another!" +msgstr "" +"bitiÅŸtirme: bir ifadenin yan etkileri diÄŸerinin uzunluÄŸunu deÄŸiÅŸtirmiÅŸ!" + +#: eval.c:935 +msgid "assignment used in conditional context" +msgstr "koÅŸul baÄŸlamında atama yapılmış" + +#: eval.c:1026 +msgid "division by zero attempted" +msgstr "sıfırla bölme hatası" + +#: eval.c:1041 +#, c-format +msgid "division by zero attempted in `%%'" +msgstr "`%%'de sıfırla bölme hatası" + +#: eval.c:1056 profile.c:649 +#, c-format +msgid "illegal type (%s) in tree_eval" +msgstr "tree_eval içinde kuraldışı tür (%s)" + +#: eval.c:1232 +msgid "division by zero attempted in `/='" +msgstr "`/='de sıfırla bölme hatası" + +#: eval.c:1250 +#, c-format +msgid "division by zero attempted in `%%='" +msgstr "`%%='de sıfırla bölme hatası" + +#: eval.c:1510 +#, c-format +msgid "%s (from %s)" +msgstr "%s (%s'den)" + +#: eval.c:1569 +#, c-format +msgid "function `%s' called with more arguments than declared" +msgstr "`%s' iÅŸlevi bildirilenden daha fazla argümanla çaÄŸrıldı" + +#: eval.c:1628 +#, c-format +msgid "function `%s' not defined" +msgstr "`%s' iÅŸlevi tanımsız" + +#: eval.c:1634 +#, c-format +msgid "function %s called\n" +msgstr "%s iÅŸlevi çaÄŸrıldı\n" + +#: eval.c:1693 +msgid "" +"\n" +"\t# Function Call Stack:\n" +"\n" +msgstr "" +"\n" +"\t# Ä°ÅŸlev ÇaÄŸrı Yığını:\n" +"\n" + +#: eval.c:1696 +msgid "\t# -- main --\n" +msgstr "\t# -- main --\n" + +#: eval.c:1850 +msgid "attempt to field reference from non-numeric value" +msgstr "sayısal olmayan deÄŸerden alan baÅŸvurusu" + +#: eval.c:1852 +msgid "attempt to reference from null string" +msgstr "null dizgeden alan baÅŸvurusu" + +#: eval.c:1858 +#, c-format +msgid "attempt to access field %d" +msgstr "%d. alana eriÅŸilmeye çalışılıyor" + +#: eval.c:1874 +#, c-format +msgid "attempt to use scalar parameter `%s' as an array" +msgstr "sayısal paramaetre `%s' bir dizi olarak kullanılmaya çalışılıyor" + +#: eval.c:1886 eval.c:1893 profile.c:865 +msgid "assignment is not allowed to result of builtin function" +msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz" + +#: eval.c:1941 +msgid "`IGNORECASE' is a gawk extension" +msgstr "`IGNORECASE' bir gawk uzantısıdır" + +#: eval.c:1970 +msgid "`BINMODE' is a gawk extension" +msgstr "`BINMODE' bir gawk uzantısıdır" + +#: eval.c:2082 +#, c-format +msgid "bad `%sFMT' specification `%s'" +msgstr "`%sFMT' özelliÄŸi `%s' hatalı" + +#: eval.c:2160 +msgid "turning off `--lint' due to assignment to `LINT'" +msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor" + +#: ext.c:60 ext.c:64 +msgid "`extension' is a gawk extension" +msgstr "`extension' bir gawk uzantısıdır" + +#: ext.c:74 +#, c-format +msgid "extension: cannot open `%s' (%s)\n" +msgstr "extension: `%s' açılamıyor (%s)\n" + +#: ext.c:82 +#, c-format +msgid "extension: library `%s': cannot call function `%s' (%s)\n" +msgstr "extension: kitaplık `%s': `%s' iÅŸlevi çaÄŸrılamıyor (%s)\n" + +#: ext.c:181 msgid "Operation Not Supported" msgstr "Ä°ÅŸlem Desteklenmiyor" +#: field.c:321 +msgid "NF set to negative value" +msgstr "NF negatif deÄŸere ayarlı" + +#: field.c:819 +msgid "split: second argument is not an array" +msgstr "split: ikinci argüman bir dizi deÄŸil" + +#: field.c:854 +msgid "split: null string for third arg is a gawk extension" +msgstr "split: üçüncü argüman olan null dizge bir gawk uzantısı" + +#: field.c:906 +msgid "`FIELDWIDTHS' is a gawk extension" +msgstr "`FIELDWIDTHS' bir gawk uzantısıdır" + +#: field.c:933 +#, c-format +msgid "field %d in FIELDWIDTHS, must be > 0" +msgstr "FIELDWIDTHS içindeki %d. alan > 0 olmalı" + +#: field.c:1006 +msgid "null string for `FS' is a gawk extension" +msgstr "`FS' için null dizge bir gawk uzantısıdır" + #: getopt.c:692 getopt.c:704 #, c-format msgid "%s: option `%s' is ambiguous\n" @@ -469,7 +967,7 @@ msgid "%s: invalid option -- %c\n" msgstr "%s: geçersiz seçenek -- %c\n" -#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:412 +#: getopt.c:962 getopt.c:973 getopt.c:1159 getopt.c:1172 main.c:431 #, c-format msgid "%s: option requires an argument -- %c\n" msgstr "%s: seçenek bir argümanla kullanılır -- %c\n" @@ -484,167 +982,471 @@ msgid "%s: option `-W %s' doesn't allow an argument\n" msgstr "%s: `-W %s' seçeneÄŸi argümansız kullanılır\n" -#: main.c:307 -msgid "`-m[fr]' option irrelevant in gawk" -msgstr "`-m[fr]' seçeneÄŸi gawk'da böyle kullanılmaz" - -#: main.c:309 -msgid "-m option usage: `-m[fr] nnn'" -msgstr "-m seçeneÄŸinin kullanımı: `-m[fr] nnn'" +#: io.c:257 +#, c-format +msgid "cannot open file `%s' for reading (%s)" +msgstr "`%s' okumak için açılamıyor (%s)" -#: main.c:326 +#: io.c:344 #, c-format -msgid "%s: option `-W %s' unrecognized, ignored\n" -msgstr "%s: `-W %s' seçeneÄŸi tanımlı deÄŸil, yok sayıldı\n" +msgid "close of fd %d (`%s') failed (%s)" +msgstr "dosya tanımlayıcı %d (`%s') baÅŸarısız (%s)" -#: main.c:357 -msgid "empty argument to `--source' ignored" -msgstr "`--source' seçeneÄŸi için boÅŸ argüman yoksayıldı" +#: io.c:482 +#, c-format +msgid "invalid tree type %s in redirect()" +msgstr "redirect() içindeki aÄŸaç türü %s geçersiz" -#: main.c:429 -msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" -msgstr "ortam deÄŸiÅŸkeni `POSIXLY_CORRECT' var: `--posix' kullanılıyor" +#: io.c:488 +#, c-format +msgid "expression in `%s' redirection only has numeric value" +msgstr "`%s' yönlendirmesi içindeki ifade sadece sayısal deÄŸer içeriyor" -#: main.c:434 -msgid "`--posix' overrides `--traditional'" -msgstr "`--posix' seçeneÄŸi `--traditional' seçeneÄŸini etkisiz kılar" +#: io.c:494 +#, c-format +msgid "expression for `%s' redirection has null string value" +msgstr "`%s' yönlendirmesi içindeki ifade null dizge deÄŸeri içeriyor" -#: main.c:445 -msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +#: io.c:499 +#, c-format +msgid "filename `%s' for `%s' redirection may be result of logical expression" msgstr "" -"`--posix'/`--traditional' seçenekleri `--non-decimal-data' seçeneÄŸini " -"etkisiz kılar" +"`%s' dosya ismi (`%s' yönlendirmesi için) mantıksal ifadenin sonucu olabilir" -#: main.c:449 +#: io.c:521 #, c-format -msgid "running %s setuid root may be a security problem" -msgstr "%s root yetkileriyle çalıştırıldığında güvenlik sorunları olabilir" +msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" +msgstr "`%.*s' dosyası için `>' ve `>>' karışımı gereksiz" -#: main.c:478 +#: io.c:573 #, c-format -msgid "can't set mode on stdin (%s)" -msgstr "standart girdide kip belirlenemiyor (%s)" +msgid "can't open pipe `%s' for output (%s)" +msgstr "`%s' veriyolu çıktı için açılamadı (%s)" -#: main.c:481 +#: io.c:582 #, c-format -msgid "can't set mode on stdout (%s)" -msgstr "standart çıktıda kip belirlenemiyor (%s)" +msgid "can't open pipe `%s' for input (%s)" +msgstr "`%s' veriyolu girdi için açılamadı (%s)" -#: main.c:483 +#: io.c:595 #, c-format -msgid "can't set mode on stderr (%s)" -msgstr "standart hatada kip belirlenemiyor (%s)" +msgid "can't open two way socket `%s' for input/output (%s)" +msgstr "iki yönlü `%s' soketi G/Ç için açılamıyor (%s)" -#: main.c:512 -msgid "no program text at all!" -msgstr "program metni hiç yok!" +#: io.c:599 +#, c-format +msgid "can't open two way pipe `%s' for input/output (%s)" +msgstr "iki yönlü `%s' veriyolu G/Ç için açılamıyor (%s)" -#: main.c:556 +#: io.c:675 #, c-format -msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" -msgstr "" -"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] -f progdosyası [--] " -"dosya ...\n" +msgid "can't redirect from `%s' (%s)" +msgstr "`%s'den yönlendirilemiyor (%s)" -#: main.c:558 +#: io.c:678 #, c-format -msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" -msgstr "" -"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] %cprogram%c dosya ...\n" +msgid "can't redirect to `%s' (%s)" +msgstr "`%s'e yönlendirilemiyor (%s)" -#: main.c:563 -msgid "POSIX options:\t\tGNU long options:\n" -msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n" +#: io.c:717 +msgid "" +"reached system limit for open files: starting to multiplex file descriptors" +msgstr "" +"açık dosyalar için sistem sınırı aşıldı: çoÄŸul dosya tanımlayıcılara " +"baÅŸlarken" -#: main.c:564 -msgid "\t-f progfile\t\t--file=progfile\n" -msgstr " -f progDosyası --file=progDosyası\n" +#: io.c:729 +#, c-format +msgid "close of `%s' failed (%s)." +msgstr "`%s' kapatılamadı (%s)." -#: main.c:565 -msgid "\t-F fs\t\t\t--field-separator=fs\n" -msgstr " -F ayraç --field-separator=ayraç\n" +#: io.c:736 +msgid "too many pipes or input files open" +msgstr "çok fazla veriyolu ya da dosya açık" -#: main.c:566 -msgid "\t-v var=val\t\t--assign=var=val\n" -msgstr " -v var=deÄŸer --assign=var=deÄŸer\n" +#: io.c:759 +msgid "close: second argument must be `to' or `from'" +msgstr "close: ikinci argüman `to' ya da `from' olmalı" -#: main.c:567 -msgid "\t-m[fr] val\n" -msgstr " -m[fr] deÄŸer\n" +#: io.c:773 +#, c-format +msgid "close: `%.*s' is not an open file, pipe or co-process" +msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-iÅŸlem deÄŸil" -#: main.c:568 -msgid "\t-W compat\t\t--compat\n" -msgstr " -W compat --compat\n" +#: io.c:777 +msgid "close of redirection that was never opened" +msgstr "hiç açılmamış bir yönlendirmenin kapatılması" -#: main.c:569 -msgid "\t-W copyleft\t\t--copyleft\n" -msgstr " -W copyleft --copyleft\n" +#: io.c:804 +#, c-format +msgid "close: redirection `%s' not opened with `|&', second argument ignored" +msgstr "" +"close: `%s' yönlendirmesi bir `|&' ile açılmamış, ikinci argüman yoksayıldı" + +#: io.c:866 +#, c-format +msgid "failure status (%d) on pipe close of `%s' (%s)" +msgstr "baÅŸarısızlık durumu (%d): `%s' veriyolunun kapatılması (%s)" + +#: io.c:869 +#, c-format +msgid "failure status (%d) on file close of `%s' (%s)" +msgstr "baÅŸarısızlık durumu (%d): `%s' dosyasının kapatılması (%s)" + +#: io.c:888 +#, c-format +msgid "no explicit close of socket `%s' provided" +msgstr "`%s' soketinin açıkça kapatılması istenmedi" + +#: io.c:891 +#, c-format +msgid "no explicit close of co-process `%s' provided" +msgstr "`%s' alt-iÅŸleminin açıkça kapatılması istenmedi" + +#: io.c:894 +#, c-format +msgid "no explicit close of pipe `%s' provided" +msgstr "`%s' veriyolunun açıkça kapatılması istenmedi" + +#: io.c:897 +#, c-format +msgid "no explicit close of file `%s' provided" +msgstr "`%s' dosyasının açıkça kapatılması istenmedi" + +#: io.c:926 io.c:980 +#, c-format +msgid "error writing standard output (%s)" +msgstr "standart çıktıya yazarken hata (%s)" + +#: io.c:930 io.c:984 +#, c-format +msgid "error writing standard error (%s)" +msgstr "standart hataya yazarken hata (%s)" + +#: io.c:938 +#, c-format +msgid "pipe flush of `%s' failed (%s)." +msgstr "`%s'in veriyolu ile veri aktarımı baÅŸarısız (%s)." + +#: io.c:941 +#, c-format +msgid "co-process flush of pipe to `%s' failed (%s)." +msgstr "`%s'e veriyolunun alt-iÅŸlemi ile veri aktarımı baÅŸarısız (%s)." + +#: io.c:944 +#, c-format +msgid "file flush of `%s' failed (%s)." +msgstr "`%s'in dosya ile veri aktarımı baÅŸarısız (%s)." + +#: io.c:1103 +msgid "/inet/raw client not ready yet, sorry" +msgstr "/inet/raw istemci henüz hazır deÄŸil" + +#: io.c:1105 io.c:1142 +msgid "only root may use `/inet/raw'." +msgstr "`/inet/raw' sadece root tarafından kullanılabilir" + +#: io.c:1140 +msgid "/inet/raw server not ready yet, sorry" +msgstr "/inet/raw sunucu henüz hazır deÄŸil" + +#: io.c:1230 +#, c-format +msgid "no (known) protocol supplied in special filename `%s'" +msgstr "özel dosya ismi `%s' içinde (bilinen) bir protokol saÄŸlanmamış" + +#: io.c:1248 +#, c-format +msgid "special file name `%s' is incomplete" +msgstr "özel dosya ismi `%s' tamamlanmamış" + +#: io.c:1260 +#, c-format +msgid "local port invalid in `%s'" +msgstr "`%s' deki yerel port geçersiz" + +#: io.c:1272 +msgid "must supply a remote hostname to `/inet'" +msgstr "`/inet' e bir karşı makina ismi saÄŸlanmalı" + +#: io.c:1287 +msgid "must supply a remote port to `/inet'" +msgstr "`/inet' e bir karşı port saÄŸlanmalı" + +#: io.c:1293 +#, c-format +msgid "remote port invalid in `%s'" +msgstr "`%s' de karşı port geçersiz" + +#: io.c:1303 +msgid "TCP/IP communications are not supported" +msgstr "TCP/IP haberleÅŸmesi desteklenmiyor" + +#: io.c:1312 io.c:1492 +#, c-format +msgid "file `%s' is a directory" +msgstr "`%s' dosya deÄŸil dizin" + +#: io.c:1381 +#, c-format +msgid "use `PROCINFO[\"%s\"]' instead of `%s'" +msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)" + +#: io.c:1413 +msgid "use `PROCINFO[...]' instead of `/dev/user'" +msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın" + +#: io.c:1478 io.c:1652 +#, c-format +msgid "could not open `%s', mode `%s'" +msgstr "`%s', `%s' kipinde açılamadı" + +#: io.c:1703 +#, c-format +msgid "close of master pty failed (%s)" +msgstr "ana pty kapatılamadı (%s)" + +#: io.c:1705 io.c:1857 io.c:2009 +#, c-format +msgid "close of stdout in child failed (%s)" +msgstr "ast süreçte stdÇ kapatılamadı (%s)" + +#: io.c:1708 +#, c-format +msgid "moving slave pty to stdout in child failed (dup: %s)" +msgstr "ast süreçte yardımcı pty standart çıktıya taşınamadı (dup: %s)" + +#: io.c:1710 io.c:1862 +#, c-format +msgid "close of stdin in child failed (%s)" +msgstr "ast süreçte stdG kapatılamadı (%s)" + +#: io.c:1713 +#, c-format +msgid "moving slave pty to stdin in child failed (dup: %s)" +msgstr "ast süreçte yardımcı pty standart girdiye taşınamadı (dup: %s)" + +#: io.c:1715 io.c:1734 +#, c-format +msgid "close of slave pty failed (%s)" +msgstr "yardımcı pty kapatılamadı (%s)" + +#: io.c:1808 io.c:1860 io.c:1990 io.c:2012 +#, c-format +msgid "moving pipe to stdout in child failed (dup: %s)" +msgstr "ast süreçte veriyolu standart çıktıya taşınamadı (dup: %s)" + +#: io.c:1812 io.c:1865 +#, c-format +msgid "moving pipe to stdin in child failed (dup: %s)" +msgstr "ast süreçte veriyolu standart girdiye taşınamadı (dup: %s)" + +#: io.c:1829 io.c:2003 +msgid "restoring stdout in parent process failed\n" +msgstr "üst süreçte stdÇ eski durumuna getirilemedi\n" + +#: io.c:1834 +msgid "restoring stdin in parent process failed\n" +msgstr "üst süreçte stdG eski durumuna getirilemedi\n" -#: main.c:570 +#: io.c:1868 io.c:2014 io.c:2025 +#, c-format +msgid "close of pipe failed (%s)" +msgstr "veriyolu kapatılamadı (%s)" + +#: io.c:1913 +msgid "`|&' not supported" +msgstr "`|&' desteklenmiyor" + +#: io.c:1980 +#, c-format +msgid "cannot open pipe `%s' (%s)" +msgstr "`%s' veriyolu açılamıyor (%s)" + +#: io.c:2021 +#, c-format +msgid "cannot create child process for `%s' (fork: %s)" +msgstr "`%s' için ast süreç oluÅŸturulamıyor (fork: %s)" + +#: io.c:2364 +#, c-format +msgid "data file `%s' is empty" +msgstr "veri dosyası `%s' boÅŸ" + +#: io.c:2407 io.c:2415 +msgid "could not allocate more input memory" +msgstr "" + +#: io.c:2540 io.c:2782 io.c:3046 +#, c-format +msgid "error reading input file `%s': %s" +msgstr "`%s' girdi dosyası okunurken hata: %s" + +#: io.c:3281 +msgid "multicharacter value of `RS' is a gawk extension" +msgstr "`RS' çoklu karakter deÄŸeri bir gawk uzantısıdır" + +#: main.c:322 +msgid "`-m[fr]' option irrelevant in gawk" +msgstr "`-m[fr]' seçeneÄŸi gawk'da böyle kullanılmaz" + +#: main.c:324 +msgid "-m option usage: `-m[fr] nnn'" +msgstr "-m seçeneÄŸinin kullanımı: `-m[fr] nnn'" + +#: main.c:341 +#, c-format +msgid "%s: option `-W %s' unrecognized, ignored\n" +msgstr "%s: `-W %s' seçeneÄŸi tanımlı deÄŸil, yok sayıldı\n" + +#: main.c:378 +msgid "empty argument to `--source' ignored" +msgstr "`--source' seçeneÄŸi için boÅŸ argüman yoksayıldı" + +#: main.c:448 +msgid "environment variable `POSIXLY_CORRECT' set: turning on `--posix'" +msgstr "ortam deÄŸiÅŸkeni `POSIXLY_CORRECT' var: `--posix' kullanılıyor" + +#: main.c:453 +msgid "`--posix' overrides `--traditional'" +msgstr "`--posix' seçeneÄŸi `--traditional' seçeneÄŸini etkisiz kılar" + +#: main.c:464 +msgid "`--posix'/`--traditional' overrides `--non-decimal-data'" +msgstr "" +"`--posix'/`--traditional' seçenekleri `--non-decimal-data' seçeneÄŸini " +"etkisiz kılar" + +#: main.c:468 +#, c-format +msgid "running %s setuid root may be a security problem" +msgstr "%s root yetkileriyle çalıştırıldığında güvenlik sorunları olabilir" + +#: main.c:509 +#, c-format +msgid "can't set binary mode on stdin (%s)" +msgstr "standart girdi ikilik kipe ayarlanamaz (%s)" + +#: main.c:512 +#, c-format +msgid "can't set binary mode on stdout (%s)" +msgstr "standart çıktı ikilik kipe ayarlanamaz (%s)" + +#: main.c:514 +#, c-format +msgid "can't set binary mode on stderr (%s)" +msgstr "standart hata ikilik kipe ayarlanamaz (%s)" + +#: main.c:544 +msgid "no program text at all!" +msgstr "program metni hiç yok!" + +#: main.c:612 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] -f progfile [--] file ...\n" +msgstr "" +"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] -f progdosyası [--] " +"dosya ...\n" + +#: main.c:614 +#, c-format +msgid "Usage: %s [POSIX or GNU style options] [--] %cprogram%c file ...\n" +msgstr "" +"Kullanımı: %s [POSIX veya GNU tarzı seçenekler] %cprogram%c dosya ...\n" + +#: main.c:619 +msgid "POSIX options:\t\tGNU long options:\n" +msgstr "POSIX seçenekleri: GNU uzun seçenekleri:\n" + +#: main.c:620 +msgid "\t-f progfile\t\t--file=progfile\n" +msgstr " -f progDosyası --file=progDosyası\n" + +#: main.c:621 +msgid "\t-F fs\t\t\t--field-separator=fs\n" +msgstr " -F ayraç --field-separator=ayraç\n" + +#: main.c:622 +msgid "\t-v var=val\t\t--assign=var=val\n" +msgstr " -v var=deÄŸer --assign=var=deÄŸer\n" + +#: main.c:623 +msgid "\t-m[fr] val\n" +msgstr " -m[fr] deÄŸer\n" + +#: main.c:624 +msgid "\t-W compat\t\t--compat\n" +msgstr " -W compat --compat\n" + +#: main.c:625 +msgid "\t-W copyleft\t\t--copyleft\n" +msgstr " -W copyleft --copyleft\n" + +#: main.c:626 msgid "\t-W copyright\t\t--copyright\n" msgstr " -W copyright --copyright\n" -#: main.c:571 +#: main.c:627 msgid "\t-W dump-variables[=file]\t--dump-variables[=file]\n" msgstr " -W dump-variables[=dosya] --dump-variables[=dosya]\n" -#: main.c:572 +#: main.c:628 msgid "\t-W gen-po\t\t--gen-po\n" msgstr " -W gen-po --gen-po\n" -#: main.c:573 +#: main.c:629 msgid "\t-W help\t\t\t--help\n" msgstr " -W help --help\n" -#: main.c:574 +#: main.c:630 msgid "\t-W lint[=fatal]\t\t--lint[=fatal]\n" msgstr " -W lint[=ölümcül] --lint[=ölümcül]\n" -#: main.c:575 +#: main.c:631 msgid "\t-W lint-old\t\t--lint-old\n" msgstr " -W lint-old --lint-old\n" -#: main.c:576 +#: main.c:632 msgid "\t-W non-decimal-data\t--non-decimal-data\n" msgstr " -W non-decimal-data --non-decimal-data\n" -#: main.c:578 +#: main.c:634 msgid "\t-W nostalgia\t\t--nostalgia\n" msgstr " -W nostalgia --nostalgia\n" -#: main.c:581 +#: main.c:637 msgid "\t-W parsedebug\t\t--parsedebug\n" msgstr " -W parsedebug --parsedebug\n" -#: main.c:583 +#: main.c:639 msgid "\t-W profile[=file]\t--profile[=file]\n" msgstr " -W profile[=dosya] --profile[=dosya]\n" -#: main.c:584 +#: main.c:640 msgid "\t-W posix\t\t--posix\n" msgstr " -W posix --posix\n" -#: main.c:585 +#: main.c:641 msgid "\t-W re-interval\t\t--re-interval\n" msgstr " -W re-interval --re-interval\n" -#: main.c:586 +#: main.c:642 msgid "\t-W source=program-text\t--source=program-text\n" msgstr " -W source=program-metni --source=program-metni\n" -#: main.c:587 +#: main.c:643 msgid "\t-W traditional\t\t--traditional\n" msgstr " -W traditional --traditional\n" -#: main.c:588 +#: main.c:644 msgid "\t-W usage\t\t--usage\n" msgstr " -W usage --usage\n" -#: main.c:589 +#: main.c:645 msgid "\t-W version\t\t--version\n" msgstr " -W version --version\n" -#: main.c:593 +#: main.c:649 msgid "" "\n" "To report bugs, see node `Bugs' in `gawk.info', which is\n" @@ -658,7 +1460,7 @@ "Çeviri hatalarını adresine bildiriniz.\n" "\n" -#: main.c:597 +#: main.c:653 msgid "" "gawk is a pattern scanning and processing language.\n" "By default it reads standard input and writes standard output.\n" @@ -668,7 +1470,7 @@ "Öntanımlı olarak standart girdiyi okur ve standart çıktıya yazar.\n" "\n" -#: main.c:601 +#: main.c:657 msgid "" "Examples:\n" "\tgawk '{ sum += $1 }; END { print sum }' file\n" @@ -678,7 +1480,7 @@ "\tgawk '{ sum += $1 }; END { print sum }' dosya\n" "\tgawk -F: '{ print $1 }' /etc/passwd\n" -#: main.c:613 +#: main.c:669 #, c-format msgid "" "Copyright (C) 1989, 1991-%d Free Software Foundation.\n" @@ -697,7 +1499,7 @@ "üzerinde deÄŸiÅŸiklik yapabilirsiniz.\n" "\n" -#: main.c:621 +#: main.c:677 msgid "" "This program is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" @@ -711,7 +1513,7 @@ "edinmek için GNU Genel Kamu Lisansına bakınız.\n" "\n" -#: main.c:627 +#: main.c:683 msgid "" "You should have received a copy of the GNU General Public License\n" "along with this program; if not, write to the Free Software\n" @@ -721,98 +1523,117 @@ "olacaksınız; yoksa Free Software Foundation, Inc., 59 Temple Place\n" "Suite 330, Boston, MA 02111-1307, USA. adresinden isteyebilirsiniz.\n" -#: main.c:657 +#: main.c:713 msgid "-Ft does not set FS to tab in POSIX awk" msgstr "POSIX awk -Ft ile dosya sistemini belirlemez" -#: main.c:888 +#: main.c:944 +#, c-format +msgid "" +"%s: `%s' argument to `-v' not in `var=value' form\n" +"\n" +msgstr "" +"%s: `-v' ile verilen `%s' argümanı `var=deÄŸer' biçiminde deÄŸil\n" +"\n" + +#: main.c:964 +#, c-format +msgid "`%s' is not a legal variable name" +msgstr "`%s' kurala uygun bir deÄŸiÅŸken ismi deÄŸil" + +#: main.c:967 #, c-format -msgid "invalid syntax in name `%s' for variable assignment" -msgstr "deÄŸiÅŸken ismi `%s' de sözdizimi hatası" +msgid "`%s' is not a variable name, looking for file `%s=%s'" +msgstr "`%2$s=%3$s' için dosyaya bakınca, `%1$s' bir deÄŸiÅŸken ismi deÄŸil" -#: main.c:957 +#: main.c:995 msgid "floating point exception" msgstr "Gerçel sayı istisnası" -#: main.c:964 +#: main.c:1002 msgid "fatal error: internal error" msgstr "ölümcül iç hata" -#: main.c:1014 +#: main.c:1052 #, c-format msgid "no pre-opened fd %d" msgstr "ön açılışlı bir %d dosya tanımlayıcısı yok" -#: main.c:1019 +#: main.c:1057 #, c-format msgid "could not pre-open /dev/null for fd %d" msgstr "%d dosya tanımlayıcısı için /dev/null ön açılışı yapılamadı" -#: main.c:1037 main.c:1046 +#: main.c:1080 main.c:1089 #, c-format msgid "could not find groups: %s" msgstr "gruplar bulunamadı: %s" -#: profile.c:94 -#, c-format -msgid "could not open `%s' for writing: %s" -msgstr "`%s' yazmak için açılamadı: %s" +#: msg.c:54 +msgid "cmd. line:" +msgstr "komut satırı:" -#: profile.c:96 awkgram.y:2465 -msgid "sending profile to standard error" -msgstr "profil standart hataya gönderiliyor" +#: msg.c:120 +msgid "warning: " +msgstr "uyarı: " -#: profile.c:409 -msgid "internal error: Node_var with null vname" -msgstr "iç hata: null vname'li node_var" +#: msg.c:142 +msgid "error: " +msgstr "hata: " -#: profile.c:524 -msgid "internal error: Node_var_array with null vname" -msgstr "iç hata: null vname'li node_var_array" +#: msg.c:178 +msgid "fatal: " +msgstr "ölümcül: " -#: profile.c:554 eval.c:813 -#, c-format -msgid "" -"function `%s' called with space between name and `(',\n" -"%s" -msgstr "" -"`%s' iÅŸlevi `(' ile isim arasında boÅŸlukla çaÄŸrılmış,\n" -"%s" +#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 +msgid "can't convert string to float" +msgstr "dizge gerçel sayıya dönüştürülemiyor" + +#: node.c:357 +msgid "backslash at end of string" +msgstr "dizge sonunda tersbölü" -#: profile.c:556 eval.c:815 -msgid "or used in other expression context" -msgstr "ya da diÄŸer ifadenin içeriÄŸinde kullanılmış" +#: node.c:544 +msgid "POSIX does not allow `\\x' escapes" +msgstr "POSIX `\\x' öncelemelerine izin vermez" -#: profile.c:633 profile.c:761 eval.c:792 eval.c:1043 eval.c:1615 eval.c:1741 -#, c-format -msgid "attempt to use array `%s' in a scalar context" -msgstr "`%s' dizisi bir sayısal baÄŸlamda kullanılmaya çalışılıyor" +#: node.c:550 +msgid "no hex digits in `\\x' escape sequence" +msgstr "`\\x' önceleme dizgesinde onaltılık rakamlar yok" -#: profile.c:637 eval.c:1047 +#: node.c:584 #, c-format -msgid "illegal type (%s) in tree_eval" -msgstr "tree_eval içinde kuraldışı tür (%s)" +msgid "escape sequence `\\%c' treated as plain `%c'" +msgstr "`\\%c' önceleme dizgesi `%c' olarak kullanıldı" -#: profile.c:842 eval.c:1790 +#: posix/gawkmisc.c:172 #, c-format -msgid "attempt to use function `%s' as array" -msgstr "`%s' iÅŸlevi dizi olarak kullanılmaya çalışılıyor" +msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" +msgstr "%s %s `%s': close-on-exec belirlenemedi: (fcntl: %s)" -#: profile.c:856 eval.c:1797 +#: profile.c:91 #, c-format -msgid "`%s' is a function, assignment is not allowed" -msgstr "`%s' bir iÅŸlevdir, bir deÄŸiÅŸken ismi olarak kullanılamaz" +msgid "could not open `%s' for writing: %s" +msgstr "`%s' yazmak için açılamadı: %s" -#: profile.c:860 eval.c:1803 eval.c:1810 -msgid "assignment is not allowed to result of builtin function" -msgstr "deÄŸiÅŸken ismine yerleÅŸik iÅŸlevin sonucu atanamaz" +#: profile.c:409 +msgid "internal error: Node_var with null vname" +msgstr "iç hata: null vname'li node_var" + +#: profile.c:471 +msgid "# treated internally as `delete'" +msgstr "# dahili olarak `delete' varsayıldı" + +#: profile.c:545 +msgid "internal error: Node_var_array with null vname" +msgstr "iç hata: null vname'li node_var_array" -#: profile.c:1108 +#: profile.c:1127 #, c-format msgid "\t# gawk profile, created %s\n" msgstr "\t# gawk profili, oluÅŸturuldu: %s\n" -#: profile.c:1111 +#: profile.c:1130 msgid "" "\t# BEGIN block(s)\n" "\n" @@ -820,7 +1641,7 @@ "\t# BEGIN blokları\n" "\n" -#: profile.c:1121 +#: profile.c:1140 msgid "" "\t# Rule(s)\n" "\n" @@ -828,7 +1649,7 @@ "\t# Kurallar\n" "\n" -#: profile.c:1127 +#: profile.c:1146 msgid "" "\t# END block(s)\n" "\n" @@ -836,7 +1657,7 @@ "\t# END blokları\n" "\n" -#: profile.c:1147 +#: profile.c:1166 msgid "" "\n" "\t# Functions, listed alphabetically\n" @@ -844,913 +1665,144 @@ "\n" "\t# Ä°ÅŸlevler, alfabetik sırayla\n" -#: profile.c:1357 +#: profile.c:1376 #, c-format msgid "unexpected type %s in prec_level" msgstr "prec_level'da anlaşılamayan tür %s" -#: regex.c:1322 +#: re.c:193 +#, c-format +msgid "regex match failed, not enough memory to match string \"%.*s%s\"" +msgstr "" +"düzenli ifade eÅŸleÅŸmesi saÄŸlanamadı, \"%.*s%s\" dizgesini eÅŸleÅŸtirmek için " +"yeterli bellek yok" + +#: regcomp.c:136 msgid "Success" msgstr "BaÅŸarılı" -#: regex.c:1323 +#: regcomp.c:139 msgid "No match" msgstr "EÅŸleÅŸmez" -#: regex.c:1324 +#: regcomp.c:142 msgid "Invalid regular expression" msgstr "Düzenli ifade geçersiz" -#: regex.c:1325 +#: regcomp.c:145 msgid "Invalid collation character" msgstr "KarşılaÅŸtırma karakteri geçersiz" -#: regex.c:1326 +#: regcomp.c:148 msgid "Invalid character class name" msgstr "Karakter sınıf ismi geçersiz" -#: regex.c:1327 +#: regcomp.c:151 msgid "Trailing backslash" msgstr "Ä°zleyen tersbölü" -#: regex.c:1328 +#: regcomp.c:154 msgid "Invalid back reference" msgstr "Geriye baÅŸvuru geçersiz" -#: regex.c:1329 +#: regcomp.c:157 msgid "Unmatched [ or [^" msgstr "[ ya da [^ eÅŸleÅŸmiyor" -#: regex.c:1330 +#: regcomp.c:160 msgid "Unmatched ( or \\(" msgstr "( ya da \\( eÅŸleÅŸmiyor" -#: regex.c:1331 +#: regcomp.c:163 msgid "Unmatched \\{" msgstr "\\{ eÅŸleÅŸmiyor" -#: regex.c:1332 +#: regcomp.c:166 msgid "Invalid content of \\{\\}" msgstr "\\{\\} içeriÄŸi geçersiz" -#: regex.c:1333 +#: regcomp.c:169 msgid "Invalid range end" msgstr "Kapsam sonu geçersiz" -#: regex.c:1334 dfa.c:182 dfa.c:193 dfa.c:204 +#: regcomp.c:172 msgid "Memory exhausted" msgstr "Bellek tükendi" -#: regex.c:1335 +#: regcomp.c:175 msgid "Invalid preceding regular expression" msgstr "düzenli ifade önceliÄŸi geçersiz" -#: regex.c:1336 +#: regcomp.c:178 msgid "Premature end of regular expression" msgstr "Düzenli ifade sonu eksik kalmış" -#: regex.c:1337 +#: regcomp.c:181 msgid "Regular expression too big" msgstr "Düzenli ifade çok büyük" -#: regex.c:1338 +#: regcomp.c:184 msgid "Unmatched ) or \\)" msgstr ") ya da \\) eÅŸleÅŸmiyor" -#: regex.c:7365 +#: regcomp.c:621 msgid "No previous regular expression" msgstr "Daha önce düzenli ifade yok" -#: awkgram.y:232 -msgid "BEGIN blocks must have an action part" -msgstr "BEGIN blokları bir eylem bölümü içermeli" - -#: awkgram.y:238 -msgid "END blocks must have an action part" -msgstr "END blokları bir eylem bölümü içermeli" - -#: awkgram.y:274 -#, c-format -msgid "`%s' is a built-in function, it cannot be redefined" -msgstr "`%s' bir yerleÅŸik iÅŸlevdir, yeniden atanamaz" - -#: awkgram.y:362 -msgid "statement may have no effect" -msgstr "deyim bir etkiye sahip olmayabilir" - -#: awkgram.y:455 -msgid "`next' used in BEGIN or END action" -msgstr "`next' BEGIN ya da END eyleminde kullanılmış" - -#: awkgram.y:462 awkgram.y:469 -msgid "`nextfile' is a gawk extension" -msgstr "`nextfile' bir gawk uzantısıdır" - -#: awkgram.y:474 -msgid "`nextfile' used in BEGIN or END action" -msgstr "`nextfile' BEGIN ya da END eyleminde kullanılmış" - -#: awkgram.y:483 -msgid "`return' used outside function context" -msgstr "`return' iÅŸlev baÄŸlamının dışında kullanılmış" - -#: awkgram.y:519 -msgid "plain `print' in BEGIN or END rule should probably be `print \"\"'" -msgstr "BEGIN veya END kuralındaki `print' aslında `print \"\"' olmalıydı" - -#: awkgram.y:532 awkgram.y:539 -msgid "`delete array' is a gawk extension" -msgstr "`delete array' bir gawk uzantısıdır" - -#: awkgram.y:604 -msgid "multistage two-way pipelines don't work" -msgstr "çok katlı iki yönlü veriyolları çalışmaz" - -#: awkgram.y:695 -msgid "regular expression on right of assignment" -msgstr "düzenli ifade atamanın sağında" - -#: awkgram.y:713 -msgid "non-redirected `getline' undefined inside END action" -msgstr "END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" - -#: awkgram.y:723 -msgid "regular expression on left of `~' or `!~' operator" -msgstr "düzenli ifade `~' ya da `!~' iÅŸlemiminin solunda" - -#: awkgram.y:733 -#, c-format -msgid "regexp constant `/%s/' looks like a C comment, but is not" -msgstr "düzenli ifade sabiti `/%s/' bir C açıklaması gibi görünüyor ama deÄŸil" - -#: awkgram.y:749 -msgid "regular expression on right of comparison" -msgstr "düzenli ifade karşılaÅŸtırmanın sağında" - -#: awkgram.y:776 -msgid "non-redirected `getline' undefined inside BEGIN or END action" -msgstr "" -"BEGIN ya da END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" - -#: awkgram.y:831 -msgid "call of `length' without parentheses is not portable" -msgstr "parantezsiz `length' çaÄŸrısı taşınabilir deÄŸil" - -#: awkgram.y:834 -msgid "call of `length' without parentheses is deprecated by POSIX" -msgstr "parantezsiz `length' çaÄŸrısı POSIX'e uygun deÄŸil" - -#: awkgram.y:884 -msgid "invalid subscript expression" -msgstr "indis ifadesi geçersiz" - -#: awkgram.y:1033 -#, c-format -msgid "fptr %x not in tokentab\n" -msgstr "iÅŸlev imleyicisi %x iÅŸlev isim listesinde bulunamadı\n" - -#: awkgram.y:1068 -msgid "unexpected newline" -msgstr "beklenmeyen satırsonu" - -#: awkgram.y:1152 -msgid "empty program text on command line" -msgstr "komut satırında boÅŸ program metni" - -#: awkgram.y:1209 -#, c-format -msgid "can't open source file `%s' for reading (%s)" -msgstr "kaynak dosyası `%s' okumak için açılamıyor (%s)" - -#: awkgram.y:1244 -#, c-format -msgid "can't read sourcefile `%s' (%s)" -msgstr "kaynak dosyası `%s' okunamıyor (%s)" - -#: awkgram.y:1252 -#, c-format -msgid "source file `%s' is empty" -msgstr "kaynak dosyası `%s' boÅŸ" - -#: awkgram.y:1454 awkgram.y:1565 awkgram.y:1583 awkgram.y:1929 awkgram.y:2011 -msgid "source file does not end in newline" -msgstr "kaynak dosyasının sonunda satırsonu eksik" - -#: awkgram.y:1518 -msgid "unterminated regexp ends with `\\' at end of file" -msgstr "sonlandırılmamış düzenli ifade dosya sonunda `\\' ile bitiyor" - -#: awkgram.y:1539 -msgid "unterminated regexp" -msgstr "sonlandırılmamış düzenli ifade" - -#: awkgram.y:1542 -msgid "unterminated regexp at end of file" -msgstr "dosya sonunda sonlandırılmamış düzenli ifade" - -#: awkgram.y:1609 -msgid "use of `\\ #...' line continuation is not portable" -msgstr "`\\ #...' satır uzatma kullanımı taşınabilir deÄŸil" - -#: awkgram.y:1621 -msgid "backslash not last character on line" -msgstr "tersbölü satırdaki son karakter deÄŸil" - -#: awkgram.y:1662 -msgid "POSIX does not allow operator `**='" -msgstr "`**=' iÅŸlemimi POSIX uyumlu deÄŸil" - -#: awkgram.y:1664 -msgid "old awk does not support operator `**='" -msgstr "`**=' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1673 -msgid "POSIX does not allow operator `**'" -msgstr "`**' iÅŸlemimi POSIX uyumlu deÄŸil" - -#: awkgram.y:1675 -msgid "old awk does not support operator `**'" -msgstr "`**' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1708 -msgid "operator `^=' is not supported in old awk" -msgstr "`^=' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1716 -msgid "operator `^' is not supported in old awk" -msgstr "`^' iÅŸlemimini eski awk desteklemiyor" - -#: awkgram.y:1798 awkgram.y:1815 -msgid "unterminated string" -msgstr "sonlandırılmamış dizge" - -#: awkgram.y:1972 -#, c-format -msgid "invalid char '%c' in expression" -msgstr "ifade içinde '%c' karakteri geçersiz" - -#: awkgram.y:2032 -#, c-format -msgid "`%s' is a gawk extension" -msgstr "`%s' bir gawk uzantısıdır" - -#: awkgram.y:2035 -#, c-format -msgid "`%s' is a Bell Labs extension" -msgstr "`%s' bir Bell Laboratuarları uzantısıdır" - -#: awkgram.y:2038 -#, c-format -msgid "POSIX does not allow `%s'" -msgstr "`%s' POSIX uyumlu deÄŸil" - -#: awkgram.y:2042 -#, c-format -msgid "`%s' is not supported in old awk" -msgstr "`%s' eski awk tarafından desteklemiyor" - -#: awkgram.y:2070 -msgid "`goto' considered harmful!\n" -msgstr "`goto' zararlı sayılır!\n" - -#: awkgram.y:2134 -#, c-format -msgid "%d is invalid as number of arguments for %s" -msgstr "%d argüman sayısı olarak %s için geçersiz" - -#: awkgram.y:2153 awkgram.y:2156 -msgid "match: third argument is a gawk extension" -msgstr "match: üçüncü argüman bir gawk uzantısı" - -#: awkgram.y:2172 -#, c-format -msgid "%s: string literal as last arg of substitute has no effect" -msgstr "%s: yerine kullanılan son argüman olarak dizge sabiti etkisiz" - -#: awkgram.y:2176 -msgid "sub third parameter is not a changeable object" -msgstr "üçüncü sub parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" - -#: awkgram.y:2178 -msgid "gsub third parameter is not a changeable object" -msgstr "üçüncü gsub parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" - -#: awkgram.y:2204 awkgram.y:2207 -msgid "close: second argument is a gawk extension" -msgstr "close: ikinci argüman bir gawk uzantısı" - -#: awkgram.y:2217 -msgid "use of dcgettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dcgettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" - -#: awkgram.y:2232 -msgid "use of dcngettext(_\"...\") is incorrect: remove leading underscore" -msgstr "dcngettext(_\"...\") kullanımı yanlış: altçizgiyi kaldırın" - -#: awkgram.y:2323 -#, c-format -msgid "function `%s': parameter #%d, `%s', duplicates parameter #%d" -msgstr "`%s' iÅŸlevi: %d. parametre, `%s', %d. parametrenin tekrarı" - -#: awkgram.y:2355 -#, c-format -msgid "function `%s': parameter `%s' shadows global variable" -msgstr "`%s' iÅŸlevi: parametre, `%s'global deÄŸiÅŸkeni gölgeliyor" - -#: awkgram.y:2464 -#, c-format -msgid "could not open `%s' for writing (%s)" -msgstr "`%s' yazmak için açılamadı (%s)" +#~ msgid "invalid syntax in name `%s' for variable assignment" +#~ msgstr "deÄŸiÅŸken ismi `%s' de sözdizimi hatası" -#: awkgram.y:2495 -#, c-format -msgid "%s: close failed (%s)" -msgstr "%s: kapatma baÅŸarısız (%s)" +#~ msgid "or used in other expression context" +#~ msgstr "ya da diÄŸer ifadenin içeriÄŸinde kullanılmış" -#: awkgram.y:2605 -msgid "shadow_funcs() called twice!" -msgstr "shadow_funcs() iki kere çaÄŸrıldı!" +#~ msgid "attempt to use function `%s' as array" +#~ msgstr "`%s' iÅŸlevi dizi olarak kullanılmaya çalışılıyor" -#: awkgram.y:2680 -#, c-format -msgid "function `%s': can't use function name as parameter name" -msgstr "iÅŸlev `%s': iÅŸlev ismi parametre ismi olarak kullanılamaz" +#~ msgid "`%s' is a function, assignment is not allowed" +#~ msgstr "`%s' bir iÅŸlevdir, bir deÄŸiÅŸken ismi olarak kullanılamaz" -#: awkgram.y:2690 -#, c-format -msgid "function name `%s' previously defined" -msgstr "iÅŸlev ismi `%s' önceden atanmış" +#~ msgid "BEGIN blocks must have an action part" +#~ msgstr "BEGIN blokları bir eylem bölümü içermeli" -#: awkgram.y:2838 awkgram.y:2844 -#, c-format -msgid "function `%s' called but never defined" -msgstr "`%s' iÅŸlevi çaÄŸrıldı ama hiç atanmamış" +#~ msgid "`nextfile' used in BEGIN or END action" +#~ msgstr "`nextfile' BEGIN ya da END eyleminde kullanılmış" -#: awkgram.y:2847 -#, c-format -msgid "function `%s' defined but never called" -msgstr "`%s' iÅŸlevi atanmış ama hiç çaÄŸrılmadı" +#~ msgid "non-redirected `getline' undefined inside BEGIN or END action" +#~ msgstr "" +#~ "BEGIN ya da END eyleminin içinde yönlendirme yapmayan `getline' tanımsız" -#: awkgram.y:2874 -#, c-format -msgid "regexp constant for parameter #%d yields boolean value" -msgstr "%d numaralı argüman bir düzenli ifade sabiti" +#~ msgid "fptr %x not in tokentab\n" +#~ msgstr "iÅŸlev imleyicisi %x iÅŸlev isim listesinde bulunamadı\n" -#: dfa.c:529 dfa.c:532 dfa.c:550 dfa.c:561 dfa.c:585 dfa.c:644 dfa.c:649 -#: dfa.c:662 dfa.c:663 dfa.c:1043 dfa.c:1046 dfa.c:1073 dfa.c:1077 dfa.c:1078 -#: dfa.c:1081 dfa.c:1094 dfa.c:1095 -msgid "Unbalanced [" -msgstr "Dengesiz [" - -#: dfa.c:783 -msgid "Unfinished \\ escape" -msgstr "Tamamlanmamış \\ escape" - -#: dfa.c:916 dfa.c:922 dfa.c:932 dfa.c:940 dfa.c:955 -msgid "unfinished repeat count" -msgstr "Tamamlanmamış tekrar sayısı" - -#: dfa.c:929 dfa.c:946 dfa.c:954 dfa.c:958 -msgid "malformed repeat count" -msgstr "Tekrar sayısı hatalı" - -#: dfa.c:1285 -msgid "Unbalanced (" -msgstr "Dengesiz (" - -#: dfa.c:1407 -msgid "No regexp syntax bits specified" -msgstr "Düzenli ifade sözdizimi bitleri belirtilmemiÅŸ" - -#: dfa.c:1415 -msgid "Unbalanced )" -msgstr "Karşılıksız )" - -#: dfa.c:3014 -msgid "out of memory" -msgstr "bellek yetersiz" +#~ msgid "gsub third parameter is not a changeable object" +#~ msgstr "üçüncü gsub parametresi deÄŸiÅŸtirilebilir bir nesne deÄŸil" -#: field.c:849 -msgid "split: second argument is not an array" -msgstr "split: ikinci argüman bir dizi deÄŸil" +#~ msgid "Unbalanced [" +#~ msgstr "Dengesiz [" -#: field.c:876 -msgid "split: null string for third arg is a gawk extension" -msgstr "split: üçüncü argüman olan null dizge bir gawk uzantısı" +#~ msgid "Unfinished \\ escape" +#~ msgstr "Tamamlanmamış \\ escape" -#: field.c:916 -msgid "`FIELDWIDTHS' is a gawk extension" -msgstr "`FIELDWIDTHS' bir gawk uzantısıdır" +#~ msgid "unfinished repeat count" +#~ msgstr "Tamamlanmamış tekrar sayısı" -#: field.c:943 -#, c-format -msgid "field %d in FIELDWIDTHS, must be > 0" -msgstr "FIELDWIDTHS içindeki %d. alan > 0 olmalı" +#~ msgid "malformed repeat count" +#~ msgstr "Tekrar sayısı hatalı" -#: field.c:997 -msgid "null string for `FS' is a gawk extension" -msgstr "`FS' için null dizge bir gawk uzantısıdır" +#~ msgid "Unbalanced (" +#~ msgstr "Dengesiz (" -#: msg.c:57 -msgid "cmd. line:" -msgstr "komut satırı:" +#~ msgid "No regexp syntax bits specified" +#~ msgstr "Düzenli ifade sözdizimi bitleri belirtilmemiÅŸ" -#: msg.c:123 -msgid "warning: " -msgstr "uyarı: " +#~ msgid "Unbalanced )" +#~ msgstr "Karşılıksız )" -#: msg.c:145 -msgid "error: " -msgstr "hata: " +#~ msgid "out of memory" +#~ msgstr "bellek yetersiz" -#: msg.c:178 -msgid "fatal: " -msgstr "ölümcül: " - -#: eval.c:259 -#, c-format -msgid "unknown nodetype %d" -msgstr "%d. düğümtürü bilinmiyor" - -#: eval.c:307 -msgid "buffer overflow in genflags2str" -msgstr "genflags2str içinde tampon taÅŸtı" - -#: eval.c:541 -#, c-format -msgid "for loop: array `%s' changed size from %d to %d during loop execution" -msgstr "for loop: `%s' dizisinin indisi döngü sırasında %d iken %d oldu" - -#: eval.c:565 -msgid "`break' outside a loop is not portable" -msgstr "döngü dışında `break' kullanımı taşınabilir deÄŸil" - -#: eval.c:569 -msgid "`break' outside a loop is not allowed" -msgstr "döngü dışında `break' kullanımı yasak" - -#: eval.c:588 -msgid "`continue' outside a loop is not portable" -msgstr "döngü dışında `continue' kullanımı taşınabilir deÄŸil" - -#: eval.c:592 -msgid "`continue' outside a loop is not allowed" -msgstr "döngü dışında `continue' kullanımı yasak" - -#: eval.c:622 -msgid "`next' cannot be called from a BEGIN rule" -msgstr "`next' bir BEGIN kuralından çaÄŸrılamaz" - -#: eval.c:624 -msgid "`next' cannot be called from an END rule" -msgstr "`next' bir END kuralından çaÄŸrılamaz" - -#: eval.c:636 -msgid "`nextfile' cannot be called from a BEGIN rule" -msgstr "`nextfile' bir BEGIN kuralından çaÄŸrılamaz" - -#: eval.c:638 -msgid "`nextfile' cannot be called from an END rule" -msgstr "`nextfile' bir END kuralından çaÄŸrılamaz" - -#: eval.c:679 -msgid "statement has no effect" -msgstr "deyim etkisiz" - -#: eval.c:713 eval.c:743 eval.c:1622 -#, c-format -msgid "reference to uninitialized variable `%s'" -msgstr "öndeÄŸer ataması yapılmamış `%s' deÄŸiÅŸkenine baÅŸvuru" - -#: eval.c:721 eval.c:1608 -#, c-format -msgid "can't use function name `%s' as variable or array" -msgstr "`%s' iÅŸlev ismi bir deÄŸiÅŸken ya da dizi olarak kullanılamaz" - -#: eval.c:728 eval.c:734 eval.c:1747 -#, c-format -msgid "reference to uninitialized argument `%s'" -msgstr "baÅŸlangıç deÄŸeri olmayan `%s' argümanına baÅŸvuru" - -#: eval.c:823 -msgid "assignment used in conditional context" -msgstr "koÅŸul baÄŸlamında atama yapılmış" - -#: eval.c:914 -msgid "" -"concatenation: side effects in one expression have changed the length of " -"another!" -msgstr "" -"bitiÅŸtirme: bir ifadenin yan etkileri diÄŸerinin uzunluÄŸunu deÄŸiÅŸtirmiÅŸ!" - -#: eval.c:1013 -msgid "division by zero attempted" -msgstr "sıfırla bölme hatası" - -#: eval.c:1028 -#, c-format -msgid "division by zero attempted in `%%'" -msgstr "`%%'de sıfırla bölme hatası" - -#: eval.c:1236 -msgid "division by zero attempted in `/='" -msgstr "`/='de sıfırla bölme hatası" - -#: eval.c:1254 -#, c-format -msgid "division by zero attempted in `%%='" -msgstr "`%%='de sıfırla bölme hatası" - -#: eval.c:1424 -#, c-format -msgid "%s (from %s)" -msgstr "%s (%s'den)" - -#: eval.c:1472 -#, c-format -msgid "function `%s' called with more arguments than declared" -msgstr "`%s' iÅŸlevi bildirilenden daha fazla argümanla çaÄŸrıldı" - -#: eval.c:1519 -#, c-format -msgid "function `%s' not defined" -msgstr "`%s' iÅŸlevi tanımsız" - -#: eval.c:1521 -#, c-format -msgid "function %s called\n" -msgstr "%s iÅŸlevi çaÄŸrıldı\n" - -#: eval.c:1580 -msgid "" -"\n" -"\t# Function Call Stack:\n" -"\n" -msgstr "" -"\n" -"\t# Ä°ÅŸlev ÇaÄŸrı Yığını:\n" -"\n" - -#: eval.c:1583 -msgid "\t# -- main --\n" -msgstr "\t# -- main --\n" - -#: eval.c:1759 -msgid "attempt to field reference from non-numeric value" -msgstr "sayısal olmayan deÄŸerden alan baÅŸvurusu" - -#: eval.c:1761 -msgid "attempt to reference from null string" -msgstr "null dizgeden alan baÅŸvurusu" - -#: eval.c:1767 -#, c-format -msgid "attempt to access field %d" -msgstr "%d. alana eriÅŸilmeye çalışılıyor" - -#: eval.c:1783 -#, c-format -msgid "attempt to use scalar parameter `%s' as an array" -msgstr "sayısal paramaetre `%s' bir dizi olarak kullanılmaya çalışılıyor" - -#: eval.c:1874 -msgid "`IGNORECASE' is a gawk extension" -msgstr "`IGNORECASE' bir gawk uzantısıdır" - -#: eval.c:1902 -msgid "`BINMODE' is a gawk extension" -msgstr "`BINMODE' bir gawk uzantısıdır" - -#: eval.c:2014 -#, c-format -msgid "bad `%sFMT' specification `%s'" -msgstr "`%sFMT' özelliÄŸi `%s' hatalı" - -#: eval.c:2080 -msgid "turning off `--lint' due to assignment to `LINT'" -msgstr "`LINT' atamasından dolayı `--lint' kapatılıyor" - -#: eval.c:2116 -msgid "NF set to negative value" -msgstr "NF negatif deÄŸere ayarlı" - -#: io.c:240 -#, c-format -msgid "cannot open file `%s' for reading (%s)" -msgstr "`%s' okumak için açılamıyor (%s)" - -#: io.c:320 -#, c-format -msgid "close of fd %d (`%s') failed (%s)" -msgstr "dosya tanımlayıcı %d (`%s') baÅŸarısız (%s)" - -#: io.c:432 -#, c-format -msgid "invalid tree type %s in redirect()" -msgstr "redirect() içindeki aÄŸaç türü %s geçersiz" - -#: io.c:438 -#, c-format -msgid "expression in `%s' redirection only has numeric value" -msgstr "`%s' yönlendirmesi içindeki ifade sadece sayısal deÄŸer içeriyor" - -#: io.c:444 -#, c-format -msgid "expression for `%s' redirection has null string value" -msgstr "`%s' yönlendirmesi içindeki ifade null dizge deÄŸeri içeriyor" - -#: io.c:449 -#, c-format -msgid "filename `%s' for `%s' redirection may be result of logical expression" -msgstr "" -"`%s' dosya ismi (`%s' yönlendirmesi için) mantıksal ifadenin sonucu olabilir" - -#: io.c:471 -#, c-format -msgid "unnecessary mixing of `>' and `>>' for file `%.*s'" -msgstr "`%.*s' dosyası için `>' ve `>>' karışımı gereksiz" - -#: io.c:523 -#, c-format -msgid "can't open pipe `%s' for output (%s)" -msgstr "`%s' veriyolu çıktı için açılamadı (%s)" - -#: io.c:532 -#, c-format -msgid "can't open pipe `%s' for input (%s)" -msgstr "`%s' veriyolu girdi için açılamadı (%s)" - -#: io.c:545 -#, c-format -msgid "can't open two way socket `%s' for input/output (%s)" -msgstr "iki yönlü `%s' soketi G/Ç için açılamıyor (%s)" - -#: io.c:549 -#, c-format -msgid "can't open two way pipe `%s' for input/output (%s)" -msgstr "iki yönlü `%s' veriyolu G/Ç için açılamıyor (%s)" - -#: io.c:625 -#, c-format -msgid "can't redirect from `%s' (%s)" -msgstr "`%s'den yönlendirilemiyor (%s)" - -#: io.c:628 -#, c-format -msgid "can't redirect to `%s' (%s)" -msgstr "`%s'e yönlendirilemiyor (%s)" - -#: io.c:667 -msgid "" -"reached system limit for open files: starting to multiplex file descriptors" -msgstr "" -"açık dosyalar için sistem sınırı aşıldı: çoÄŸul dosya tanımlayıcılara " -"baÅŸlarken" - -#: io.c:679 -#, c-format -msgid "close of `%s' failed (%s)." -msgstr "`%s' kapatılamadı (%s)." - -#: io.c:686 -msgid "too many pipes or input files open" -msgstr "çok fazla veriyolu ya da dosya açık" - -#: io.c:709 -msgid "close: second argument must be `to' or `from'" -msgstr "close: ikinci argüman `to' ya da `from' olmalı" - -#: io.c:723 -#, c-format -msgid "close: `%.*s' is not an open file, pipe or co-process" -msgstr "close: `%.*s' bir açık dosya, veriyolu ya da alt-iÅŸlem deÄŸil" - -#: io.c:727 -msgid "close of redirection that was never opened" -msgstr "hiç açılmamış bir yönlendirmenin kapatılması" - -#: io.c:754 -#, c-format -msgid "close: redirection `%s' not opened with `|&', second argument ignored" -msgstr "" -"close: `%s' yönlendirmesi bir `|&' ile açılmamış, ikinci argüman yoksayıldı" - -#: io.c:811 -#, c-format -msgid "failure status (%d) on pipe close of `%s' (%s)" -msgstr "baÅŸarısızlık durumu (%d): `%s' veriyolunun kapatılması (%s)" - -#: io.c:814 -#, c-format -msgid "failure status (%d) on file close of `%s' (%s)" -msgstr "baÅŸarısızlık durumu (%d): `%s' dosyasının kapatılması (%s)" - -#: io.c:833 -#, c-format -msgid "no explicit close of socket `%s' provided" -msgstr "`%s' soketinin açıkça kapatılması istenmedi" - -#: io.c:836 -#, c-format -msgid "no explicit close of co-process `%s' provided" -msgstr "`%s' alt-iÅŸleminin açıkça kapatılması istenmedi" - -#: io.c:839 -#, c-format -msgid "no explicit close of pipe `%s' provided" -msgstr "`%s' veriyolunun açıkça kapatılması istenmedi" - -#: io.c:842 -#, c-format -msgid "no explicit close of file `%s' provided" -msgstr "`%s' dosyasının açıkça kapatılması istenmedi" - -#: io.c:871 io.c:925 -#, c-format -msgid "error writing standard output (%s)" -msgstr "standart çıktıya yazarken hata (%s)" - -#: io.c:875 io.c:929 -#, c-format -msgid "error writing standard error (%s)" -msgstr "standart hataya yazarken hata (%s)" - -#: io.c:883 -#, c-format -msgid "pipe flush of `%s' failed (%s)." -msgstr "`%s'in veriyolu ile veri aktarımı baÅŸarısız (%s)." - -#: io.c:886 -#, c-format -msgid "co-process flush of pipe to `%s' failed (%s)." -msgstr "`%s'e veriyolunun alt-iÅŸlemi ile veri aktarımı baÅŸarısız (%s)." - -#: io.c:889 -#, c-format -msgid "file flush of `%s' failed (%s)." -msgstr "`%s'in dosya ile veri aktarımı baÅŸarısız (%s)." - -#: io.c:1048 -msgid "/inet/raw client not ready yet, sorry" -msgstr "/inet/raw istemci henüz hazır deÄŸil" - -#: io.c:1050 io.c:1087 -msgid "only root may use `/inet/raw'." -msgstr "`/inet/raw' sadece root tarafından kullanılabilir" - -#: io.c:1085 -msgid "/inet/raw server not ready yet, sorry" -msgstr "/inet/raw sunucu henüz hazır deÄŸil" - -#: io.c:1175 -#, c-format -msgid "no (known) protocol supplied in special filename `%s'" -msgstr "özel dosya ismi `%s' içinde (bilinen) bir protokol saÄŸlanmamış" - -#: io.c:1193 -#, c-format -msgid "special file name `%s' is incomplete" -msgstr "özel dosya ismi `%s' tamamlanmamış" - -#: io.c:1205 -#, c-format -msgid "local port invalid in `%s'" -msgstr "`%s' deki yerel port geçersiz" - -#: io.c:1217 -msgid "must supply a remote hostname to `/inet'" -msgstr "`/inet' e bir karşı makina ismi saÄŸlanmalı" - -#: io.c:1232 -msgid "must supply a remote port to `/inet'" -msgstr "`/inet' e bir karşı port saÄŸlanmalı" - -#: io.c:1238 -#, c-format -msgid "remote port invalid in `%s'" -msgstr "`%s' de karşı port geçersiz" - -#: io.c:1248 -msgid "TCP/IP communications are not supported" -msgstr "TCP/IP haberleÅŸmesi desteklenmiyor" - -#: io.c:1257 io.c:1438 -#, c-format -msgid "file `%s' is a directory" -msgstr "`%s' dosya deÄŸil dizin" - -#: io.c:1327 -#, c-format -msgid "use `PROCINFO[\"%s\"]' instead of `%s'" -msgstr "`PROCINFO[\"%s\"]' kullanın (`%s' yerine)" - -#: io.c:1359 -msgid "use `PROCINFO[...]' instead of `/dev/user'" -msgstr "`/dev/user' yerine `PROCINFO[...]' kullanın" - -#: io.c:1424 -#, c-format -msgid "could not open `%s', mode `%s'" -msgstr "`%s', `%s' kipinde açılamadı" - -#: io.c:1550 io.c:1602 io.c:1732 io.c:1754 -#, c-format -msgid "moving pipe to stdout in child failed (dup: %s)" -msgstr "ast süreçte veriyolu standart çıktıya taşınamadı (dup: %s)" - -#: io.c:1554 io.c:1607 -#, c-format -msgid "moving pipe to stdin in child failed (dup: %s)" -msgstr "ast süreçte veriyolu standart girdiye taşınamadı (dup: %s)" - -#: io.c:1571 io.c:1745 -msgid "restoring stdout in parent process failed\n" -msgstr "üst süreçte stdÇ eski durumuna getirilemedi\n" - -#: io.c:1576 -msgid "restoring stdin in parent process failed\n" -msgstr "üst süreçte stdG eski durumuna getirilemedi\n" - -#: io.c:1599 io.c:1751 -#, c-format -msgid "close of stdout in child failed (%s)" -msgstr "ast süreçte stdÇ kapatılamadı (%s)" - -#: io.c:1604 -#, c-format -msgid "close of stdin in child failed (%s)" -msgstr "ast süreçte stdG kapatılamadı (%s)" - -#: io.c:1610 io.c:1756 io.c:1767 -#, c-format -msgid "close of pipe failed (%s)" -msgstr "veriyolu kapatılamadı (%s)" - -#: io.c:1655 -msgid "`|&' not supported" -msgstr "`|&' desteklenmiyor" - -#: io.c:1722 -#, c-format -msgid "cannot open pipe `%s' (%s)" -msgstr "`%s' veriyolu açılamıyor (%s)" - -#: io.c:1763 -#, c-format -msgid "cannot create child process for `%s' (fork: %s)" -msgstr "`%s' için ast süreç oluÅŸturulamıyor (fork: %s)" - -#: io.c:2104 -#, c-format -msgid "data file `%s' is empty" -msgstr "veri dosyası `%s' boÅŸ" - -#: io.c:2175 -#, c-format -msgid "internal error: file `%s', line %d\n" -msgstr "iç hata: dosya `%s', satır %d\n" - -#: io.c:2277 -#, c-format -msgid "error reading input file `%s': %s" -msgstr "`%s' girdi dosyası okunurken hata: %s" - -#: io.c:2521 -msgid "multicharacter value of `RS' is a gawk extension" -msgstr "`RS' çoklu karakter deÄŸeri bir gawk uzantısıdır" - -#: node.c:59 node.c:66 node.c:75 node.c:89 node.c:116 -msgid "can't convert string to float" -msgstr "dizge gerçel sayıya dönüştürülemiyor" - -#: node.c:342 -msgid "backslash at end of string" -msgstr "dizge sonunda tersbölü" - -#: node.c:524 -msgid "POSIX does not allow `\\x' escapes" -msgstr "POSIX `\\x' öncelemelerine izin vermez" - -#: node.c:530 -msgid "no hex digits in `\\x' escape sequence" -msgstr "`\\x' önceleme dizgesinde onaltılık rakamlar yok" - -#: node.c:564 -#, c-format -msgid "escape sequence `\\%c' treated as plain `%c'" -msgstr "`\\%c' önceleme dizgesi `%c' olarak kullanıldı" - -#: re.c:208 -#, c-format -msgid "regex match failed, not enough memory to match string \"%.*s%s\"" -msgstr "" -"düzenli ifade eÅŸleÅŸmesi saÄŸlanamadı, \"%.*s%s\" dizgesini eÅŸleÅŸtirmek için " -"yeterli bellek yok" - -#: posix/gawkmisc.c:122 -#, c-format -msgid "%s %s `%s': could not set close-on-exec: (fcntl: %s)" -msgstr "%s %s `%s': close-on-exec belirlenemedi: (fcntl: %s)" +#~ msgid "internal error: file `%s', line %d\n" +#~ msgstr "iç hata: dosya `%s', satır %d\n" #~ msgid "" #~ "\n" diff -urN gawk-3.1.1/posix/ChangeLog gawk-3.1.2/posix/ChangeLog --- gawk-3.1.1/posix/ChangeLog 2002-05-01 16:42:12.000000000 +0300 +++ gawk-3.1.2/posix/ChangeLog 2003-03-19 14:23:34.000000000 +0200 @@ -1,3 +1,29 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Tue Dec 17 11:05:11 2002 Arnold D. Robbins + + * gawkmisc.c (optimal_bufsize): Stat the file first, so that + stb is always valid for higher level code. + +Thu Nov 28 10:20:05 2002 Arnold D. Robbins + + * gawkmisc.c (optimal_bufsize): Enhance to use AWKBUFSIZE + environment variable for debugging. + +Tue Jun 11 22:18:42 2002 Stepan Kasal + + * gawkmisc.c (DEFBLKSIZE): Add check for st_blksize > 0, + fixes weird bug on some versions of HP-UX. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. @@ -17,7 +43,7 @@ Sun Dec 3 16:53:37 2000 Arnold D. Robbins - * gawkmisc.c (os_setbinmode): new function. + * gawkmisc.c (os_setbinmode): New function. Tue Nov 14 16:13:08 2000 Arnold D. Robbins @@ -27,11 +53,6 @@ * gawkmisc.c (os_is_setuid): new function. -Wed Jul 30 19:53:52 1997 Arnold D. Robbins - - * Close-on-exec changes: - gawkmisc.c: (os_close_on_exec, os_isdir): new functions. - Mon Aug 7 15:23:00 2000 Arnold D. Robbins * Release 3.0.6: Release tar file made. @@ -44,6 +65,11 @@ * Release 3.0.4: Release tar file made. This time for sure. +Wed Jul 30 19:53:52 1997 Arnold D. Robbins + + * Close-on-exec changes: + gawkmisc.c: (os_close_on_exec, os_isdir): new functions. + Thu May 15 12:49:08 1997 Arnold D. Robbins * Release 3.0.3: Release tar file made. diff -urN gawk-3.1.1/posix/gawkmisc.c gawk-3.1.2/posix/gawkmisc.c --- gawk-3.1.1/posix/gawkmisc.c 2002-04-16 14:58:41.000000000 +0300 +++ gawk-3.1.2/posix/gawkmisc.c 2003-03-06 11:26:20.000000000 +0200 @@ -1,6 +1,6 @@ /* gawkmisc.c --- miscellaneous gawk routines that are OS specific. - Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001, 2002 the Free Software Foundation, Inc. + Copyright (C) 1986, 1988, 1989, 1991 - 1998, 2001 - 2003 the Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -62,14 +62,63 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +/* + * Enhance this for debugging purposes, as follows: + * + * Always stat the file, stat buffer is used by higher-level code. + * + * if (AWKBUFSIZE == "exact") + * return the file size + * else if (AWKBUFSIZE == a number) + * always return that number + * else + * if the size is < default_blocksize + * return the size + * else + * return default_blocksize + * end if + * endif + * + * Hair comes in an effort to only deal with AWKBUFSIZE + * once, the first time this routine is called, instead of + * every time. Performance, dontyaknow. + */ + +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; { + char *val; + static size_t env_val = 0; + static short first = TRUE; + static short exact = FALSE; + /* force all members to zero in case OS doesn't use all of them. */ memset(stb, '\0', sizeof(struct stat)); + /* always stat, in case stb is used by higher level code. */ + if (fstat(fd, stb) == -1) + fatal("can't stat fd %d (%s)", fd, strerror(errno)); + + if (first) { + first = FALSE; + + if ((val = getenv("AWKBUFSIZE")) != NULL) { + if (strcmp(val, "exact") == 0) + exact = TRUE; + else if (ISDIGIT(*val)) { + for (; *val && ISDIGIT(*val); val++) + env_val = (env_val * 10) + *val - '0'; + + return env_val; + } + } + } else if (! exact && env_val > 0) + return env_val; + /* else + fall through */ + /* * System V.n, n < 4, doesn't have the file system block size in the * stat structure. So we have to make some sort of reasonable @@ -77,16 +126,17 @@ * meant for in the first place. */ #ifdef HAVE_ST_BLKSIZE -#define DEFBLKSIZE (stb->st_blksize ? stb->st_blksize : BUFSIZ) +#define DEFBLKSIZE (stb->st_blksize > 0 ? stb->st_blksize : BUFSIZ) #else #define DEFBLKSIZE BUFSIZ #endif - if (fstat(fd, stb) == -1) - fatal("can't stat fd %d (%s)", fd, strerror(errno)); - if (S_ISREG(stb->st_mode) - && 0 < stb->st_size && stb->st_size < DEFBLKSIZE) /* small file */ - return stb->st_size; + if (S_ISREG(stb->st_mode) /* regular file */ + && 0 < stb->st_size /* non-zero size */ + && (stb->st_size < DEFBLKSIZE /* small file */ + || exact)) /* or debugging */ + return stb->st_size; /* use file size */ + return DEFBLKSIZE; } diff -urN gawk-3.1.1/profile.c gawk-3.1.2/profile.c --- gawk-3.1.1/profile.c 2002-04-16 14:58:49.000000000 +0300 +++ gawk-3.1.2/profile.c 2003-02-28 10:47:00.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1999-2002 the Free Software Foundation, Inc. + * Copyright (C) 1999-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -36,7 +36,7 @@ static void parenthesize P((NODETYPE parent_type, NODE *tree)); static void eval_condition P((NODE *tree)); static void pp_op_assign P((NODE *tree)); -static void pp_func_call P((NODE *name, NODE *arg_list)); +static void pp_func_call P((NODE *tree)); static void pp_match_op P((NODE *tree)); static void pp_lhs P((NODE *ptr)); static void pp_print_stmt P((const char *command, NODE *tree)); @@ -45,11 +45,11 @@ static void pp_getline P((NODE *tree)); static void pp_builtin P((NODE *tree)); static void pp_list P((NODE *tree)); -static void pp_string P((char *str, size_t len, int delim)); +static void pp_string P((const char *str, size_t len, int delim)); static int is_scalar P((NODETYPE type)); static int prec_level P((NODETYPE type)); #ifdef PROFILING -static RETSIGTYPE dump_and_exit P((int signum)); +static RETSIGTYPE dump_and_exit P((int signum)) ATTRIBUTE_NORETURN; static RETSIGTYPE just_dump P((int signum)); #endif @@ -69,11 +69,8 @@ /* init_profiling --- do needed initializations, see also main.c */ void -init_profiling(int *flag, const char *def_file) +init_profiling(int *flag ATTRIBUTE_UNUSED, const char *def_file ATTRIBUTE_UNUSED) { - /* run time init avoids glibc innovations */ - prof_fp = stderr; - #ifdef PROFILING if (*flag == FALSE) { *flag = TRUE; @@ -138,7 +135,7 @@ /* indent_in --- increase the level, with error checking */ static void -indent_in() +indent_in(void) { assert(indent_level >= 0); indent_level++; @@ -147,7 +144,7 @@ /* indent_out --- decrease the level, with error checking */ static void -indent_out() +indent_out(void) { indent_level--; assert(indent_level >= 0); @@ -320,6 +317,8 @@ indent(SPACEOVER); fprintf(prof_fp, "}\n"); break; +#undef hakvar +#undef arrvar case Node_K_break: indent(tree->exec_count); @@ -332,6 +331,7 @@ break; case Node_K_print: + case Node_K_print_rec: pp_print_stmt("print", tree); break; @@ -447,7 +447,7 @@ return; case Node_func_call: - pp_func_call(tree->rnode, tree->lnode); + pp_func_call(tree); return; case Node_K_getline: @@ -455,8 +455,29 @@ return; case Node_K_delete_loop: - fprintf(prof_fp, "delete "); - tree_eval(tree->lnode); + { + char *aname; + NODE *t; + + t = tree->lnode; + if (t->type == Node_param_list) + aname = fparms[t->param_cnt]; + else + aname = t->vname; + + fprintf(prof_fp, "for ("); + pp_lhs(tree->rnode->lnode); + fprintf(prof_fp, " in %s) { %s %s'\n", aname, + _("# treated internally as `delete'"), aname); + indent_in(); + indent(SPACEOVER); + fprintf(prof_fp, "delete %s[", aname); + pp_lhs(tree->rnode->lnode); + fprintf(prof_fp, "]\n"); + indent_out(); + indent(SPACEOVER); + fprintf(prof_fp, "}"); + } return; /* unary operations */ @@ -550,11 +571,6 @@ pp_match_op(tree); return; - case Node_func: - fatal(_("function `%s' called with space between name and `(',\n%s"), - tree->lnode->param, - _("or used in other expression context")); - /* assignments */ case Node_assign: tree_eval(tree->lnode); @@ -629,10 +645,6 @@ case Node_minus: fprintf(prof_fp, " - "); break; - case Node_var_array: - fatal(_("attempt to use array `%s' in a scalar context"), - tree->vname); - return; default: fatal(_("illegal type (%s) in tree_eval"), nodetype2str(tree->type)); } @@ -672,7 +684,7 @@ static void pp_op_assign(register NODE *tree) { - char *op = NULL; + const char *op = NULL; enum Order { NA = 0, PRE = 1, @@ -838,10 +850,7 @@ case Node_subscript: n = ptr->lnode; - if (n->type == Node_func) { - fatal(_("attempt to use function `%s' as array"), - n->lnode->param); - } else if (n->type == Node_param_list) { + if (n->type == Node_param_list) { fprintf(prof_fp, "%s[", fparms[n->param_cnt]); } else fprintf(prof_fp, "%s[", n->vname); @@ -852,10 +861,6 @@ fprintf(prof_fp, "]"); break; - case Node_func: - fatal(_("`%s' is a function, assignment is not allowed"), - ptr->lnode->param); - case Node_builtin: fatal(_("assignment is not allowed to result of builtin function")); @@ -870,8 +875,8 @@ pp_match_op(register NODE *tree) { register NODE *re; - char *op; - char *restr; + const char *op; + const char *restr; size_t relen; NODE *text = NULL; @@ -910,7 +915,7 @@ static void pp_redir(register NODE *tree, enum redir_placement dir) { - char *op = "[BOGUS]"; /* should never be seen */ + const char *op = "[BOGUS]"; /* should never be seen */ if (tree == NULL) return; @@ -984,14 +989,21 @@ indent(tree->exec_count); fprintf(prof_fp, "%s", command); - if (redir != NULL) { /* parenthesize if have a redirection */ - fprintf(prof_fp, "("); - pp_list(tree->lnode); - fprintf(prof_fp, ")"); + if (redir != NULL) { + if (tree->lnode != NULL) { + /* parenthesize if have a redirection and a list */ + fprintf(prof_fp, "("); + pp_list(tree->lnode); + fprintf(prof_fp, ")"); + } else + fprintf(prof_fp, " $0"); pp_redir(redir, AFTER); } else { fprintf(prof_fp, " "); - pp_list(tree->lnode); + if (tree->lnode != NULL) + pp_list(tree->lnode); + else + fprintf(prof_fp, "$0"); } fprintf(prof_fp, "\n"); } @@ -1076,16 +1088,23 @@ static void pp_builtin(register NODE *tree) { - fprintf(prof_fp, "%s(", getfname(tree->proc)); - pp_list(tree->subnode); + const char *func = getfname(tree->builtin); + + fprintf(prof_fp, "%s(", func ? func : "extension_function"); + if (func) + pp_list(tree->subnode); fprintf(prof_fp, ")"); } /* pp_func_call --- print a function call */ static void -pp_func_call(NODE *name, NODE *arglist) +pp_func_call(NODE *tree) { + NODE *name, *arglist; + + name = tree->rnode; + arglist = tree->lnode; fprintf(prof_fp, "%s(", name->stptr); pp_list(arglist); fprintf(prof_fp, ")"); @@ -1136,7 +1155,7 @@ /* pp_func --- pretty print a function */ void -pp_func(char *name, size_t namelen, NODE *f) +pp_func(const char *name, size_t namelen, NODE *f) { int j; char **pnames; @@ -1167,7 +1186,7 @@ /* pp_string --- pretty print a string or regex constant */ static void -pp_string(char *str, size_t len, int delim) +pp_string(const char *str, size_t len, int delim) { pp_string_fp(prof_fp, str, len, delim, FALSE); } @@ -1180,7 +1199,7 @@ */ void -pp_string_fp(FILE *fp, char *in_str, size_t len, int delim, int breaklines) +pp_string_fp(FILE *fp, const char *in_str, size_t len, int delim, int breaklines) { static char escapes[] = "\b\f\n\r\t\v\\"; static char printables[] = "bfnrtv\\"; @@ -1188,7 +1207,7 @@ int i; int count; #define BREAKPOINT 70 /* arbitrary */ - unsigned char *str = (unsigned char *) in_str; + const unsigned char *str = (const unsigned char *) in_str; fprintf(fp, "%c", delim); for (count = 0; len > 0; len--, str++) { diff -urN gawk-3.1.1/random.c gawk-3.1.2/random.c --- gawk-3.1.1/random.c 2001-11-18 11:55:29.000000000 +0200 +++ gawk-3.1.2/random.c 2002-11-01 11:06:39.000000000 +0200 @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95"; +static const char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95"; #endif /* LIBC_SCCS and not lint */ #include "random.h" /* gawk addition */ diff -urN gawk-3.1.1/random.h gawk-3.1.2/random.h --- gawk-3.1.1/random.h 2001-04-19 16:21:45.000000000 +0300 +++ gawk-3.1.2/random.h 2002-11-01 11:07:41.000000000 +0200 @@ -39,4 +39,4 @@ #define __P(s) () #endif -extern long random(); +extern long random __P((void)); diff -urN gawk-3.1.1/re.c gawk-3.1.2/re.c --- gawk-3.1.1/re.c 2002-04-16 14:58:58.000000000 +0300 +++ gawk-3.1.2/re.c 2003-02-24 13:28:17.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1991-2002 the Free Software Foundation, Inc. + * Copyright (C) 1991-2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -30,13 +30,13 @@ /* make_regexp --- generate compiled regular expressions */ Regexp * -make_regexp(char *s, size_t len, int ignorecase, int dfa) +make_regexp(const char *s, size_t len, int ignorecase) { Regexp *rp; const char *rerr; - char *src = s; + const char *src = s; char *temp; - char *end = s + len; + const char *end = s + len; register char *dest; register int c, c2; #ifdef MBS_SUPPORT @@ -44,7 +44,8 @@ It is 0, when the current character is a singlebyte character. */ size_t is_multibyte = 0; mbstate_t mbs; - if (MB_CUR_MAX > 1) + + if (gawk_mb_cur_max > 1) memset(&mbs, 0, sizeof(mbstate_t)); /* Initialize. */ #endif @@ -60,7 +61,7 @@ while (src < end) { #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1 && !is_multibyte) { + if (gawk_mb_cur_max > 1 && !is_multibyte) { /* The previous byte is a singlebyte character, or last byte of a multibyte character. We check the next character. */ is_multibyte = mbrlen(src, end - src, &mbs); @@ -72,13 +73,13 @@ } #endif + if ( #ifdef MBS_SUPPORT /* We skip multibyte character, since it must not be a special character. */ - if ((MB_CUR_MAX == 1 || !is_multibyte) && (*src == '\\')) { -#else - if (*src == '\\') { + (gawk_mb_cur_max == 1 || ! is_multibyte) && #endif + (*src == '\\')) { c = *++src; switch (c) { case 'a': @@ -133,10 +134,10 @@ } else *dest++ = *src++; /* not '\\' */ #ifdef MBS_SUPPORT - if (MB_CUR_MAX > 1 && is_multibyte) + if (gawk_mb_cur_max > 1 && is_multibyte) is_multibyte--; #endif - } /* for */ + } /* while */ *dest = '\0' ; /* Only necessary if we print dest ? */ emalloc(rp, Regexp *, sizeof(*rp), "make_regexp"); @@ -150,68 +151,50 @@ rp->pat.translate = NULL; len = dest - temp; if ((rerr = re_compile_pattern(temp, len, &(rp->pat))) != NULL) - fatal("%s: /%s/", gettext(rerr), temp); + fatal("%s: /%s/", rerr, temp); /* rerr already gettextized inside regex routines */ /* gack. this must be done *after* re_compile_pattern */ rp->pat.newline_anchor = FALSE; /* don't get \n in middle of string */ - if (dfa && ! ignorecase) { - dfacomp(temp, len, &(rp->dfareg), TRUE); - rp->dfa = TRUE; - } else - rp->dfa = FALSE; free(temp); return rp; } -/* research --- do a regexp search. use dfa if possible */ +/* research --- do a regexp search */ int -research(Regexp *rp, register char *str, int start, +research(Regexp *rp, register const char *str, int start, register size_t len, int need_start) { - char *ret = str; - int try_backref; + const char *ret = str; - /* - * Always do dfa search if can; if it fails, then even if - * need_start is true, we won't bother with the regex search. - */ - if (rp->dfa) { - char save; - int count = 0; + if (ret) { + /* + * Passing NULL as last arg speeds up search for cases + * where we don't need the start/end info. + */ + int res = re_search(&(rp->pat), str, start+len, + start, len, need_start ? &(rp->regs) : NULL); /* - * dfa likes to stick a '\n' right after the matched - * text. So we just save and restore the character. + * A return of -2 indicates that a heuristic in + * regex decided it might allocate too much memory + * on the C stack. This doesn't apply to gawk, which + * uses REGEX_MALLOC. This is dealt with by the + * assignment to re_max_failures in resetup(). + * Naetheless, we keep this code here as a fallback. + * + * XXX: The above comment is obsolete; the new regex + * doesn't have an re_max_failures variable. But we + * keep the code here just in case. */ - save = str[start+len]; - ret = dfaexec(&(rp->dfareg), str+start, str+start+len, TRUE, - &count, &try_backref); - str[start+len] = save; - } - if (ret) { - if (need_start || rp->dfa == FALSE || try_backref) { - int res = re_search(&(rp->pat), str, start+len, - start, len, &(rp->regs)); - - /* - * A return of -2 indicates that a heuristic in - * regex decided it might allocate too much memory - * on the C stack. This doesn't apply to gawk, which - * uses REGEX_MALLOC. This is dealt with by the - * assignment to re_max_failures in resetup(). - * Naetheless, we keep this code here as a fallback. - */ - if (res == -2) { - /* the 10 here is arbitrary */ - fatal(_("regex match failed, not enough memory to match string \"%.*s%s\""), - len > 10 ? 10 : len, str + start, - len > 10 ? "..." : ""); - } - return res; - } else - return 1; + if (res == -2) { + /* the 10 here is arbitrary */ + fatal(_("regex match failed, not enough memory to match string \"%.*s%s\""), + (int) (len > 10 ? 10 : len), str + start, + len > 10 ? "..." : ""); + } + return res; } else return -1; } @@ -221,25 +204,22 @@ void refree(Regexp *rp) { - free(rp->pat.buffer); - free(rp->pat.fastmap); + /* + * This isn't malloced, don't let regfree free it. + * (This is strictly necessary only for the old + * version of regex, but it's a good idea to keep it + * here in case regex internals change in the future.) + */ + rp->pat.translate = NULL; + + regfree(& rp->pat); if (rp->regs.start) free(rp->regs.start); if (rp->regs.end) free(rp->regs.end); - if (rp->dfa) - dfafree(&(rp->dfareg)); free(rp); } -/* dfaerror --- print an error message for the dfa routines */ - -void -dfaerror(const char *s) -{ - fatal("%s", s); -} - /* re_update --- recompile a dynamic regexp */ Regexp * @@ -265,10 +245,6 @@ } if (t->re_reg != NULL) refree(t->re_reg); - if (t->re_cnt > 0) - t->re_cnt++; - if (t->re_cnt > 10) - t->re_cnt = 0; if (t->re_text == NULL || (t->re_flags & CASE) != IGNORECASE) { t1 = force_string(tree_eval(t->re_exp)); unref(t->re_text); @@ -276,7 +252,7 @@ free_temp(t1); } t->re_reg = make_regexp(t->re_text->stptr, t->re_text->stlen, - IGNORECASE, t->re_cnt); + IGNORECASE); t->re_flags &= ~CASE; t->re_flags |= IGNORECASE; return t->re_reg; @@ -302,69 +278,43 @@ syn |= RE_INTERVALS; (void) re_set_syntax(syn); - dfasyntax(syn, FALSE, '\n'); -} - -/* avoid_dfa --- FIXME: temporary kludge function until we have a new dfa.c */ - -int -avoid_dfa(NODE *re, char *str, size_t len) -{ - char *restr; - int relen; - int anchor, i; - char *end; - - if ((re->re_flags & CONST) != 0) { - restr = re->re_exp->stptr; - relen = re->re_exp->stlen; - } else { - restr = re->re_text->stptr; - relen = re->re_text->stlen; - } - - for (anchor = FALSE, i = 0; i < relen; i++) { - if (restr[i] == '^' || restr[i] == '$') { - anchor = TRUE; - break; - } - } - if (! anchor) - return FALSE; - - for (end = str + len; str < end; str++) - if (*str == '\n') - return TRUE; - - return FALSE; } /* reisstring --- return TRUE if the RE match is a simple string match */ int -reisstring(char *text, size_t len, Regexp *re, char *buf) +reisstring(const char *text, size_t len, Regexp *re, const char *buf) { static char metas[] = ".*+(){}[]|?^$\\"; int i; - int has_meta = FALSE; int res; - char *matched; + const char *matched; /* simple checking for has meta characters in re */ for (i = 0; i < len; i++) { if (strchr(metas, text[i]) != NULL) { - has_meta = TRUE; - break; + return FALSE; /* give up early, can't be string match */ } } /* make accessable to gdb */ matched = &buf[RESTART(re, buf)]; - if (has_meta) - return FALSE; /* give up early, can't be string match */ - res = STREQN(text, matched, len); return res; } + +/* remaybelong --- return TRUE if the RE contains * ? | + */ + +int +remaybelong(const char *text, size_t len) +{ + while (len--) { + if (strchr("*+|?", *text++) != NULL) { + return TRUE; + } + } + + return FALSE; +} diff -urN gawk-3.1.1/regex.h gawk-3.1.2/regex.h --- gawk-3.1.1/regex.h 2002-04-16 14:59:19.000000000 +0300 +++ gawk-3.1.2/regex.h 2003-02-25 11:58:52.000000000 +0200 @@ -1,20 +1,23 @@ /* Definitions for data structures and routines for the regular - expression library, version 0.12. - Copyright (C) 1985,89,90,91,92,93,95,96,97,98,2002 Free Software Foundation, Inc. + expression library. + Copyright (C) 1985,1989-93,1995-98,2000,2001,2002 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, + The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ #ifndef _REGEX_H #define _REGEX_H 1 @@ -156,6 +159,15 @@ this bit set, and it won't affect anything in the normal case. */ #define RE_DEBUG (RE_NO_GNU_OPS << 1) +/* If this bit is set, a syntactically invalid interval is treated as + a string of ordinary characters. For example, the ERE 'a{1' is + treated as 'a\{1'. */ +#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) + /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is stored in the pattern buffer, so changing this does not affect @@ -177,7 +189,8 @@ #define RE_SYNTAX_GNU_AWK \ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \ - & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS)) + & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ + | RE_CONTEXT_INVALID_OPS )) #define RE_SYNTAX_POSIX_AWK \ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ @@ -195,7 +208,8 @@ | RE_NO_BK_VBAR) #define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ + | RE_INVALID_INTERVAL_ORD) /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC @@ -217,13 +231,13 @@ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) #define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ - | RE_UNMATCHED_RIGHT_PAREN_ORD) + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS - replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is + removed and RE_NO_BK_REFS is added. */ #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ @@ -509,13 +523,37 @@ # endif #endif +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". */ +#ifndef __restrict +# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)) +# if defined restrict || 199901L <= __STDC_VERSION__ +# define __restrict restrict +# else +# define __restrict +# endif +# elif defined __APPLE_CC__ +# define __restrict +# endif +#endif +/* gcc 3.1 and up support the [restrict] syntax. */ +#ifndef __restrict_arr +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# define __restrict_arr __restrict +# else +# define __restrict_arr +# endif +#endif + /* POSIX compatibility. */ -extern int regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern, +extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, + const char *__restrict __pattern, int __cflags)); -extern int regexec _RE_ARGS ((const regex_t *__preg, - const char *__string, size_t __nmatch, - regmatch_t __pmatch[], int __eflags)); +extern int regexec _RE_ARGS ((const regex_t *__restrict __preg, + const char *__restrict __string, size_t __nmatch, + regmatch_t __pmatch[__restrict_arr], + int __eflags)); extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg, char *__errbuf, size_t __errbuf_size)); diff -urN gawk-3.1.1/test/ChangeLog gawk-3.1.2/test/ChangeLog --- gawk-3.1.1/test/ChangeLog 2002-05-01 16:42:14.000000000 +0300 +++ gawk-3.1.2/test/ChangeLog 2003-03-19 14:56:02.000000000 +0200 @@ -1,3 +1,227 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Wed Mar 19 14:00:00 2003 Arnold D. Robbins + + * Makefile.am (synerr1): New test. + * synerr1.awk, synerr1.ok: New files. + +Tue Mar 4 10:32:23 2003 Arnold D. Robbins + + * Makefile.am (clean): Remove `core*' for modern Linux which + drops core in `core.PID' files. + +2003-02-17 Jim Meyering + + * Makefile.am (check): Don't depend on the pass-fail rule that + reports any failures. Otherwise, `make -j' that rule's commands + could run before all tests had completed, resulting in spurious + failures or potentially, even unreported failures. Instead, just + `$(MAKE) pass-fail'. + +Sun Feb 9 11:48:32 2003 Arnold D. Robbins + + * Makefile.am: Moved `space' into UNIX_TESTS. Breaks in + MS environments. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Tue Feb 4 12:22:41 2003 Arnold D. Robbins + + * Makefile.am (fnmisc): New test case. + * fnmisc.awk, fnmisc.ok: New files. + +Sun Feb 2 15:33:33 2003 Stepan Kasal + + * getline3.awk, getline3.ok: Renamed from getline2.awk, getline2.ok + * Makefile.am (getline, getline2): getline renamed to getline2, + new test under the name getline. + * getline.awk, getline.ok, getline2.awk, getline2.ok: + rename getline.* getline2.*; new files getline.* . + * getline.awk, getline.ok: add tests for ``cmd | getline '' + * Makefile.am (printf0): New test. + * printf0.awk, printf0.ok: New files. + * fnarray.ok: The error message has changed. + +Thu Jan 30 15:32:56 2003 Stepan Kasal + + * Makefile.am (splitarr, getline2, inputred, prec): New tests. + * splitarr.awk, splitarr.ok: New files. + * getline2.awk, getline2.ok: New files. + * inputred.awk, inputred.ok: New files. + * prec.awk, prec.ok: New files. + * noeffect.awk: add second no-effect command; two error messages + should be generated. Add some empty statements, to check that --lint + doesn't abort on them. + +Tue Jan 28 18:34:22 2003 Arnold D. Robbins + + * arrymem1.awk: Enhanced test. + * arrayme1.ok: Updated for new output + +Mon Jan 27 14:07:16 2003 Stepan Kasal + + * nfldstr.awk: Add tests for automatic number conversion. + +Mon Jan 27 12:25:41 2003 Arnold D. Robbins + + * Makefile.am (asort, asorti, match1): New tests. + * match1.awk, match1.in: New files. + * asort.awk, asort.in: New files. + * asorti.awk, asorti.in: New files. + +Mon Jan 27 12:10:16 2003 Stepan Kasal + + * strtod.awk, strtod.in, strtod.ok: Added test for 0e0 and similar. + +Sun Jan 26 16:49:41 2003 Arnold D. Robbins + + * Makefile.am (zeroe0): New test. + * zeroe0.awk, zeroe0.in: New files. + +Thu Jan 2 11:09:12 2003 Arnold D. Robbins + + * parseme.ok, noparms.ok: Revised for bison 1.875. + +Tue Dec 31 16:54:44 2002 Arnold D. Robbins + + * Makefile.am: (poundbang): Fix code. + (efence): New target to remove _* files run with Electric Fence + but that are otherwise OK. + +Thu Dec 26 16:44:37 2002 Arnold D. Robbins + + * Makefile.am (poundbang): Add code to handle systems with limits on + paths for #! files. + +Mon Dec 9 14:20:44 2002 Stepan Kasal + + * Makefile.am (space): New test: ``gawk -f " " file'' should try + to include file ` '. + +Sun Nov 17 21:47:11 2002 Arnold D. Robbins + + * Makefile.am (manyfiles): Reference $(srcdir)/$@.ok so can build + and test in a different directory. + +Sun Nov 3 14:47:59 2002 Arnold D. Robbins + + Move tests with inline input and/or programs into separate files so can let + Gentests do more work. Per Nelson Beebe, just print the name of each test. + + * Makefile.am (fstabplus, longwrds, fieldwdth, ignrcase, posix, rs, fsbs): + removed targets so will be generated by Gentests. + (negexp, resplit, childin, back89, nfldstr, nondec): ditto. + * Gentests: print name of test, make cmp not echo by prefixing with @. + * fstabplus.in: new file. + * fieldwdth.awk, fieldwdth.in: new files. + * ignrcase.awk, ignrcase.in: new files. + * longwrds.awk: send output to sort instead of letting makefile do it. + * longwrds.in: renamed from manpage. + * posix.in: new file. + * manyfiles.ok: new file. + * rs.awk: new file. + * fsbs.awk: new file. + * negexp.awk: new file. + * resplit.awk, resplit.in: new files. + * childin.awk, childin.in: new files. + * back89.awk: new file. + * nfldstr.awk, nfldstr.in: new files. + +Sun Nov 3 14:37:39 2002 Arnold D. Robbins + + * Makefile.am (uninit2): new test case, requires lint. + * uninit2.awk, uninit2.ok: new files. + +Fri Nov 1 11:34:45 2002 Arnold D. Robbins + + * Makefile.am (nondec): Always run this test. + +Tue Oct 29 10:40:47 2002 Arnold D. Robbins + + * Makefile.am (EXTRA_DIST): Added Gentests to list of files + to distribute. + +Mon Oct 28 15:36:42 2002 Arnold D. Robbins + + * Makefile.am (icasers, icasefs, rstest1, rstest2): new test cases. + (argarray): Remove argarray.in if not in srcdir. + * icasers.awk, icasers.in, icasers.ok: new files. + * icasefs.awk, icasefs.ok: new files. + * rstest1.awk, rstest1.ok: new files. + * rstest2.awk, rstest2.ok: new files. + +Mon Oct 28 12:25:25 2002 Stepan Kasal + + * Makefile.am (uninitialized): New test. + * uninitialized.awk, uninitialized.ok: New files. + +Mon Oct 28 11:24:16 2002 Stepan Kasal + + * Gentests: new script + * Maketests: new file, generated automatically by Gentests + * Makefile.am: new rules and variables to make use of Gentests; + Most targets removed, Gentests will take care + +Sun Oct 13 16:58:07 2002 Stepan Kasal + + * Makefile.am (nfneg): new test case. + * nfneg.awk, nfneg.ok: new files. + +Mon Oct 7 09:38:07 2002 Arnold D. Robbins + + * Makefile.am (noloop1, noloop2): new test cases. + * noloop.awk, noloop1.in, noloop1.ok, noloop2.in, noloop2.ok: + new files. + +Tue Oct 1 18:28:40 2002 Arnold D. Robbins + + * Makefile.am (poundbang): Rewrote rule to avoid problems + with hardcoding of /tmp pathname. + (poundbang.awk): Changed the way it works. + (poundbang.ok): Removed. + +Thu Sep 5 13:31:28 2002 Arnold D. Robbins + + * Makefile.am (rebuf): new test case. + * rebuf.awk, rebuf.in, rebuf.ok: new files. + +Wed Aug 21 15:31:57 2002 Andreas Buening + + * Makefile.am (AWKPROG): Add $(EXEEXT) macro. + (PATH_SEPERATOR): Removed. + (poundbag): Added $(EXEEXT) and use of ${TMPDIR-/tmp}. + +Wed Aug 7 13:47:09 2002 Arnold D. Robbins + + * Makefile.am (nulrsend): new test case. + * nulrsend.awk, nulrsend.in, nulrsend.ok: new files. + +Sun Aug 4 00:25:23 2002 Arnold D. Robbins + + * Makefile.am (gsubtst3, gsubtst4): new test cases. + * gsubtst3.awk, gsubtst3.ok, gsubtst4.awk, gsubtst4.ok: new files. + +Thu May 9 22:31:36 2002 Arnold D. Robbins + + * Makefile.am (gsubtst2): new test case. + * gsubtest.awk, gsubtest.ok: Added new test. + * gsubtst2.awk, gsubtst2.ok: new files. + +Sun May 5 12:38:55 2002 Arnold D. Robbins + + * Makefile.am: Minor mods to use LC_ALL=C so that checks will + use the English messages, not any translations. + (manyfiles): Fixed (hopefully) to leave a file around if the + test fails, so that we don't get a spurious "ALL TESTS PASSED" + message. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/test/arrayparm.ok gawk-3.1.2/test/arrayparm.ok --- gawk-3.1.1/test/arrayparm.ok 1997-12-13 21:24:21.000000000 +0200 +++ gawk-3.1.2/test/arrayparm.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: arrayparm.awk:18: fatal: attempt to use array `i (from foo)' in a scalar context +EXIT CODE: 2 diff -urN gawk-3.1.1/test/arrymem1.awk gawk-3.1.2/test/arrymem1.awk --- gawk-3.1.1/test/arrymem1.awk 2001-08-04 23:40:30.000000000 +0300 +++ gawk-3.1.2/test/arrymem1.awk 2003-01-28 18:33:21.000000000 +0200 @@ -40,14 +40,20 @@ } function f1(Procs,a) { - a[""] + # a[""] + a[""] = "a" # ADR: Give it a value so can trace it f2() } function f2() { - b[""] + # b[""] + b[""] = "b" # ADR: Give it a value so can trace it } + # ADR: 1/28/2003: Added this: + BEGIN { for (i in b) printf("b[\"%s\"] = \"%s\"\n", i, b[i]) } + # END ADR added. + # gives: # # gawk: ./gtest:5: fatal error: internal error diff -urN gawk-3.1.1/test/arrymem1.ok gawk-3.1.2/test/arrymem1.ok --- gawk-3.1.1/test/arrymem1.ok 2001-08-04 23:40:46.000000000 +0300 +++ gawk-3.1.2/test/arrymem1.ok 2003-01-28 18:34:00.000000000 +0200 @@ -1 +1,2 @@ test +b[""] = "b" diff -urN gawk-3.1.1/test/asort.awk gawk-3.1.2/test/asort.awk --- gawk-3.1.1/test/asort.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/asort.awk 2003-01-14 15:04:45.000000000 +0200 @@ -0,0 +1,25 @@ +function init(a) +{ + a[1] = "aardvark" + a[2] = "animal" + a[3] = "zebra" + a[4] = "zoo" + a[5] = "Iguana" + a[6] = "Alligator" + a[7] = "Nouns" + a[8] = "people" +} + +BEGIN { + + for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { + init(a) + + n = asort(a) + + for (i = 1; i <= n; i++) + printf("a[%d] = \"%s\"\n", i, a[i]) + + print "============" + } +} diff -urN gawk-3.1.1/test/asort.ok gawk-3.1.2/test/asort.ok --- gawk-3.1.1/test/asort.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/asort.ok 2003-01-27 12:27:25.000000000 +0200 @@ -0,0 +1,18 @@ +a[1] = "Alligator" +a[2] = "Iguana" +a[3] = "Nouns" +a[4] = "aardvark" +a[5] = "animal" +a[6] = "people" +a[7] = "zebra" +a[8] = "zoo" +============ +a[1] = "aardvark" +a[2] = "Alligator" +a[3] = "animal" +a[4] = "Iguana" +a[5] = "Nouns" +a[6] = "people" +a[7] = "zebra" +a[8] = "zoo" +============ diff -urN gawk-3.1.1/test/asorti.awk gawk-3.1.2/test/asorti.awk --- gawk-3.1.1/test/asorti.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/asorti.awk 2003-01-26 10:48:51.000000000 +0200 @@ -0,0 +1,27 @@ +function init(a) +{ + delete a + + a["aardvark"] = 1 + a["animal"] = 2 + a["zebra"] = 3 + a["zoo"] = 4 + a["Iguana"] = 5 + a["Alligator"] = 6 + a["Nouns"] = 7 + a["people"] = 8 +} + +BEGIN { + + for (IGNORECASE = 0; IGNORECASE < 2; IGNORECASE++) { + init(a) + + n = asorti(a) + + for (i = 1; i <= n; i++) + printf("a[%d] = \"%s\"\n", i, a[i]) + + print "============" + } +} diff -urN gawk-3.1.1/test/asorti.ok gawk-3.1.2/test/asorti.ok --- gawk-3.1.1/test/asorti.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/asorti.ok 2003-01-27 12:27:31.000000000 +0200 @@ -0,0 +1,18 @@ +a[1] = "Alligator" +a[2] = "Iguana" +a[3] = "Nouns" +a[4] = "aardvark" +a[5] = "animal" +a[6] = "people" +a[7] = "zebra" +a[8] = "zoo" +============ +a[1] = "aardvark" +a[2] = "Alligator" +a[3] = "animal" +a[4] = "Iguana" +a[5] = "Nouns" +a[6] = "people" +a[7] = "zebra" +a[8] = "zoo" +============ diff -urN gawk-3.1.1/test/back89.awk gawk-3.1.2/test/back89.awk --- gawk-3.1.1/test/back89.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/back89.awk 2002-11-03 15:13:17.000000000 +0200 @@ -0,0 +1 @@ +/a\8b/ diff -urN gawk-3.1.1/test/childin.awk gawk-3.1.2/test/childin.awk --- gawk-3.1.1/test/childin.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/childin.awk 2002-11-03 15:09:05.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { "cat" | getline; print; close("cat") } diff -urN gawk-3.1.1/test/childin.in gawk-3.1.2/test/childin.in --- gawk-3.1.1/test/childin.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/childin.in 2002-11-03 15:08:52.000000000 +0200 @@ -0,0 +1 @@ +hi diff -urN gawk-3.1.1/test/defref.ok gawk-3.1.2/test/defref.ok --- gawk-3.1.1/test/defref.ok 1995-11-30 16:41:24.000000000 +0200 +++ gawk-3.1.2/test/defref.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1,2 +1,3 @@ gawk: defref.awk:2: warning: function `foo' called but never defined gawk: defref.awk:1: fatal: function `foo' not defined +EXIT CODE: 2 diff -urN gawk-3.1.1/test/fieldwdth.awk gawk-3.1.2/test/fieldwdth.awk --- gawk-3.1.1/test/fieldwdth.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fieldwdth.awk 2002-11-03 14:51:58.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { FIELDWIDTHS = "2 3 4" } +{ print $2 } diff -urN gawk-3.1.1/test/fieldwdth.in gawk-3.1.2/test/fieldwdth.in --- gawk-3.1.1/test/fieldwdth.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fieldwdth.in 2002-11-03 14:52:15.000000000 +0200 @@ -0,0 +1 @@ +123456789 diff -urN gawk-3.1.1/test/fnamedat.ok gawk-3.1.2/test/fnamedat.ok --- gawk-3.1.1/test/fnamedat.ok 2000-06-27 15:37:13.000000000 +0300 +++ gawk-3.1.2/test/fnamedat.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: fnamedat.awk:1: (FILENAME=- FNR=1) fatal: can't use function name `foo' as variable or array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/fnarray.ok gawk-3.1.2/test/fnarray.ok --- gawk-3.1.1/test/fnarray.ok 1996-12-13 05:57:50.000000000 +0200 +++ gawk-3.1.2/test/fnarray.ok 2003-02-02 15:38:32.000000000 +0200 @@ -1 +1,3 @@ -gawk: fnarray.awk:5: fatal: attempt to use function `foo' as array +gawk: fnarray.awk:5: fatal: function `foo' called with space between name and `(', +or used as a variable or an array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/fnaryscl.ok gawk-3.1.2/test/fnaryscl.ok --- gawk-3.1.1/test/fnaryscl.ok 2000-11-06 17:49:11.000000000 +0200 +++ gawk-3.1.2/test/fnaryscl.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: fnaryscl.awk:10: fatal: attempt to use array `c (from b (from a (from foo)))' in a scalar context +EXIT CODE: 2 diff -urN gawk-3.1.1/test/fnasgnm.ok gawk-3.1.2/test/fnasgnm.ok --- gawk-3.1.1/test/fnasgnm.ok 2000-11-06 17:55:14.000000000 +0200 +++ gawk-3.1.2/test/fnasgnm.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: fnasgnm.awk:14: (FILENAME=- FNR=1) fatal: can't use function name `ShowMe' as variable or array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/fnmisc.awk gawk-3.1.2/test/fnmisc.awk --- gawk-3.1.1/test/fnmisc.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fnmisc.awk 2003-02-04 12:21:37.000000000 +0200 @@ -0,0 +1,13 @@ +# Tue Feb 4 12:20:10 IST 2003 + +# Misc functions tests, in case we start mucking around in the grammar again. + +# Empty body shouldn't hurt anything: +function f() {} +BEGIN { f() } + +# Using a built-in function name should manage the symbol table +# correctly: +function split(x) { return x } + +function x(a) { return a } diff -urN gawk-3.1.1/test/fnmisc.ok gawk-3.1.2/test/fnmisc.ok --- gawk-3.1.1/test/fnmisc.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fnmisc.ok 2003-02-04 12:22:34.000000000 +0200 @@ -0,0 +1,3 @@ +gawk: fnmisc.awk:11: function split(x) { return x } +gawk: fnmisc.awk:11: ^ `split' is a built-in function, it cannot be redefined +EXIT CODE: 1 diff -urN gawk-3.1.1/test/fsbs.awk gawk-3.1.2/test/fsbs.awk --- gawk-3.1.1/test/fsbs.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fsbs.awk 2002-11-03 15:02:23.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { FS = "\\" } +{ print $1, $2 } diff -urN gawk-3.1.1/test/fstabplus.in gawk-3.1.2/test/fstabplus.in --- gawk-3.1.1/test/fstabplus.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/fstabplus.in 2002-11-03 14:46:46.000000000 +0200 @@ -0,0 +1 @@ +1 2 diff -urN gawk-3.1.1/test/funsmnam.ok gawk-3.1.2/test/funsmnam.ok --- gawk-3.1.1/test/funsmnam.ok 2000-06-27 15:37:13.000000000 +0300 +++ gawk-3.1.2/test/funsmnam.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: funsmnam.awk:6: fatal: function `foo': can't use function name as parameter name +EXIT CODE: 2 diff -urN gawk-3.1.1/test/getline.awk gawk-3.1.2/test/getline.awk --- gawk-3.1.1/test/getline.awk 1993-10-20 02:08:00.000000000 +0200 +++ gawk-3.1.2/test/getline.awk 2003-02-02 15:20:20.000000000 +0200 @@ -1 +1,29 @@ -BEGIN { while( getline > 0) { print } } +BEGIN { + x = y = "s" + a = (getline x y) + print a, x + a = (getline x + 1) + print a, x + a = (getline x - 2) + print a, x + + cmd = "echo A" + a = (cmd | getline x y) + close(cmd) + print a, x + + cmd = "echo B" + a = (cmd | getline x + 1) + close(cmd) + print a, x + + cmd = "echo C" + a = (cmd | getline x - 2) + close(cmd) + print a, x + + cmd = "echo D" + a = cmd | getline x + close(cmd) + print a, x +} diff -urN gawk-3.1.1/test/getline.in gawk-3.1.2/test/getline.in --- gawk-3.1.1/test/getline.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/getline.in 2003-02-02 15:16:54.000000000 +0200 @@ -0,0 +1,3 @@ +A +B +C diff -urN gawk-3.1.1/test/getline.ok gawk-3.1.2/test/getline.ok --- gawk-3.1.1/test/getline.ok 1993-10-20 02:08:00.000000000 +0200 +++ gawk-3.1.2/test/getline.ok 2003-02-02 15:20:20.000000000 +0200 @@ -1,2 +1,7 @@ -BEGIN { while( getline > 0) { print } } -BEGIN { while( getline > 0) { print } } +1s A +2 B +-1 C +1s A +2 B +-1 C +1 D diff -urN gawk-3.1.1/test/getline2.awk gawk-3.1.2/test/getline2.awk --- gawk-3.1.1/test/getline2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/getline2.awk 2003-02-02 15:16:54.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { while( getline > 0) { print } } diff -urN gawk-3.1.1/test/getline2.ok gawk-3.1.2/test/getline2.ok --- gawk-3.1.1/test/getline2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/getline2.ok 2003-02-02 15:16:54.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { while( getline > 0) { print } } +BEGIN { while( getline > 0) { print } } diff -urN gawk-3.1.1/test/getline3.awk gawk-3.1.2/test/getline3.awk --- gawk-3.1.1/test/getline3.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/getline3.awk 2003-01-30 17:43:56.000000000 +0200 @@ -0,0 +1,7 @@ +BEGIN { + cmd = "echo 3" + y = 7 + cmd | getline x y + close(cmd) + print (cmd | getline x y) +} diff -urN gawk-3.1.1/test/getline3.ok gawk-3.1.2/test/getline3.ok --- gawk-3.1.1/test/getline3.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/getline3.ok 2003-01-30 17:44:06.000000000 +0200 @@ -0,0 +1 @@ +17 diff -urN gawk-3.1.1/test/gsubasgn.ok gawk-3.1.2/test/gsubasgn.ok --- gawk-3.1.1/test/gsubasgn.ok 1996-12-13 05:57:53.000000000 +0200 +++ gawk-3.1.2/test/gsubasgn.ok 2002-10-28 11:18:30.000000000 +0200 @@ -2,3 +2,4 @@ gawk: gsubasgn.awk:4: ^ gsub third parameter is not a changeable object gawk: gsubasgn.awk:8: function test2 () { gsub(/a/, "x", test2) } gawk: gsubasgn.awk:8: ^ gsub third parameter is not a changeable object +EXIT CODE: 1 diff -urN gawk-3.1.1/test/gsubtest.awk gawk-3.1.2/test/gsubtest.awk --- gawk-3.1.1/test/gsubtest.awk 1997-11-16 19:58:19.000000000 +0200 +++ gawk-3.1.2/test/gsubtest.awk 2002-05-09 22:34:18.000000000 +0300 @@ -5,4 +5,5 @@ str = "abc"; print gsub("c", "X", str), str str = "abc"; print gsub("c+", "X", str), str str = "abc"; print gsub("x*$", "X", str), str + str = "abc"; print gsub("b|$", "X", str), str } diff -urN gawk-3.1.1/test/gsubtest.ok gawk-3.1.2/test/gsubtest.ok --- gawk-3.1.1/test/gsubtest.ok 1997-11-16 19:58:26.000000000 +0200 +++ gawk-3.1.2/test/gsubtest.ok 2002-05-09 22:35:05.000000000 +0300 @@ -4,3 +4,4 @@ 1 abX 1 abX 1 abcX +2 aXcX diff -urN gawk-3.1.1/test/gsubtst2.awk gawk-3.1.2/test/gsubtst2.awk --- gawk-3.1.1/test/gsubtst2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst2.awk 2002-05-09 22:23:59.000000000 +0300 @@ -0,0 +1,241 @@ +#From arnold Thu May 9 17:27:03 2002 +#Return-Path: +#Received: (from arnold@localhost) +# by skeeve.com (8.11.6/8.11.6) id g49ER3K27925 +# for arnold; Thu, 9 May 2002 17:27:03 +0300 +#Date: Thu, 9 May 2002 17:27:03 +0300 +#From: Aharon Robbins +#Message-Id: <200205091427.g49ER3K27925@skeeve.com> +#To: arnold@skeeve.com +#Subject: fixme +#X-SpamBouncer: 1.4 (10/07/01) +#X-SBRule: Pattern Match (Other Patterns) (Score: 4850) +#X-SBRule: Pattern Match (Spam Phone #) (Score: 0) +#X-SBClass: Blocked +#Status: O +# +#Path: ord-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!host213-120-137-48.in-addr.btopenworld.COM!not-for-mail +#From: laura@madonnaweb.com (laura fairhead) +#Newsgroups: comp.lang.awk +#Subject: bug in gawk3.1.0 regex code +#Date: Wed, 08 May 2002 23:31:40 GMT +#Organization: that'll be the daewooo :) +#Lines: 211 +#Message-ID: <3cd9b0f7.29675926@NEWS.CIS.DFN.DE> +#Reply-To: laura@madonnaweb.com +#NNTP-Posting-Host: host213-120-137-48.in-addr.btopenworld.com (213.120.137.48) +#X-Trace: fu-berlin.de 1020900891 18168286 213.120.137.48 (16 [53286]) +#X-Newsreader: Forte Free Agent 1.21/32.243 +#Xref: dfw-artgen comp.lang.awk:13059 +# +# +#I believe I've just found a bug in gawk3.1.0 implementation of +#extended regular expressions. It seems to be down to the alternation +#operator; when using an end anchor '$' as a subexpression in an +#alternation and the entire matched RE is a nul-string it fails +#to match the end of string, for example; +# +#gsub(/$|2/,"x") +#print +# +#input = 12345 +#expected output = 1x345x +#actual output = 1x345 +# +#The start anchor '^' always works as expected; +# +#gsub(/^|2/,"x") +#print +# +#input = 12345 +#expected output = x1x345 +#actual output = x1x345 +# +#This was with POSIX compliance enabled althought that doesn't +#effect the result. +# +#I checked on gawk3.0.6 and got exactly the same results however +#gawk2.15.6 gives the expected results. +# +#I'm about to post a bug report about this into gnu.utils.bug +#but I thought I'd post it here first in case anyone has +#any input/comments/whatever .... +# +#Complete test results were as follows; +# +#input 12345 +#output gsub(/regex/,"x",input) +# +#regex output +#(^) x12345 +#($) 12345x +#(^)|($) x12345x +#($)|(^) x12345x +#(2) 1x345 +#(^)|2 x1x345 +#2|(^) x1x345 +#($)|2 1x345 +#2|($) 1x345 +#(2)|(^) x1x345 +#(^)|(2) x1x345 +#(2)|($) 1x345 +#($)|(2) 1x345 +#.((2)|(^)) x345 +#.((^)|(2)) x345 +#.((2)|($)) x34x +#.(($)|(2)) x34x +#x{0}((2)|(^)) x1x345 +#x{0}((^)|(2)) x1x345 +#x{0}((2)|($)) 1x345 +#x{0}(($)|(2)) 1x345 +#x*((2)|(^)) x1x345 +#x*((^)|(2)) x1x345 +#x*((2)|($)) 1x345 +#x*(($)|(2)) 1x345 +# +#Here's the test program I used, a few of the cases use ERE {n[,[m]]} +#operators so that will have to be commented out or have a check +#added or something (should have put a conditional in I know... ;-) +# +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +BEGIN{ + +TESTSTR="12345" + +print "input "TESTSTR +print "output gsub(/regex/,\"x\",input)" +print "" + +print "regex output" +$0=TESTSTR +gsub(/(^)/,"x") +print "(^) "$0 + +$0=TESTSTR +gsub(/($)/,"x") +print "($) "$0 + +$0=TESTSTR +gsub(/(^)|($)/,"x") +print "(^)|($) "$0 + +$0=TESTSTR +gsub(/($)|(^)/,"x") +print "($)|(^) "$0 + +$0=TESTSTR +gsub(/2/,"x") +print "(2) "$0 + +$0=TESTSTR +gsub(/(^)|2/,"x") +print "(^)|2 "$0 + +$0=TESTSTR +gsub(/2|(^)/,"x") +print "2|(^) "$0 + +$0=TESTSTR +gsub(/($)|2/,"x") +print "($)|2 "$0 + +$0=TESTSTR +gsub(/2|($)/,"x") +print "2|($) "$0 + +$0=TESTSTR +gsub(/(2)|(^)/,"x") +print "(2)|(^) "$0 + +$0=TESTSTR +gsub(/(^)|(2)/,"x") +print "(^)|(2) "$0 + +$0=TESTSTR +gsub(/(2)|($)/,"x") +print "(2)|($) "$0 + +$0=TESTSTR +gsub(/($)|(2)/,"x") +print "($)|(2) "$0 + +$0=TESTSTR +gsub(/.((2)|(^))/,"x") +print ".((2)|(^)) "$0 + +$0=TESTSTR +gsub(/.((^)|(2))/,"x") +print ".((^)|(2)) "$0 + +$0=TESTSTR +gsub(/.((2)|($))/,"x") +print ".((2)|($)) "$0 + +$0=TESTSTR +gsub(/.(($)|(2))/,"x") +print ".(($)|(2)) "$0 + +# $0=TESTSTR +# gsub(/x{0}((2)|(^))/,"x") +# print "x{0}((2)|(^)) "$0 +# +# $0=TESTSTR +# gsub(/x{0}((^)|(2))/,"x") +# print "x{0}((^)|(2)) "$0 +# +# $0=TESTSTR +# gsub(/x{0}((2)|($))/,"x") +# print "x{0}((2)|($)) "$0 +# +# $0=TESTSTR +# gsub(/x{0}(($)|(2))/,"x") +# print "x{0}(($)|(2)) "$0 + +$0=TESTSTR +gsub(/x*((2)|(^))/,"x") +print "x*((2)|(^)) "$0 + +$0=TESTSTR +gsub(/x*((^)|(2))/,"x") +print "x*((^)|(2)) "$0 + +$0=TESTSTR +gsub(/x*((2)|($))/,"x") +print "x*((2)|($)) "$0 + +$0=TESTSTR +gsub(/x*(($)|(2))/,"x") +print "x*(($)|(2)) "$0 + +# $0=TESTSTR +# gsub(/x{0}^/,"x") +# print "x{0}^ "$0 +# +# $0=TESTSTR +# gsub(/x{0}$/,"x") +# print "x{0}$ "$0 +# +# $0=TESTSTR +# gsub(/(x{0}^)|2/,"x") +# print "(x{0}^)|2 "$0 +# +# $0=TESTSTR +# gsub(/(x{0}$)|2/,"x") +# print "(x{0}$)|2 "$0 + + +} +# +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +#byefrom +# +#-- +#laura fairhead # laura@madonnaweb.com http://lf.8k.com +# # if you are bored crack my sig. +#1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A +#EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E +#630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA +#8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978 +#80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492 diff -urN gawk-3.1.1/test/gsubtst2.ok gawk-3.1.2/test/gsubtst2.ok --- gawk-3.1.1/test/gsubtst2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst2.ok 2002-05-09 22:24:48.000000000 +0300 @@ -0,0 +1,25 @@ +input 12345 +output gsub(/regex/,"x",input) + +regex output +(^) x12345 +($) 12345x +(^)|($) x12345x +($)|(^) x12345x +(2) 1x345 +(^)|2 x1x345 +2|(^) x1x345 +($)|2 1x345x +2|($) 1x345x +(2)|(^) x1x345 +(^)|(2) x1x345 +(2)|($) 1x345x +($)|(2) 1x345x +.((2)|(^)) x345 +.((^)|(2)) x345 +.((2)|($)) x34x +.(($)|(2)) x34x +x*((2)|(^)) x1x345 +x*((^)|(2)) x1x345 +x*((2)|($)) 1x345x +x*(($)|(2)) 1x345x diff -urN gawk-3.1.1/test/gsubtst3.awk gawk-3.1.2/test/gsubtst3.awk --- gawk-3.1.1/test/gsubtst3.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst3.awk 2002-08-04 10:30:15.000000000 +0300 @@ -0,0 +1,290 @@ +# From laura_fairhead@talk21.com Fri May 10 11:24:41 2002 +# Return-Path: +# Received: from localhost (aahz [127.0.0.1]) +# by skeeve.com (8.11.2/8.11.2) with ESMTP id g4A8OdU01822 +# for ; Fri, 10 May 2002 11:24:40 +0300 +# Received: from actcom.co.il [192.114.47.1] +# by localhost with POP3 (fetchmail-5.7.4) +# for arnold@localhost (single-drop); Fri, 10 May 2002 11:24:40 +0300 (IDT) +# Received: by actcom.co.il (mbox arobbins) +# (with Cubic Circle's cucipop (v1.31 1998/05/13) Fri May 10 11:30:42 2002) +# X-From_: laura_fairhead@talk21.com Fri May 10 05:39:57 2002 +# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP +# (8.11.6/actcom-0.2) id g4A2dpw26380 for ; +# Fri, 10 May 2002 05:39:52 +0300 (EET DST) +# (rfc931-sender: mail.actcom.co.il [192.114.47.13]) +# Received: from f7.net (consort.superb.net [209.61.216.22]) +# by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g4A2dxl10851 +# for ; Fri, 10 May 2002 05:39:59 +0300 +# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) +# by f7.net (8.11.6/8.11.6) with ESMTP id g4A2dwN11097 +# for ; Thu, 9 May 2002 22:39:58 -0400 +# Received: from [194.73.242.6] (helo=wmpmta04-app.mail-store.com) +# by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) +# id 1760K4-0001QX-00 +# for ; Thu, 09 May 2002 22:39:56 -0400 +# Received: from wmpmtavirtual ([10.216.84.15]) +# by wmpmta04-app.mail-store.com +# (InterMail vM.5.01.02.00 201-253-122-103-101-20001108) with SMTP +# id <20020510023921.EEW24107.wmpmta04-app.mail-store.com@wmpmtavirtual> +# for ; Fri, 10 May 2002 03:39:21 +0100 +# Received: from 213.1.102.243 by t21web05-lrs ([10.216.84.15]); Fri, 10 May 02 03:38:42 GMT+01:00 +# X-Mailer: talk21 v1.24 - http://talk21.btopenworld.com +# From: laura_fairhead@talk21.com +# To: bug-gawk@gnu.org +# X-Talk21Ref: none +# Date: Fri, 10 May 2002 03:38:42 GMT+01:00 +# Subject: bug in gawk 3.1.0 regex code +# Mime-Version: 1.0 +# Content-type: multipart/mixed; boundary="--GgOuLpDpIyE--1020998322088--" +# Message-Id: <20020510023921.EEW24107.wmpmta04-app.mail-store.com@wmpmtavirtual> +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBClass: OK +# Status: RO +# +# Multipart Message Boundary - attachment/bodypart follows: +# +# +# ----GgOuLpDpIyE--1020998322088-- +# Content-Type: text/plain +# Content-Transfer-Encoding: 7bit +# +# +# I believe I've just found a bug in gawk3.1.0 implementation of +# extended regular expressions. It seems to be down to the alternation +# operator; when using an end anchor '$' as a subexpression in an +# alternation and the entire matched RE is a nul-string it fails +# to match the end of string, for example; +# +# gsub(/$|2/,"x") +# print +# +# input = 12345 +# expected output = 1x345x +# actual output = 1x345 +# +# The start anchor '^' always works as expected; +# +# gsub(/^|2/,"x") +# print +# +# input = 12345 +# expected output = x1x345 +# actual output = x1x345 +# +# This was with POSIX compliance enabled althought that doesn't +# effect the result. +# +# I checked on gawk3.0.6 and got exactly the same results however +# gawk2.15.6 gives the expected results. +# +# All the follow platforms produced the same results; +# +# gawk3.0.6 / Win98 / i386 +# gawk3.1.0 / Win98 / i386 +# gawk3.0.5 / Linux2.2.16 / i386 +# +# Complete test results were as follows; +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# regex input expected actual bug? +# ------------------------------------------------------------- +# (^) 12345 x12345 x12345 +# ($) 12345 12345x 12345x +# (^)|($) 12345 x12345x x12345x +# ($)|(^) 12345 x12345x x12345x +# 2 12345 1x345 1x345 +# (^)|2 12345 x1x345 x1x345 +# 2|(^) 12345 x1x345 x1x345 +# ($)|2 12345 1x345x 1x345 **BUG** +# 2|($) 12345 1x345x 1x345 **BUG** +# (2)|(^) 12345 x1x345 x1x345 +# (^)|(2) 12345 x1x345 x1x345 +# (2)|($) 12345 1x345x 1x345 **BUG** +# ($)|(2) 12345 1x345x 1x345 **BUG** +# ((2)|(^)). 12345 xx45 xx45 +# ((^)|(2)). 12345 xx45 xx45 +# .((2)|($)) 12345 x34x x34x +# .(($)|(2)) 12345 x34x x34x +# (^)|6 12345 x12345 x12345 +# 6|(^) 12345 x12345 x12345 +# ($)|6 12345 12345x 12345x +# 6|($) 12345 12345x 12345x +# 2|6|(^) 12345 x1x345 x1x345 +# 2|(^)|6 12345 x1x345 x1x345 +# 6|2|(^) 12345 x1x345 x1x345 +# 6|(^)|2 12345 x1x345 x1x345 +# (^)|6|2 12345 x1x345 x1x345 +# (^)|2|6 12345 x1x345 x1x345 +# 2|6|($) 12345 1x345x 1x345 **BUG** +# 2|($)|6 12345 1x345x 1x345 **BUG** +# 6|2|($) 12345 1x345x 1x345 **BUG** +# 6|($)|2 12345 1x345x 1x345 **BUG** +# ($)|6|2 12345 1x345x 1x345 **BUG** +# ($)|2|6 12345 1x345x 1x345 **BUG** +# 2|4|(^) 12345 x1x3x5 x1x3x5 +# 2|(^)|4 12345 x1x3x5 x1x3x5 +# 4|2|(^) 12345 x1x3x5 x1x3x5 +# 4|(^)|2 12345 x1x3x5 x1x3x5 +# (^)|4|2 12345 x1x3x5 x1x3x5 +# (^)|2|4 12345 x1x3x5 x1x3x5 +# 2|4|($) 12345 1x3x5x 1x3x5 **BUG** +# 2|($)|4 12345 1x3x5x 1x3x5 **BUG** +# 4|2|($) 12345 1x3x5x 1x3x5 **BUG** +# 4|($)|2 12345 1x3x5x 1x3x5 **BUG** +# ($)|4|2 12345 1x3x5x 1x3x5 **BUG** +# ($)|2|4 12345 1x3x5x 1x3x5 **BUG** +# x{0}((2)|(^)) 12345 x1x345 x1x345 +# x{0}((^)|(2)) 12345 x1x345 x1x345 +# x{0}((2)|($)) 12345 1x345x 1x345 **BUG** +# x{0}(($)|(2)) 12345 1x345x 1x345 **BUG** +# x*((2)|(^)) 12345 x1x345 x1x345 +# x*((^)|(2)) 12345 x1x345 x1x345 +# x*((2)|($)) 12345 1x345x 1x345 **BUG** +# x*(($)|(2)) 12345 1x345x 1x345 **BUG** +# x{0}^ 12345 x12345 x12345 +# x{0}$ 12345 12345x 12345x +# (x{0}^)|2 12345 x1x345 x1x345 +# (x{0}$)|2 12345 1x345x 1x345 **BUG** +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# +# Here's the test program I used, a few of the cases use ERE {n[,[m]]} +# operators so need '-W posix', (although the same results minus +# those tests came out without POSIX compliance enabled) +# +# [ Invocation was 'gawk -W posix -f tregex.awk' ] +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# tregex.awk +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +BEGIN{ +print _=sprintf("%-20s%-10s%-10s%-10s%-10s\n","regex","input","expected","actual","bug?") +OFS="-" +$(length(_)+1)="" +print $0 + +while(getline +# +# +# byefrom +# +# Laura Fairhead +# +# +# +# +# -------------------- +# talk21 your FREE portable and private address on the net at http://www.talk21.com +# ----GgOuLpDpIyE--1020998322088-- +# Content-Type: : application/zip;; Name="COPY.ZIP" +# Content-Transfer-Encoding: base64 +# Content-Disposition: attachment; filename="COPY.ZIP" +# +# UEsDBBQAAAAIALoaqiyj8d/bjwMAAKsaAAADAAAARklMrVjfa+JAEH4P5H8ISwrRU9EYfbheKBR6 +# xRcLvevbYbFtzsqJlBrpQr3722+zMWZ31pk1MaG0Q/m+nR87O9kvruM6/5p4XOc9WSTc05/l +# +m2bSivhb8lzmrx43vw53c5X2f+etourHOc63XMe1wlmLQ8+g3AYjaTFD2ZplY9g+xRbWly3 +# NPastYMrQN9cs4DvHYz+dHbomY8SOTctGDlcQfXND1Uz6cK3EXcVdpY37ltSuB55u339cNtu +# F76NPTudHYR0zS2RZ/sd1maHVLdYI/cp31b2PvFW72jkvIi2tLTI94nXY/eCfeZK8Ap7GO1b +# u7QAO8+8FjsLfFx7OowtfW6dLYRv22wZ031uYYc7M/aK5xvEfjp7vDPnQxW2OZuqndDxWeyw +# dt6y5rXPt5xrqG8bW9a8tm8ZN1q1UyYTXvNT2HjN7VWLLL3GR7pl9nlUkx1Z+5xm2/qcYsu4 +# z2KHtfOWNad6jR92jGN9jvm2sSNbn1vYlj4n2TLus9h4zW1s/tn/e3iHV55MOXumvUarsvVX +# +OknNGfrr/AK7DbMulLkbZh1VTa8uFSLHF5cqlVt5tW9eWRsH2VbVY10rp+TCu9Q6Rxj2/Ju +# SJE2KG5TqW57848/jS15fXM7mX66ztv7cp16j/FGGr8DdtEN+5uL7sD49WvNOkwGIv5KaS3+ +# FsJamLmyFkYmrFnLde6+/4hZl7mOH6yS9SJ9DR5bXwatmLHCrd/PivTxulwlwSJJV8t14n1j +# abIRCfde5mm2iojx/ib2B5eTaeyHl3cPP2N/KNbsx5Op6yw226fg/qbDeIbNc/DoHAR6Mu2I +# dTp+X/zEsTCvGPvK9j0govsrfxqqdJN9cKhMY0vilwdPOebmRwqIy4+x+Tni+Hrc/PKAAnGZ +# 7pXH2fyaYK6X4+B9CcPBt/RRt9z8FoDhoOpH/QJ9j+KAkkf9As2O4oA6N/xy6RWo8OMoqLYN +# 1DDipqo+joIqEGtQqDWJRibXK9oO6igMB1Uu2XeKZwwHlSuO0zue6idVGVE4VQPheeiVIc8F +# sV6Bg6oRx+knkup3Kl8VR+Vb5qGru2N14SNTx2E4qNhwnH1/+chUYRROvfvjeejK6khdeLm/ +# +HoFDqolHGfdX17sG5WviqPyLXBQ1WB9D/ULjSvHH9ZXUJOgOKA+UL9AZ1A4dThTftXxTOWh +# qgRs7kI9gF4gwM0fnVfgjo/F19A96T9QSwECFAAUAAAACAC6Gqoso/Hf248DAACrGgAAAwAA +# AAAAAAABACAAAAAAAAAARklMUEsFBgAAAAABAAEAMQAAALADAAAAAA== +# ----GgOuLpDpIyE--1020998322088---- +# +# +# diff -urN gawk-3.1.1/test/gsubtst3.in gawk-3.1.2/test/gsubtst3.in --- gawk-3.1.1/test/gsubtst3.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst3.in 2002-08-04 10:20:14.000000000 +0300 @@ -0,0 +1,57 @@ +(^) 12345 x12345 +($) 12345 12345x +(^)|($) 12345 x12345x +($)|(^) 12345 x12345x +2 12345 1x345 +(^)|2 12345 x1x345 +2|(^) 12345 x1x345 +($)|2 12345 1x345x +2|($) 12345 1x345x +(2)|(^) 12345 x1x345 +(^)|(2) 12345 x1x345 +(2)|($) 12345 1x345x +($)|(2) 12345 1x345x +((2)|(^)). 12345 xx45 +((^)|(2)). 12345 xx45 +.((2)|($)) 12345 x34x +.(($)|(2)) 12345 x34x +(^)|6 12345 x12345 +6|(^) 12345 x12345 +($)|6 12345 12345x +6|($) 12345 12345x +2|6|(^) 12345 x1x345 +2|(^)|6 12345 x1x345 +6|2|(^) 12345 x1x345 +6|(^)|2 12345 x1x345 +(^)|6|2 12345 x1x345 +(^)|2|6 12345 x1x345 +2|6|($) 12345 1x345x +2|($)|6 12345 1x345x +6|2|($) 12345 1x345x +6|($)|2 12345 1x345x +($)|6|2 12345 1x345x +($)|2|6 12345 1x345x +2|4|(^) 12345 x1x3x5 +2|(^)|4 12345 x1x3x5 +4|2|(^) 12345 x1x3x5 +4|(^)|2 12345 x1x3x5 +(^)|4|2 12345 x1x3x5 +(^)|2|4 12345 x1x3x5 +2|4|($) 12345 1x3x5x +2|($)|4 12345 1x3x5x +4|2|($) 12345 1x3x5x +4|($)|2 12345 1x3x5x +($)|4|2 12345 1x3x5x +($)|2|4 12345 1x3x5x +x{0}((2)|(^)) 12345 x1x345 +x{0}((^)|(2)) 12345 x1x345 +x{0}((2)|($)) 12345 1x345x +x{0}(($)|(2)) 12345 1x345x +x*((2)|(^)) 12345 x1x345 +x*((^)|(2)) 12345 x1x345 +x*((2)|($)) 12345 1x345x +x*(($)|(2)) 12345 1x345x +x{0}^ 12345 x12345 +x{0}$ 12345 12345x +(x{0}^)|2 12345 x1x345 +(x{0}$)|2 12345 1x345x diff -urN gawk-3.1.1/test/gsubtst3.ok gawk-3.1.2/test/gsubtst3.ok --- gawk-3.1.1/test/gsubtst3.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst3.ok 2002-08-04 10:19:59.000000000 +0300 @@ -0,0 +1,60 @@ +regex input expected actual bug? + +------------------------------------------------------------- +(^) 12345 x12345 x12345 +($) 12345 12345x 12345x +(^)|($) 12345 x12345x x12345x +($)|(^) 12345 x12345x x12345x +2 12345 1x345 1x345 +(^)|2 12345 x1x345 x1x345 +2|(^) 12345 x1x345 x1x345 +($)|2 12345 1x345x 1x345x +2|($) 12345 1x345x 1x345x +(2)|(^) 12345 x1x345 x1x345 +(^)|(2) 12345 x1x345 x1x345 +(2)|($) 12345 1x345x 1x345x +($)|(2) 12345 1x345x 1x345x +((2)|(^)). 12345 xx45 xx45 +((^)|(2)). 12345 xx45 xx45 +.((2)|($)) 12345 x34x x34x +.(($)|(2)) 12345 x34x x34x +(^)|6 12345 x12345 x12345 +6|(^) 12345 x12345 x12345 +($)|6 12345 12345x 12345x +6|($) 12345 12345x 12345x +2|6|(^) 12345 x1x345 x1x345 +2|(^)|6 12345 x1x345 x1x345 +6|2|(^) 12345 x1x345 x1x345 +6|(^)|2 12345 x1x345 x1x345 +(^)|6|2 12345 x1x345 x1x345 +(^)|2|6 12345 x1x345 x1x345 +2|6|($) 12345 1x345x 1x345x +2|($)|6 12345 1x345x 1x345x +6|2|($) 12345 1x345x 1x345x +6|($)|2 12345 1x345x 1x345x +($)|6|2 12345 1x345x 1x345x +($)|2|6 12345 1x345x 1x345x +2|4|(^) 12345 x1x3x5 x1x3x5 +2|(^)|4 12345 x1x3x5 x1x3x5 +4|2|(^) 12345 x1x3x5 x1x3x5 +4|(^)|2 12345 x1x3x5 x1x3x5 +(^)|4|2 12345 x1x3x5 x1x3x5 +(^)|2|4 12345 x1x3x5 x1x3x5 +2|4|($) 12345 1x3x5x 1x3x5x +2|($)|4 12345 1x3x5x 1x3x5x +4|2|($) 12345 1x3x5x 1x3x5x +4|($)|2 12345 1x3x5x 1x3x5x +($)|4|2 12345 1x3x5x 1x3x5x +($)|2|4 12345 1x3x5x 1x3x5x +x{0}((2)|(^)) 12345 x1x345 x1x345 +x{0}((^)|(2)) 12345 x1x345 x1x345 +x{0}((2)|($)) 12345 1x345x 1x345x +x{0}(($)|(2)) 12345 1x345x 1x345x +x*((2)|(^)) 12345 x1x345 x1x345 +x*((^)|(2)) 12345 x1x345 x1x345 +x*((2)|($)) 12345 1x345x 1x345x +x*(($)|(2)) 12345 1x345x 1x345x +x{0}^ 12345 x12345 x12345 +x{0}$ 12345 12345x 12345x +(x{0}^)|2 12345 x1x345 x1x345 +(x{0}$)|2 12345 1x345x 1x345x diff -urN gawk-3.1.1/test/gsubtst4.awk gawk-3.1.2/test/gsubtst4.awk --- gawk-3.1.1/test/gsubtst4.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst4.awk 2002-08-04 10:23:19.000000000 +0300 @@ -0,0 +1,242 @@ +# From arnold Thu May 9 17:27:03 2002 +# Return-Path: +# Received: (from arnold@localhost) +# by skeeve.com (8.11.6/8.11.6) id g49ER3K27925 +# for arnold; Thu, 9 May 2002 17:27:03 +0300 +# Date: Thu, 9 May 2002 17:27:03 +0300 +# From: Aharon Robbins +# Message-Id: <200205091427.g49ER3K27925@skeeve.com> +# To: arnold@skeeve.com +# Subject: fixme +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBRule: Pattern Match (Other Patterns) (Score: 4850) +# X-SBRule: Pattern Match (Spam Phone #) (Score: 0) +# X-SBClass: Blocked +# Status: RO +# +# Path: ord-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!uni-berlin.de!host213-120-137-48.in-addr.btopenworld.COM!not-for-mail +# From: laura@madonnaweb.com (laura fairhead) +# Newsgroups: comp.lang.awk +# Subject: bug in gawk3.1.0 regex code +# Date: Wed, 08 May 2002 23:31:40 GMT +# Organization: that'll be the daewooo :) +# Lines: 211 +# Message-ID: <3cd9b0f7.29675926@NEWS.CIS.DFN.DE> +# Reply-To: laura@madonnaweb.com +# NNTP-Posting-Host: host213-120-137-48.in-addr.btopenworld.com (213.120.137.48) +# X-Trace: fu-berlin.de 1020900891 18168286 213.120.137.48 (16 [53286]) +# X-Newsreader: Forte Free Agent 1.21/32.243 +# Xref: dfw-artgen comp.lang.awk:13059 +# +# +# I believe I've just found a bug in gawk3.1.0 implementation of +# extended regular expressions. It seems to be down to the alternation +# operator; when using an end anchor '$' as a subexpression in an +# alternation and the entire matched RE is a nul-string it fails +# to match the end of string, for example; +# +# gsub(/$|2/,"x") +# print +# +# input = 12345 +# expected output = 1x345x +# actual output = 1x345 +# +# The start anchor '^' always works as expected; +# +# gsub(/^|2/,"x") +# print +# +# input = 12345 +# expected output = x1x345 +# actual output = x1x345 +# +# This was with POSIX compliance enabled althought that doesn't +# effect the result. +# +# I checked on gawk3.0.6 and got exactly the same results however +# gawk2.15.6 gives the expected results. +# +# I'm about to post a bug report about this into gnu.utils.bug +# but I thought I'd post it here first in case anyone has +# any input/comments/whatever .... +# +# Complete test results were as follows; +# +# input 12345 +# output gsub(/regex/,"x",input) +# +# regex output +# (^) x12345 +# ($) 12345x +# (^)|($) x12345x +# ($)|(^) x12345x +# (2) 1x345 +# (^)|2 x1x345 +# 2|(^) x1x345 +# ($)|2 1x345 +# 2|($) 1x345 +# (2)|(^) x1x345 +# (^)|(2) x1x345 +# (2)|($) 1x345 +# ($)|(2) 1x345 +# .((2)|(^)) x345 +# .((^)|(2)) x345 +# .((2)|($)) x34x +# .(($)|(2)) x34x +# x{0}((2)|(^)) x1x345 +# x{0}((^)|(2)) x1x345 +# x{0}((2)|($)) 1x345 +# x{0}(($)|(2)) 1x345 +# x*((2)|(^)) x1x345 +# x*((^)|(2)) x1x345 +# x*((2)|($)) 1x345 +# x*(($)|(2)) 1x345 +# +# Here's the test program I used, a few of the cases use ERE {n[,[m]]} +# operators so that will have to be commented out or have a check +# added or something (should have put a conditional in I know... ;-) +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +BEGIN{ + +TESTSTR="12345" + +print "input "TESTSTR +print "output gsub(/regex/,\"x\",input)" +print "" + +print "regex output" +$0=TESTSTR +gsub(/(^)/,"x") +print "(^) "$0 + +$0=TESTSTR +gsub(/($)/,"x") +print "($) "$0 + +$0=TESTSTR +gsub(/(^)|($)/,"x") +print "(^)|($) "$0 + +$0=TESTSTR +gsub(/($)|(^)/,"x") +print "($)|(^) "$0 + +$0=TESTSTR +gsub(/2/,"x") +print "(2) "$0 + +$0=TESTSTR +gsub(/(^)|2/,"x") +print "(^)|2 "$0 + +$0=TESTSTR +gsub(/2|(^)/,"x") +print "2|(^) "$0 + +$0=TESTSTR +gsub(/($)|2/,"x") +print "($)|2 "$0 + +$0=TESTSTR +gsub(/2|($)/,"x") +print "2|($) "$0 + +$0=TESTSTR +gsub(/(2)|(^)/,"x") +print "(2)|(^) "$0 + +$0=TESTSTR +gsub(/(^)|(2)/,"x") +print "(^)|(2) "$0 + +$0=TESTSTR +gsub(/(2)|($)/,"x") +print "(2)|($) "$0 + +$0=TESTSTR +gsub(/($)|(2)/,"x") +print "($)|(2) "$0 + +$0=TESTSTR +gsub(/.((2)|(^))/,"x") +print ".((2)|(^)) "$0 + +$0=TESTSTR +gsub(/.((^)|(2))/,"x") +print ".((^)|(2)) "$0 + +$0=TESTSTR +gsub(/.((2)|($))/,"x") +print ".((2)|($)) "$0 + +$0=TESTSTR +gsub(/.(($)|(2))/,"x") +print ".(($)|(2)) "$0 + +$0=TESTSTR +gsub(/x{0}((2)|(^))/,"x") +print "x{0}((2)|(^)) "$0 + +$0=TESTSTR +gsub(/x{0}((^)|(2))/,"x") +print "x{0}((^)|(2)) "$0 + +$0=TESTSTR +gsub(/x{0}((2)|($))/,"x") +print "x{0}((2)|($)) "$0 + +$0=TESTSTR +gsub(/x{0}(($)|(2))/,"x") +print "x{0}(($)|(2)) "$0 + +$0=TESTSTR +gsub(/x*((2)|(^))/,"x") +print "x*((2)|(^)) "$0 + +$0=TESTSTR +gsub(/x*((^)|(2))/,"x") +print "x*((^)|(2)) "$0 + +$0=TESTSTR +gsub(/x*((2)|($))/,"x") +print "x*((2)|($)) "$0 + +$0=TESTSTR +gsub(/x*(($)|(2))/,"x") +print "x*(($)|(2)) "$0 + +$0=TESTSTR +gsub(/x{0}^/,"x") +print "x{0}^ "$0 + +$0=TESTSTR +gsub(/x{0}$/,"x") +print "x{0}$ "$0 + +$0=TESTSTR +gsub(/(x{0}^)|2/,"x") +print "(x{0}^)|2 "$0 + +$0=TESTSTR +gsub(/(x{0}$)|2/,"x") +print "(x{0}$)|2 "$0 + + +} +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# byefrom +# +# -- +# laura fairhead # laura@madonnaweb.com http://lf.8k.com +# # if you are bored crack my sig. +# 1F8B0808CABB793C0000666667002D8E410E83300C04EF91F2877D00CA138A7A +# EAA98F30C494480157B623C4EF1B508FDED1CEFA9152A23DE35D661593C5318E +# 630C313CD701BE92E390563326EE17A3CA818F5266E4C2461547F1F5267659CA +# 8EE2092F76C329ED02CA430C5373CC62FF94BAC6210B36D9F9BC4AB53378D978 +# 80F2978A1A6E5D6F5133B67B6113178DC1059526698AFE5C17A5187E7D930492 +# diff -urN gawk-3.1.1/test/gsubtst4.ok gawk-3.1.2/test/gsubtst4.ok --- gawk-3.1.1/test/gsubtst4.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/gsubtst4.ok 2002-08-04 10:23:36.000000000 +0300 @@ -0,0 +1,33 @@ +input 12345 +output gsub(/regex/,"x",input) + +regex output +(^) x12345 +($) 12345x +(^)|($) x12345x +($)|(^) x12345x +(2) 1x345 +(^)|2 x1x345 +2|(^) x1x345 +($)|2 1x345x +2|($) 1x345x +(2)|(^) x1x345 +(^)|(2) x1x345 +(2)|($) 1x345x +($)|(2) 1x345x +.((2)|(^)) x345 +.((^)|(2)) x345 +.((2)|($)) x34x +.(($)|(2)) x34x +x{0}((2)|(^)) 12345 +x{0}((^)|(2)) 12345 +x{0}((2)|($)) 12345 +x{0}(($)|(2)) 12345 +x*((2)|(^)) x1x345 +x*((^)|(2)) x1x345 +x*((2)|($)) 1x345x +x*(($)|(2)) 1x345x +x{0}^ 12345 +x{0}$ 12345 +(x{0}^)|2 1x345 +(x{0}$)|2 1x345 diff -urN gawk-3.1.1/test/icasefs.awk gawk-3.1.2/test/icasefs.awk --- gawk-3.1.1/test/icasefs.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/icasefs.awk 2003-01-26 15:33:20.000000000 +0200 @@ -0,0 +1,43 @@ +BEGIN { + # 1. Should print aCa + IGNORECASE = 1 + FS = "[c]" + IGNORECASE = 0 + $0 = "aCa" + print $1 + + # 2. Should print a + IGNORECASE = 1 + FS = "[c]" + $0 = "aCa" + print $1 + + # 3. Should print a + IGNORECASE = 1 + FS = "C" + IGNORECASE = 0 + $0 = "aCa" + print $1 + + # 4. Should print aCa + IGNORECASE = 1 + FS = "c" + $0 = "aCa" + print $1 + + # 5. Should print aCa + FS = "xy" + IGNORECASE = 0 + FS = "c" + IGNORECASE = 1 + $0 = "aCa" + print $1 + + # 6. Should print aCa + FS = "xy" + IGNORECASE = 0 + FS = "c" + IGNORECASE = 1 + split("aCa",a) + print a[1] +} diff -urN gawk-3.1.1/test/icasefs.ok gawk-3.1.2/test/icasefs.ok --- gawk-3.1.1/test/icasefs.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/icasefs.ok 2003-01-26 15:32:59.000000000 +0200 @@ -0,0 +1,6 @@ +aCa +a +a +aCa +aCa +aCa diff -urN gawk-3.1.1/test/icasers.awk gawk-3.1.2/test/icasers.awk --- gawk-3.1.1/test/icasers.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/icasers.awk 2002-10-15 11:59:30.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { RS = "[[:upper:]]+" } +{ print ; IGNORECASE = ! IGNORECASE } diff -urN gawk-3.1.1/test/icasers.in gawk-3.1.2/test/icasers.in --- gawk-3.1.1/test/icasers.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/icasers.in 2002-10-15 11:59:17.000000000 +0200 @@ -0,0 +1 @@ +1111AAAA2222bbbb \ No newline at end of file diff -urN gawk-3.1.1/test/icasers.ok gawk-3.1.2/test/icasers.ok --- gawk-3.1.1/test/icasers.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/icasers.ok 2002-12-20 11:52:19.000000000 +0200 @@ -0,0 +1,2 @@ +1111 +2222 diff -urN gawk-3.1.1/test/ignrcase.awk gawk-3.1.2/test/ignrcase.awk --- gawk-3.1.1/test/ignrcase.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/ignrcase.awk 2002-11-03 14:54:26.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { IGNORECASE = 1 } +{ sub(/y/, ""); print } diff -urN gawk-3.1.1/test/ignrcase.in gawk-3.1.2/test/ignrcase.in --- gawk-3.1.1/test/ignrcase.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/ignrcase.in 2002-11-03 14:54:39.000000000 +0200 @@ -0,0 +1 @@ +xYz diff -urN gawk-3.1.1/test/inputred.awk gawk-3.1.2/test/inputred.awk --- gawk-3.1.1/test/inputred.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/inputred.awk 2003-01-30 17:45:47.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { print getline < "file" ".txt" } diff -urN gawk-3.1.1/test/inputred.ok gawk-3.1.2/test/inputred.ok --- gawk-3.1.1/test/inputred.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/inputred.ok 2003-01-30 17:45:55.000000000 +0200 @@ -0,0 +1 @@ +-1.txt diff -urN gawk-3.1.1/test/longwrds.awk gawk-3.1.2/test/longwrds.awk --- gawk-3.1.1/test/longwrds.awk 1993-10-20 02:07:57.000000000 +0200 +++ gawk-3.1.2/test/longwrds.awk 2002-11-03 15:19:19.000000000 +0200 @@ -14,7 +14,8 @@ for (x in used) if (length(x) > 10) { ++num_long_words - print x + print x | "LC_ALL=C sort" } - print num_long_words, "long words" + print(num_long_words, "long words") | "LC_ALL=C sort" + close("LC_ALL=C sort") } diff -urN gawk-3.1.1/test/manyfiles.ok gawk-3.1.2/test/manyfiles.ok --- gawk-3.1.1/test/manyfiles.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/manyfiles.ok 2002-11-03 14:58:05.000000000 +0200 @@ -0,0 +1 @@ +1 diff -urN gawk-3.1.1/test/match1.awk gawk-3.1.2/test/match1.awk --- gawk-3.1.1/test/match1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/match1.awk 2003-01-26 11:51:29.000000000 +0200 @@ -0,0 +1,9 @@ +BEGIN { + data = "foooobazbarrrrr" + match(data, /(fo+).+(bar*)/, arr) + for (i = 0; i in arr; i++) { + printf("arr[%d] = \"%s\"\n", i, arr[i]) + printf("arr[%d, \"start\"] = %s, arr[%d, \"length\"] = %s\n", + i, arr[i, "start"], i, arr[i, "length"]) + } +} diff -urN gawk-3.1.1/test/match1.ok gawk-3.1.2/test/match1.ok --- gawk-3.1.1/test/match1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/match1.ok 2003-01-27 12:23:33.000000000 +0200 @@ -0,0 +1,6 @@ +arr[0] = "foooobazbarrrrr" +arr[0, "start"] = 1, arr[0, "length"] = 15 +arr[1] = "foooo" +arr[1, "start"] = 1, arr[1, "length"] = 5 +arr[2] = "barrrrr" +arr[2, "start"] = 9, arr[2, "length"] = 7 diff -urN gawk-3.1.1/test/negexp.awk gawk-3.1.2/test/negexp.awk --- gawk-3.1.1/test/negexp.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/negexp.awk 2002-11-03 15:04:16.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { a = -2; print 10^a } diff -urN gawk-3.1.1/test/nfldstr.awk gawk-3.1.2/test/nfldstr.awk --- gawk-3.1.1/test/nfldstr.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nfldstr.awk 2003-01-27 14:00:06.000000000 +0200 @@ -0,0 +1,13 @@ +$1 == 0 { + print "bug" +} +{ + $0 = "0" + if (!$0) + print "another bug" + $0 = a = "0" + if (!$0) + print "yet another bug" + if ($1) + print "a buggie" +} diff -urN gawk-3.1.1/test/nfldstr.in gawk-3.1.2/test/nfldstr.in --- gawk-3.1.1/test/nfldstr.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nfldstr.in 2002-11-03 15:14:59.000000000 +0200 @@ -0,0 +1 @@ + diff -urN gawk-3.1.1/test/nfneg.awk gawk-3.1.2/test/nfneg.awk --- gawk-3.1.1/test/nfneg.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nfneg.awk 2002-10-13 16:55:28.000000000 +0200 @@ -0,0 +1 @@ +BEGIN { NF -= 2 ; print } diff -urN gawk-3.1.1/test/nfneg.ok gawk-3.1.2/test/nfneg.ok --- gawk-3.1.1/test/nfneg.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nfneg.ok 2002-10-28 11:46:03.000000000 +0200 @@ -0,0 +1,2 @@ +gawk: nfneg.awk:1: fatal: NF set to negative value +EXIT CODE: 2 diff -urN gawk-3.1.1/test/noeffect.awk gawk-3.1.2/test/noeffect.awk --- gawk-3.1.1/test/noeffect.awk 1995-09-13 12:34:12.000000000 +0200 +++ gawk-3.1.2/test/noeffect.awk 2003-01-30 17:23:25.000000000 +0200 @@ -1,4 +1,5 @@ BEGIN { s == "hello, world"; - print s + s + 1 + ;; } diff -urN gawk-3.1.1/test/noeffect.ok gawk-3.1.2/test/noeffect.ok --- gawk-3.1.1/test/noeffect.ok 2002-01-07 22:22:29.000000000 +0200 +++ gawk-3.1.2/test/noeffect.ok 2003-01-30 17:20:40.000000000 +0200 @@ -1,4 +1,4 @@ gawk: noeffect.awk:3: warning: statement may have no effect +gawk: noeffect.awk:4: warning: statement may have no effect gawk: noeffect.awk:2: warning: reference to uninitialized variable `s' gawk: noeffect.awk:3: warning: reference to uninitialized variable `s' - diff -urN gawk-3.1.1/test/noloop1.awk gawk-3.1.2/test/noloop1.awk --- gawk-3.1.1/test/noloop1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/noloop1.awk 2002-10-07 09:33:49.000000000 +0200 @@ -0,0 +1,70 @@ +# From jhart@avcnet.bates.edu Sun Oct 6 16:05:21 2002 +# Return-Path: +# Received: from localhost (skeeve [127.0.0.1]) +# by skeeve.com (8.11.6/8.11.6) with ESMTP id g96D5Jf28053 +# for ; Sun, 6 Oct 2002 16:05:21 +0300 +# Received: from actcom.co.il [192.114.47.1] +# by localhost with POP3 (fetchmail-5.9.0) +# for arnold@localhost (single-drop); Sun, 06 Oct 2002 16:05:21 +0300 (IDT) +# Received: by actcom.co.il (mbox arobbins) +# (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Oct 6 16:06:39 2002) +# X-From_: jhart@avcnet.bates.edu Sun Oct 6 15:31:59 2002 +# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP +# (8.11.6/actcom-0.2) id g96CVrS27315 for ; +# Sun, 6 Oct 2002 15:31:54 +0300 (EET DST) +# (rfc931-sender: mail.actcom.co.il [192.114.47.13]) +# Received: from f7.net (consort.superb.net [209.61.216.22]) +# by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g96CVqY01629 +# for ; Sun, 6 Oct 2002 15:31:52 +0300 +# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) +# by f7.net (8.11.6/8.11.6) with ESMTP id g96CVp418974 +# for ; Sun, 6 Oct 2002 08:31:51 -0400 +# Received: from monty-python.gnu.org ([199.232.76.173]) +# by fencepost.gnu.org with esmtp (Exim 4.10) +# id 17yAZa-00055o-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:50 -0400 +# Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) +# id 17yAZE-0007eB-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:29 -0400 +# Received: from avcnet.bates.edu ([134.181.128.62]) +# by monty-python.gnu.org with esmtp (Exim 4.10) +# id 17yAZ9-0007X3-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:23 -0400 +# Received: from a5514a.bates.edu (www.bates.edu [134.181.128.62]) +# by avcnet.bates.edu (8.9.3/8.9.3) with ESMTP id IAA05400 +# for ; Sun, 6 Oct 2002 08:31:20 -0400 +# Date: Sun, 6 Oct 2002 08:36:54 -0400 +# Mime-Version: 1.0 (Apple Message framework v482) +# Content-Type: text/plain; charset=US-ASCII; format=flowed +# Subject: Infinite loop in sub/gsub +# From: jhart@avcnet.bates.edu +# To: bug-gawk@gnu.org +# Content-Transfer-Encoding: 7bit +# Message-Id: <4BC4A4F0-D928-11D6-8E78-00039384A9CC@mail.avcnet.org> +# X-Mailer: Apple Mail (2.482) +# X-Spam-Status: No, hits=0.3 required=5.0 +# tests=NO_REAL_NAME,SPAM_PHRASE_00_01,USER_AGENT_APPLEMAIL +# version=2.41 +# X-Spam-Level: +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBClass: OK +# Status: RO +# +# This command line: +# +# echo "''Italics with an apostrophe'' embedded''"|gawk -f test.awk +# +# where test.awk contains this instruction: +# +/''/ { sub(/''(.?[^']+)*''/, "&"); } +# +# puts gawk 3.11 into an infinite loop. Whereas, this command works: +# +# echo "''Italics with an apostrophe' embedded''"|gawk -f test.awk +# +# +# +# Platform: Mac OS X 10.1.5/Darwin Kernel Version 5.5: Thu May 30 14:51:26 +# PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC +# +# diff -urN gawk-3.1.1/test/noloop1.in gawk-3.1.2/test/noloop1.in --- gawk-3.1.1/test/noloop1.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/noloop1.in 2002-10-07 09:32:05.000000000 +0200 @@ -0,0 +1 @@ +''Italics with an apostrophe'' embedded'' diff -urN gawk-3.1.1/test/noloop2.awk gawk-3.1.2/test/noloop2.awk --- gawk-3.1.1/test/noloop2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/noloop2.awk 2002-10-28 11:29:39.000000000 +0200 @@ -0,0 +1,70 @@ +# From jhart@avcnet.bates.edu Sun Oct 6 16:05:21 2002 +# Return-Path: +# Received: from localhost (skeeve [127.0.0.1]) +# by skeeve.com (8.11.6/8.11.6) with ESMTP id g96D5Jf28053 +# for ; Sun, 6 Oct 2002 16:05:21 +0300 +# Received: from actcom.co.il [192.114.47.1] +# by localhost with POP3 (fetchmail-5.9.0) +# for arnold@localhost (single-drop); Sun, 06 Oct 2002 16:05:21 +0300 (IDT) +# Received: by actcom.co.il (mbox arobbins) +# (with Cubic Circle's cucipop (v1.31 1998/05/13) Sun Oct 6 16:06:39 2002) +# X-From_: jhart@avcnet.bates.edu Sun Oct 6 15:31:59 2002 +# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP +# (8.11.6/actcom-0.2) id g96CVrS27315 for ; +# Sun, 6 Oct 2002 15:31:54 +0300 (EET DST) +# (rfc931-sender: mail.actcom.co.il [192.114.47.13]) +# Received: from f7.net (consort.superb.net [209.61.216.22]) +# by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g96CVqY01629 +# for ; Sun, 6 Oct 2002 15:31:52 +0300 +# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) +# by f7.net (8.11.6/8.11.6) with ESMTP id g96CVp418974 +# for ; Sun, 6 Oct 2002 08:31:51 -0400 +# Received: from monty-python.gnu.org ([199.232.76.173]) +# by fencepost.gnu.org with esmtp (Exim 4.10) +# id 17yAZa-00055o-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:50 -0400 +# Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) +# id 17yAZE-0007eB-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:29 -0400 +# Received: from avcnet.bates.edu ([134.181.128.62]) +# by monty-python.gnu.org with esmtp (Exim 4.10) +# id 17yAZ9-0007X3-00 +# for bug-gawk@gnu.org; Sun, 06 Oct 2002 08:31:23 -0400 +# Received: from a5514a.bates.edu (www.bates.edu [134.181.128.62]) +# by avcnet.bates.edu (8.9.3/8.9.3) with ESMTP id IAA05400 +# for ; Sun, 6 Oct 2002 08:31:20 -0400 +# Date: Sun, 6 Oct 2002 08:36:54 -0400 +# Mime-Version: 1.0 (Apple Message framework v482) +# Content-Type: text/plain; charset=US-ASCII; format=flowed +# Subject: Infinite loop in sub/gsub +# From: jhart@avcnet.bates.edu +# To: bug-gawk@gnu.org +# Content-Transfer-Encoding: 7bit +# Message-Id: <4BC4A4F0-D928-11D6-8E78-00039384A9CC@mail.avcnet.org> +# X-Mailer: Apple Mail (2.482) +# X-Spam-Status: No, hits=0.3 required=5.0 +# tests=NO_REAL_NAME,SPAM_PHRASE_00_01,USER_AGENT_APPLEMAIL +# version=2.41 +# X-Spam-Level: +# X-SpamBouncer: 1.4 (10/07/01) +# X-SBClass: OK +# Status: RO +# +# This command line: +# +# echo "''Italics with an apostrophe'' embedded''"|gawk -f test.awk +# +# where test.awk contains this instruction: +# +/''/ { sub(/''(.?[^']+)*''/, "&"); } +# +# puts gawk 3.11 into an infinite loop. Whereas, this command works: +# +# echo "''Italics with an apostrophe' embedded''"|gawk -f test.awk +# +# +# +# Platform: Mac OS X 10.1.5/Darwin Kernel Version 5.5: Thu May 30 14:51:26 +# PDT 2002; root:xnu/xnu-201.42.3.obj~1/RELEASE_PPC +# +# diff -urN gawk-3.1.1/test/noloop2.in gawk-3.1.2/test/noloop2.in --- gawk-3.1.1/test/noloop2.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/noloop2.in 2002-10-07 09:32:10.000000000 +0200 @@ -0,0 +1 @@ +''Italics with an apostrophe' embedded'' diff -urN gawk-3.1.1/test/noparms.ok gawk-3.1.2/test/noparms.ok --- gawk-3.1.1/test/noparms.ok 1997-06-04 19:38:15.000000000 +0300 +++ gawk-3.1.2/test/noparms.ok 2003-01-02 11:07:48.000000000 +0200 @@ -1,4 +1,5 @@ gawk: noparms.awk:1: function x(a, b, c , ,) {} -gawk: noparms.awk:1: ^ parse error +gawk: noparms.awk:1: ^ syntax error gawk: noparms.awk:1: function x(a, b, c , ,) {} -gawk: noparms.awk:1: ^ parse error +gawk: noparms.awk:1: ^ syntax error +EXIT CODE: 1 diff -urN gawk-3.1.1/test/nulrsend.awk gawk-3.1.2/test/nulrsend.awk --- gawk-3.1.1/test/nulrsend.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nulrsend.awk 2002-08-06 19:26:57.000000000 +0300 @@ -0,0 +1,112 @@ +# From murata@nips.ac.jp Tue Aug 6 08:02:14 2002 +# Return-Path: +# Received: from localhost (aahz [127.0.0.1]) +# by skeeve.com (8.11.2/8.11.2) with ESMTP id g7652Ej01784 +# for ; Tue, 6 Aug 2002 08:02:14 +0300 +# Received: from actcom.co.il [192.114.47.1] +# by localhost with POP3 (fetchmail-5.7.4) +# for arnold@localhost (single-drop); Mon, 05 Aug 2002 22:02:14 -0700 (PDT) +# Received: by actcom.co.il (mbox arobbins) +# (with Cubic Circle's cucipop (v1.31 1998/05/13) Tue Aug 6 08:13:06 2002) +# X-From_: murata@nips.ac.jp Tue Aug 6 07:26:32 2002 +# Received: from lmail.actcom.co.il by actcom.co.il with ESMTP +# (8.11.6/actcom-0.2) id g764QTu27770 for ; +# Tue, 6 Aug 2002 07:26:30 +0300 (EET DST) +# (rfc931-sender: mail.actcom.co.il [192.114.47.13]) +# Received: from f7.net (consort.superb.net [209.61.216.22]) +# by lmail.actcom.co.il (8.11.6/8.11.6) with ESMTP id g764QRi04673 +# for ; Tue, 6 Aug 2002 07:26:28 +0300 +# Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) +# by f7.net (8.11.6/8.11.6) with ESMTP id g764QQ920486 +# for ; Tue, 6 Aug 2002 00:26:26 -0400 +# Received: from ccms.nips.ac.jp ([133.48.72.2]) +# by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) +# id 17bvvL-00011b-00 +# for ; Tue, 06 Aug 2002 00:26:23 -0400 +# Received: (from murata@localhost) +# by ccms.nips.ac.jp (8.9.3+3.2W/3.7W) id NAA01026; +# Tue, 6 Aug 2002 13:26:21 +0900 +# Date: Tue, 6 Aug 2002 13:26:21 +0900 +# Message-Id: <200208060426.NAA01026@ccms.nips.ac.jp> +# To: bug-gawk@gnu.org +# Cc: murata@nips.ac.jp +# Subject: Bug Report (gawk) +# From: murata@nips.ac.jp (MURATA Yasuhisa) +# Mime-Version: 1.0 +# Content-Type: text/plain; charset=US-ASCII +# X-Mailer: mnews [version 1.21PL5] 1999-04/04(Sun) +# +# Hello, I report a bug. +# +# +# == PROGRAM (filename: atest.awk) == +BEGIN { + RS="" +} + +NR==1 { + print 1 + RS="\n" + next +} + +NR==2 { + print 2 + RS="" + next +} + +NR==3 { + print 3 + RS="\n" + next +} +# ==== +# +# == DATA (filename: atest.txt) == +# 1111 +# +# 2222 +# +# ==== +# note: last line is "\n". +# +# +# == RUN (gawk) == +# > gawk -f atest.awk atest.txt +# 1 +# 2 +# (no stop!) +# ==== +# +# == RUN (nawk) == +# > nawk -f atest.awk atest.txt +# 1 +# 2 +# 3 +# ==== +# +# == VERSION == +# > gawk --version +# GNU Awk 3.1.1 +# Copyright (C) 1989, 1991-2002 Free Software Foundation. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# == +# +# -- +# MURATA Yasuhisa, Technical Staff +# National Institute for Physiological Sciences +# E-mail: murata@nips.ac.jp diff -urN gawk-3.1.1/test/nulrsend.in gawk-3.1.2/test/nulrsend.in --- gawk-3.1.1/test/nulrsend.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nulrsend.in 2002-08-06 19:27:10.000000000 +0300 @@ -0,0 +1,4 @@ +1111 + +2222 + diff -urN gawk-3.1.1/test/nulrsend.ok gawk-3.1.2/test/nulrsend.ok --- gawk-3.1.1/test/nulrsend.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/nulrsend.ok 2002-08-07 23:46:04.000000000 +0300 @@ -0,0 +1,2 @@ +1 +2 diff -urN gawk-3.1.1/test/paramdup.ok gawk-3.1.2/test/paramdup.ok --- gawk-3.1.1/test/paramdup.ok 1995-08-13 07:55:27.000000000 +0300 +++ gawk-3.1.2/test/paramdup.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1,2 +1,3 @@ gawk: paramdup.awk:4: error: function `foo': parameter #4, `b', duplicates parameter #2 gawk: paramdup.awk:4: error: function `foo': parameter #5, `a', duplicates parameter #1 +EXIT CODE: 1 diff -urN gawk-3.1.1/test/parseme.ok gawk-3.1.2/test/parseme.ok --- gawk-3.1.1/test/parseme.ok 2000-12-27 11:15:14.000000000 +0200 +++ gawk-3.1.2/test/parseme.ok 2003-01-02 11:07:49.000000000 +0200 @@ -1,3 +1,4 @@ gawk: parseme.awk:1: BEGIN { toupper(substr*line,1,12)) } -gawk: parseme.awk:1: ^ parse error +gawk: parseme.awk:1: ^ syntax error gawk: parseme.awk:1: fatal: 0 is invalid as number of arguments for toupper +EXIT CODE: 2 diff -urN gawk-3.1.1/test/posix.in gawk-3.1.2/test/posix.in --- gawk-3.1.1/test/posix.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/posix.in 2002-11-03 14:56:04.000000000 +0200 @@ -0,0 +1 @@ +1:2,3 4 diff -urN gawk-3.1.1/test/poundbang.awk gawk-3.1.2/test/poundbang.awk --- gawk-3.1.1/test/poundbang.awk 2000-02-16 09:57:31.000000000 +0200 +++ gawk-3.1.2/test/poundbang.awk 2002-10-01 18:17:26.000000000 +0300 @@ -1,3 +1,2 @@ #! /tmp/gawk -f - { ccount += length($0) } -END { printf "average line length is %2.4f\n", ccount/NR} +{ print } diff -urN gawk-3.1.1/test/prec.awk gawk-3.1.2/test/prec.awk --- gawk-3.1.1/test/prec.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/prec.awk 2003-01-30 17:47:33.000000000 +0200 @@ -0,0 +1,7 @@ +# check the precedence of operators: +BEGIN { + $1 = i = 1 + $+i++ + $- -i++ + print +} diff -urN gawk-3.1.1/test/prec.ok gawk-3.1.2/test/prec.ok --- gawk-3.1.1/test/prec.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/prec.ok 2003-01-30 17:47:40.000000000 +0200 @@ -0,0 +1 @@ +1 diff -urN gawk-3.1.1/test/printf0.awk gawk-3.1.2/test/printf0.awk --- gawk-3.1.1/test/printf0.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/printf0.awk 2003-02-02 15:20:20.000000000 +0200 @@ -0,0 +1,5 @@ +BEGIN { + # bwk accepts this silently: + printf + print "X" +} diff -urN gawk-3.1.1/test/printf0.ok gawk-3.1.2/test/printf0.ok --- gawk-3.1.1/test/printf0.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/printf0.ok 2003-02-02 15:20:20.000000000 +0200 @@ -0,0 +1 @@ +X diff -urN gawk-3.1.1/test/prmarscl.ok gawk-3.1.2/test/prmarscl.ok --- gawk-3.1.1/test/prmarscl.ok 2002-01-07 22:22:30.000000000 +0200 +++ gawk-3.1.2/test/prmarscl.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: prmarscl.awk:3: fatal: attempt to use scalar parameter `a' as an array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/prmreuse.awk gawk-3.1.2/test/prmreuse.awk --- gawk-3.1.1/test/prmreuse.awk 1995-11-02 04:49:32.000000000 +0200 +++ gawk-3.1.2/test/prmreuse.awk 2002-07-25 07:27:47.000000000 +0300 @@ -1,4 +1,4 @@ -# from Pat Rankin, rankin@eql.caltech.edu +# from Pat Rankin, rankin@eql.caltech.edu, now rankin@pactechdata.com BEGIN { dummy(1); legit(); exit } diff -urN gawk-3.1.1/test/rebuf.awk gawk-3.1.2/test/rebuf.awk --- gawk-3.1.1/test/rebuf.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rebuf.awk 2002-09-05 13:28:50.000000000 +0300 @@ -0,0 +1,73 @@ +# From lole@epost.de Wed Sep 4 09:54:19 IDT 2002 +# Article: 14288 of comp.lang.awk +# Path: iad-read.news.verio.net!dfw-artgen!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!213.70.124.113!not-for-mail +# From: LorenzAtWork +# Newsgroups: comp.lang.awk +# Subject: bug in gawk 3.1.1? +# Date: Wed, 28 Aug 2002 10:34:50 +0200 +# Lines: 45 +# Message-ID: <7g1pmukv07c56ep3qav3uebnipdaohqh2l@4ax.com> +# Reply-To: lole@epost.de +# NNTP-Posting-Host: 213.70.124.113 +# Mime-Version: 1.0 +# Content-Type: text/plain; charset=us-ascii +# Content-Transfer-Encoding: 7bit +# X-Trace: fu-berlin.de 1030523788 53278293 213.70.124.113 (16 [68559]) +# X-Newsreader: Forte Agent 1.91/32.564 +# Xref: dfw-artgen comp.lang.awk:14288 +# +# hello all, +# +# I'm using the following script +# +BEGIN { + RS="ti1\n(dwv,)?" + s = 0 + i = 0 +} +{ + if ($1 != "") + s = $1 + print ++i, s +} +# +# to extract values from a file of the form +# +# ti1 +# dwv,98.22 +# ti1 +# dwv,103.08 +# ti1 +# ti1 +# dwv,196.25 +# ti1 +# dwv,210.62 +# ti1 +# dwv,223.53 +# +# The desired result for this example looks like +# +# 1 0 +# 2 98.22 +# 3 103.08 +# 4 103.08 +# 5 196.25 +# 6 210.62 +# 7 223.53 +# +# The script work fine the most time, but when run on the attached file +# (sorry for the size, but the error would not appear with less data) I +# get some (three with the attached file) lines that look like +# +# 1262 dwv,212.97 +# 1277 dwv,174.33 +# 1279 dwv,151.79 +# +# I can't think of a other reason for this than a bug in gawk! +# +# I'm running gawk 3.1.1 on winnt 4.0 +# +# best regards +# Lorenz +# +# diff -urN gawk-3.1.1/test/rebuf.in gawk-3.1.2/test/rebuf.in --- gawk-3.1.1/test/rebuf.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rebuf.in 2002-09-04 09:59:50.000000000 +0300 @@ -0,0 +1,2350 @@ +ti1 +dwv,214.59 +ti1 +dwv,230.31 +ti1 +dwv,242.64 +ti1 +dwv,253.94 +ti1 +dwv,264.33 +ti1 +dwv,270.94 +ti1 +dwv,273.52 +ti1 +dwv,270.08 +ti1 +dwv,263.19 +ti1 +dwv,254.45 +ti1 +dwv,244.91 +ti1 +dwv,234.55 +ti1 +dwv,222.49 +ti1 +dwv,209.94 +ti1 +dwv,197.17 +ti1 +dwv,182.89 +ti1 +dwv,169.76 +ti1 +dwv,158.59 +ti1 +dwv,145.37 +ti1 +dwv,135.46 +ti1 +dwv,124.77 +ti1 +dwv,115.98 +ti1 +dwv,108.77 +ti1 +dwv,101.12 +ti1 +dwv,94.45 +ti1 +dwv,89.08 +ti1 +dwv,84.63 +ti1 +dwv,81.05 +ti1 +dwv,78.93 +ti1 +dwv,76.65 +ti1 +dwv,75.59 +ti1 +ti1 +ti1 +dwv,77.47 +ti1 +dwv,80.17 +ti1 +dwv,83.90 +ti1 +dwv,88.56 +ti1 +dwv,95.69 +ti1 +dwv,97.48 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,203.08 +ti1 +dwv,218.22 +ti1 +dwv,229.37 +ti1 +dwv,238.49 +ti1 +dwv,247.43 +ti1 +dwv,255.22 +ti1 +dwv,261.31 +ti1 +dwv,262.36 +ti1 +dwv,260.66 +ti1 +dwv,256.33 +ti1 +dwv,249.34 +ti1 +dwv,240.03 +ti1 +dwv,228.55 +ti1 +dwv,215.42 +ti1 +dwv,203.37 +ti1 +dwv,190.01 +ti1 +dwv,177.81 +ti1 +dwv,165.44 +ti1 +dwv,152.92 +ti1 +dwv,142.03 +ti1 +dwv,132.91 +ti1 +dwv,124.48 +ti1 +dwv,116.45 +ti1 +dwv,109.06 +ti1 +dwv,103.27 +ti1 +dwv,98.87 +ti1 +dwv,94.95 +ti1 +dwv,92.56 +ti1 +dwv,90.47 +ti1 +dwv,89.48 +ti1 +ti1 +dwv,90.53 +ti1 +dwv,93.07 +ti1 +dwv,97.12 +ti1 +dwv,101.82 +ti1 +dwv,108.18 +ti1 +dwv,109.73 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,202.97 +ti1 +dwv,217.38 +ti1 +dwv,231.73 +ti1 +dwv,243.11 +ti1 +dwv,255.37 +ti1 +dwv,264.12 +ti1 +dwv,269.64 +ti1 +dwv,270.98 +ti1 +dwv,269.65 +ti1 +dwv,264.55 +ti1 +dwv,257.16 +ti1 +dwv,246.01 +ti1 +dwv,232.88 +ti1 +dwv,219.85 +ti1 +dwv,208.79 +ti1 +dwv,197.00 +ti1 +dwv,183.93 +ti1 +dwv,172.00 +ti1 +dwv,160.55 +ti1 +dwv,150.59 +ti1 +dwv,141.47 +ti1 +dwv,133.02 +ti1 +dwv,126.21 +ti1 +dwv,120.64 +ti1 +dwv,115.79 +ti1 +dwv,111.62 +ti1 +dwv,108.41 +ti1 +dwv,106.41 +ti1 +ti1 +ti1 +dwv,109.08 +ti1 +dwv,113.23 +ti1 +dwv,118.57 +ti1 +dwv,122.57 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,208.07 +ti1 +dwv,224.14 +ti1 +dwv,236.28 +ti1 +dwv,248.12 +ti1 +dwv,258.97 +ti1 +dwv,267.74 +ti1 +dwv,272.47 +ti1 +dwv,271.52 +ti1 +dwv,266.80 +ti1 +dwv,258.61 +ti1 +dwv,249.30 +ti1 +dwv,239.19 +ti1 +dwv,228.28 +ti1 +dwv,215.79 +ti1 +dwv,203.86 +ti1 +dwv,190.08 +ti1 +dwv,177.40 +ti1 +dwv,163.81 +ti1 +dwv,152.60 +ti1 +dwv,141.33 +ti1 +dwv,130.98 +ti1 +dwv,121.98 +ti1 +dwv,114.08 +ti1 +dwv,106.61 +ti1 +dwv,99.75 +ti1 +dwv,93.10 +ti1 +dwv,86.57 +ti1 +dwv,80.62 +ti1 +dwv,76.05 +ti1 +dwv,71.52 +ti1 +dwv,68.85 +ti1 +dwv,67.46 +ti1 +dwv,66.86 +ti1 +dwv,67.51 +ti1 +dwv,69.75 +ti1 +dwv,72.85 +ti1 +dwv,76.23 +ti1 +dwv,82.85 +ti1 +dwv,89.33 +ti1 +dwv,93.39 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,188.37 +ti1 +dwv,204.42 +ti1 +dwv,217.16 +ti1 +dwv,228.89 +ti1 +dwv,238.83 +ti1 +dwv,247.70 +ti1 +dwv,253.59 +ti1 +dwv,257.17 +ti1 +ti1 +dwv,254.00 +ti1 +dwv,248.24 +ti1 +dwv,240.14 +ti1 +dwv,229.42 +ti1 +dwv,218.97 +ti1 +dwv,205.09 +ti1 +dwv,192.61 +ti1 +dwv,179.74 +ti1 +dwv,166.76 +ti1 +dwv,155.36 +ti1 +dwv,143.58 +ti1 +dwv,131.40 +ti1 +dwv,121.84 +ti1 +dwv,112.46 +ti1 +dwv,105.41 +ti1 +dwv,97.15 +ti1 +dwv,90.09 +ti1 +dwv,84.79 +ti1 +dwv,80.52 +ti1 +dwv,75.58 +ti1 +dwv,72.59 +ti1 +dwv,69.39 +ti1 +dwv,67.51 +ti1 +dwv,66.42 +ti1 +ti1 +ti1 +dwv,67.82 +ti1 +dwv,69.76 +ti1 +dwv,73.19 +ti1 +dwv,77.35 +ti1 +dwv,82.36 +ti1 +dwv,87.82 +ti1 +dwv,93.30 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,190.58 +ti1 +dwv,203.43 +ti1 +dwv,216.48 +ti1 +dwv,228.89 +ti1 +dwv,241.91 +ti1 +dwv,251.60 +ti1 +dwv,257.78 +ti1 +dwv,262.18 +ti1 +dwv,263.13 +ti1 +dwv,260.91 +ti1 +dwv,255.34 +ti1 +dwv,247.17 +ti1 +dwv,236.85 +ti1 +dwv,225.24 +ti1 +dwv,213.39 +ti1 +dwv,201.46 +ti1 +dwv,187.77 +ti1 +dwv,175.31 +ti1 +dwv,162.95 +ti1 +dwv,152.55 +ti1 +dwv,142.56 +ti1 +dwv,132.94 +ti1 +dwv,125.00 +ti1 +dwv,117.69 +ti1 +dwv,110.96 +ti1 +dwv,105.02 +ti1 +dwv,101.78 +ti1 +dwv,98.48 +ti1 +dwv,97.06 +ti1 +dwv,96.50 +ti1 +ti1 +dwv,98.48 +ti1 +dwv,101.18 +ti1 +dwv,104.56 +ti1 +dwv,109.67 +ti1 +dwv,115.86 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,200.02 +ti1 +dwv,217.51 +ti1 +dwv,233.21 +ti1 +dwv,245.72 +ti1 +dwv,258.21 +ti1 +dwv,267.24 +ti1 +dwv,273.79 +ti1 +dwv,273.20 +ti1 +dwv,270.38 +ti1 +dwv,260.76 +ti1 +dwv,250.05 +ti1 +dwv,241.32 +ti1 +dwv,231.14 +ti1 +dwv,219.83 +ti1 +dwv,206.13 +ti1 +dwv,193.24 +ti1 +dwv,180.73 +ti1 +dwv,167.82 +ti1 +dwv,156.94 +ti1 +dwv,144.13 +ti1 +dwv,134.40 +ti1 +dwv,125.23 +ti1 +dwv,116.13 +ti1 +dwv,107.34 +ti1 +dwv,99.71 +ti1 +dwv,94.11 +ti1 +dwv,88.91 +ti1 +dwv,84.51 +ti1 +dwv,81.50 +ti1 +dwv,78.66 +ti1 +dwv,76.57 +ti1 +dwv,75.82 +ti1 +ti1 +dwv,76.88 +ti1 +dwv,79.03 +ti1 +dwv,82.12 +ti1 +dwv,85.73 +ti1 +dwv,91.05 +ti1 +dwv,96.31 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,184.18 +ti1 +dwv,201.10 +ti1 +dwv,214.21 +ti1 +dwv,226.18 +ti1 +dwv,237.72 +ti1 +dwv,247.57 +ti1 +dwv,254.36 +ti1 +dwv,258.34 +ti1 +dwv,259.80 +ti1 +dwv,257.76 +ti1 +dwv,253.17 +ti1 +dwv,246.51 +ti1 +dwv,237.92 +ti1 +dwv,227.09 +ti1 +dwv,214.13 +ti1 +dwv,202.20 +ti1 +dwv,189.21 +ti1 +dwv,177.65 +ti1 +dwv,166.18 +ti1 +dwv,154.03 +ti1 +dwv,142.21 +ti1 +dwv,131.51 +ti1 +dwv,121.28 +ti1 +dwv,111.80 +ti1 +dwv,104.47 +ti1 +dwv,98.80 +ti1 +dwv,94.76 +ti1 +dwv,91.81 +ti1 +dwv,89.17 +ti1 +dwv,88.00 +ti1 +ti1 +ti1 +dwv,89.20 +ti1 +dwv,91.17 +ti1 +dwv,94.35 +ti1 +dwv,99.00 +ti1 +dwv,105.43 +ti1 +dwv,109.34 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,194.84 +ti1 +dwv,212.05 +ti1 +dwv,226.30 +ti1 +dwv,239.03 +ti1 +dwv,250.94 +ti1 +dwv,259.73 +ti1 +dwv,266.64 +ti1 +dwv,269.67 +ti1 +dwv,269.03 +ti1 +dwv,265.03 +ti1 +dwv,258.23 +ti1 +dwv,249.32 +ti1 +dwv,238.03 +ti1 +dwv,226.20 +ti1 +dwv,213.46 +ti1 +dwv,200.53 +ti1 +dwv,187.65 +ti1 +dwv,174.89 +ti1 +dwv,163.22 +ti1 +dwv,152.47 +ti1 +dwv,142.65 +ti1 +dwv,133.97 +ti1 +dwv,126.59 +ti1 +dwv,120.52 +ti1 +dwv,115.57 +ti1 +dwv,111.49 +ti1 +dwv,108.03 +ti1 +dwv,106.01 +ti1 +dwv,105.28 +ti1 +ti1 +dwv,106.91 +ti1 +dwv,109.73 +ti1 +dwv,114.91 +ti1 +dwv,120.66 +ti1 +dwv,123.74 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,211.57 +ti1 +dwv,227.06 +ti1 +dwv,240.57 +ti1 +dwv,252.26 +ti1 +dwv,262.67 +ti1 +dwv,270.66 +ti1 +dwv,273.40 +ti1 +dwv,270.25 +ti1 +dwv,263.76 +ti1 +dwv,256.03 +ti1 +dwv,246.87 +ti1 +dwv,237.10 +ti1 +dwv,225.11 +ti1 +dwv,211.53 +ti1 +dwv,197.77 +ti1 +dwv,185.75 +ti1 +dwv,173.00 +ti1 +dwv,159.31 +ti1 +dwv,147.18 +ti1 +dwv,134.84 +ti1 +dwv,125.07 +ti1 +dwv,115.82 +ti1 +dwv,107.33 +ti1 +dwv,100.07 +ti1 +dwv,93.55 +ti1 +dwv,87.60 +ti1 +dwv,81.75 +ti1 +dwv,77.03 +ti1 +dwv,73.39 +ti1 +dwv,70.97 +ti1 +dwv,67.94 +ti1 +dwv,66.64 +ti1 +dwv,65.80 +ti1 +ti1 +dwv,66.85 +ti1 +dwv,68.78 +ti1 +dwv,71.47 +ti1 +dwv,74.20 +ti1 +dwv,78.68 +ti1 +dwv,85.08 +ti1 +dwv,87.47 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,185.81 +ti1 +dwv,201.66 +ti1 +dwv,215.07 +ti1 +dwv,227.26 +ti1 +dwv,238.00 +ti1 +dwv,247.64 +ti1 +dwv,255.03 +ti1 +dwv,257.12 +ti1 +dwv,256.17 +ti1 +dwv,253.47 +ti1 +dwv,248.93 +ti1 +dwv,241.39 +ti1 +dwv,231.45 +ti1 +dwv,220.49 +ti1 +dwv,208.48 +ti1 +dwv,196.04 +ti1 +dwv,182.73 +ti1 +dwv,169.40 +ti1 +dwv,157.24 +ti1 +dwv,145.56 +ti1 +dwv,133.54 +ti1 +dwv,124.01 +ti1 +dwv,114.55 +ti1 +dwv,105.75 +ti1 +dwv,98.32 +ti1 +dwv,91.91 +ti1 +dwv,86.08 +ti1 +dwv,81.35 +ti1 +dwv,77.78 +ti1 +dwv,73.85 +ti1 +dwv,71.12 +ti1 +dwv,68.53 +ti1 +dwv,67.09 +ti1 +dwv,66.34 +ti1 +ti1 +ti1 +dwv,67.92 +ti1 +dwv,70.08 +ti1 +dwv,73.78 +ti1 +dwv,78.68 +ti1 +dwv,84.33 +ti1 +dwv,90.25 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,183.19 +ti1 +dwv,198.96 +ti1 +dwv,213.55 +ti1 +dwv,225.91 +ti1 +dwv,237.33 +ti1 +dwv,246.66 +ti1 +dwv,254.98 +ti1 +dwv,259.46 +ti1 +dwv,261.02 +ti1 +dwv,260.02 +ti1 +dwv,255.96 +ti1 +dwv,249.08 +ti1 +dwv,240.15 +ti1 +dwv,229.51 +ti1 +dwv,217.21 +ti1 +dwv,205.06 +ti1 +dwv,192.62 +ti1 +dwv,177.43 +ti1 +dwv,165.06 +ti1 +dwv,152.36 +ti1 +dwv,142.35 +ti1 +dwv,134.58 +ti1 +dwv,126.20 +ti1 +dwv,119.86 +ti1 +dwv,113.67 +ti1 +dwv,108.20 +ti1 +dwv,104.71 +ti1 +dwv,100.83 +ti1 +dwv,98.96 +ti1 +dwv,98.38 +ti1 +ti1 +dwv,100.29 +ti1 +dwv,103.47 +ti1 +dwv,107.73 +ti1 +dwv,113.04 +ti1 +dwv,118.90 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,200.70 +ti1 +dwv,217.77 +ti1 +dwv,232.45 +ti1 +dwv,244.28 +ti1 +dwv,256.61 +ti1 +dwv,265.93 +ti1 +dwv,272.01 +ti1 +ti1 +dwv,268.67 +ti1 +dwv,260.53 +ti1 +dwv,252.09 +ti1 +dwv,243.72 +ti1 +dwv,232.68 +ti1 +dwv,220.49 +ti1 +dwv,206.88 +ti1 +dwv,193.98 +ti1 +dwv,181.33 +ti1 +dwv,168.61 +ti1 +dwv,156.50 +ti1 +dwv,145.54 +ti1 +dwv,136.43 +ti1 +dwv,125.95 +ti1 +dwv,117.26 +ti1 +dwv,109.81 +ti1 +dwv,103.36 +ti1 +dwv,97.15 +ti1 +dwv,92.86 +ti1 +dwv,89.02 +ti1 +dwv,86.39 +ti1 +dwv,84.44 +ti1 +dwv,83.72 +ti1 +ti1 +dwv,85.89 +ti1 +dwv,88.39 +ti1 +dwv,92.31 +ti1 +dwv,96.00 +ti1 +dwv,100.24 +ti1 +dwv,102.55 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,197.15 +ti1 +dwv,212.33 +ti1 +dwv,225.48 +ti1 +dwv,236.75 +ti1 +dwv,247.52 +ti1 +dwv,255.21 +ti1 +dwv,260.74 +ti1 +dwv,262.81 +ti1 +dwv,262.09 +ti1 +dwv,258.08 +ti1 +dwv,250.83 +ti1 +dwv,242.39 +ti1 +dwv,230.86 +ti1 +dwv,219.62 +ti1 +dwv,206.80 +ti1 +dwv,193.41 +ti1 +dwv,180.60 +ti1 +dwv,168.20 +ti1 +dwv,157.77 +ti1 +dwv,145.25 +ti1 +dwv,136.23 +ti1 +dwv,126.28 +ti1 +dwv,118.10 +ti1 +dwv,110.74 +ti1 +dwv,105.29 +ti1 +dwv,99.75 +ti1 +dwv,95.61 +ti1 +dwv,92.16 +ti1 +dwv,89.93 +ti1 +dwv,88.45 +ti1 +ti1 +dwv,89.11 +ti1 +dwv,90.87 +ti1 +dwv,94.21 +ti1 +dwv,98.16 +ti1 +dwv,104.24 +ti1 +dwv,108.98 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,195.81 +ti1 +dwv,211.95 +ti1 +dwv,226.36 +ti1 +dwv,240.61 +ti1 +dwv,251.93 +ti1 +dwv,259.13 +ti1 +dwv,265.36 +ti1 +dwv,269.71 +ti1 +dwv,270.27 +ti1 +dwv,266.44 +ti1 +dwv,260.44 +ti1 +dwv,251.94 +ti1 +dwv,240.79 +ti1 +dwv,228.95 +ti1 +dwv,215.90 +ti1 +dwv,203.25 +ti1 +dwv,190.01 +ti1 +dwv,177.92 +ti1 +dwv,165.60 +ti1 +dwv,155.49 +ti1 +dwv,144.32 +ti1 +dwv,136.07 +ti1 +dwv,127.64 +ti1 +dwv,120.28 +ti1 +dwv,114.57 +ti1 +dwv,109.99 +ti1 +dwv,106.36 +ti1 +dwv,104.49 +ti1 +dwv,103.84 +ti1 +ti1 +dwv,105.77 +ti1 +dwv,107.83 +ti1 +dwv,112.41 +ti1 +dwv,117.71 +ti1 +dwv,120.66 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,210.13 +ti1 +dwv,225.03 +ti1 +dwv,238.76 +ti1 +dwv,250.50 +ti1 +dwv,261.18 +ti1 +dwv,269.22 +ti1 +dwv,274.18 +ti1 +dwv,272.28 +ti1 +dwv,266.66 +ti1 +dwv,258.68 +ti1 +dwv,249.88 +ti1 +dwv,239.94 +ti1 +dwv,227.14 +ti1 +dwv,213.22 +ti1 +dwv,197.58 +ti1 +dwv,184.86 +ti1 +dwv,172.52 +ti1 +dwv,160.19 +ti1 +dwv,149.20 +ti1 +dwv,137.49 +ti1 +dwv,127.86 +ti1 +dwv,118.91 +ti1 +dwv,110.49 +ti1 +dwv,102.73 +ti1 +dwv,96.33 +ti1 +dwv,90.95 +ti1 +dwv,86.38 +ti1 +dwv,82.72 +ti1 +dwv,79.65 +ti1 +dwv,77.61 +ti1 +dwv,75.70 +ti1 +dwv,74.49 +ti1 +ti1 +ti1 +dwv,76.48 +ti1 +dwv,79.14 +ti1 +dwv,82.84 +ti1 +dwv,87.86 +ti1 +dwv,92.69 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,181.33 +ti1 +dwv,196.86 +ti1 +dwv,210.98 +ti1 +dwv,223.13 +ti1 +dwv,233.90 +ti1 +dwv,243.19 +ti1 +dwv,250.57 +ti1 +dwv,255.00 +ti1 +dwv,256.36 +ti1 +dwv,255.16 +ti1 +dwv,250.15 +ti1 +dwv,242.80 +ti1 +dwv,233.82 +ti1 +dwv,223.41 +ti1 +dwv,210.81 +ti1 +dwv,199.04 +ti1 +dwv,187.39 +ti1 +dwv,174.14 +ti1 +dwv,162.62 +ti1 +dwv,151.39 +ti1 +dwv,139.59 +ti1 +dwv,128.71 +ti1 +dwv,119.17 +ti1 +dwv,111.02 +ti1 +dwv,103.91 +ti1 +dwv,96.78 +ti1 +dwv,91.56 +ti1 +dwv,87.13 +ti1 +dwv,83.22 +ti1 +dwv,80.50 +ti1 +dwv,76.83 +ti1 +dwv,74.24 +ti1 +dwv,70.80 +ti1 +dwv,69.04 +ti1 +dwv,67.12 +ti1 +dwv,66.51 +ti1 +ti1 +dwv,68.77 +ti1 +dwv,72.19 +ti1 +dwv,77.34 +ti1 +dwv,84.04 +ti1 +dwv,88.55 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,190.51 +ti1 +dwv,207.14 +ti1 +dwv,220.57 +ti1 +dwv,232.51 +ti1 +dwv,243.35 +ti1 +dwv,252.41 +ti1 +dwv,258.62 +ti1 +dwv,262.18 +ti1 +ti1 +dwv,259.10 +ti1 +dwv,253.54 +ti1 +dwv,245.44 +ti1 +dwv,235.55 +ti1 +dwv,223.43 +ti1 +dwv,209.91 +ti1 +dwv,197.52 +ti1 +dwv,185.90 +ti1 +dwv,172.13 +ti1 +dwv,161.09 +ti1 +dwv,150.58 +ti1 +dwv,140.37 +ti1 +dwv,130.27 +ti1 +dwv,122.13 +ti1 +dwv,114.99 +ti1 +dwv,108.76 +ti1 +dwv,104.67 +ti1 +dwv,100.36 +ti1 +dwv,97.61 +ti1 +dwv,95.48 +ti1 +dwv,94.83 +ti1 +dwv,95.45 +ti1 +dwv,97.15 +ti1 +dwv,100.73 +ti1 +dwv,105.10 +ti1 +dwv,111.46 +ti1 +dwv,118.27 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,202.92 +ti1 +dwv,220.25 +ti1 +dwv,233.35 +ti1 +dwv,243.48 +ti1 +dwv,254.85 +ti1 +dwv,265.75 +ti1 +dwv,272.62 +ti1 +ti1 +dwv,269.36 +ti1 +dwv,261.82 +ti1 +dwv,252.85 +ti1 +dwv,244.08 +ti1 +dwv,232.96 +ti1 +dwv,219.59 +ti1 +dwv,207.32 +ti1 +dwv,193.87 +ti1 +dwv,181.77 +ti1 +dwv,168.60 +ti1 +dwv,155.76 +ti1 +dwv,144.03 +ti1 +dwv,134.07 +ti1 +dwv,123.46 +ti1 +dwv,114.47 +ti1 +dwv,107.64 +ti1 +dwv,100.46 +ti1 +dwv,94.53 +ti1 +dwv,89.28 +ti1 +dwv,84.59 +ti1 +dwv,80.96 +ti1 +dwv,78.54 +ti1 +dwv,76.28 +ti1 +dwv,75.51 +ti1 +ti1 +dwv,76.55 +ti1 +dwv,78.55 +ti1 +dwv,81.57 +ti1 +dwv,85.18 +ti1 +dwv,90.61 +ti1 +dwv,96.01 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,184.51 +ti1 +dwv,201.57 +ti1 +dwv,216.33 +ti1 +dwv,228.69 +ti1 +dwv,239.90 +ti1 +dwv,250.41 +ti1 +dwv,257.91 +ti1 +dwv,262.29 +ti1 +dwv,263.41 +ti1 +dwv,261.70 +ti1 +dwv,256.75 +ti1 +dwv,246.82 +ti1 +dwv,236.35 +ti1 +dwv,225.17 +ti1 +dwv,212.90 +ti1 +dwv,201.61 +ti1 +dwv,188.42 +ti1 +dwv,175.92 +ti1 +dwv,163.70 +ti1 +dwv,153.18 +ti1 +dwv,142.89 +ti1 +dwv,132.95 +ti1 +dwv,125.18 +ti1 +dwv,117.61 +ti1 +dwv,110.36 +ti1 +dwv,104.56 +ti1 +dwv,100.13 +ti1 +dwv,96.64 +ti1 +dwv,93.52 +ti1 +dwv,91.91 +ti1 +ti1 +ti1 +dwv,93.84 +ti1 +dwv,97.13 +ti1 +dwv,101.08 +ti1 +dwv,107.19 +ti1 +dwv,111.89 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,195.89 +ti1 +dwv,212.65 +ti1 +dwv,226.60 +ti1 +dwv,239.28 +ti1 +dwv,251.28 +ti1 +dwv,259.92 +ti1 +dwv,266.03 +ti1 +dwv,269.76 +ti1 +ti1 +dwv,265.55 +ti1 +dwv,258.92 +ti1 +dwv,250.42 +ti1 +dwv,240.04 +ti1 +dwv,229.03 +ti1 +dwv,216.69 +ti1 +dwv,204.21 +ti1 +dwv,191.25 +ti1 +dwv,178.40 +ti1 +dwv,168.31 +ti1 +dwv,157.47 +ti1 +dwv,148.62 +ti1 +dwv,139.12 +ti1 +dwv,129.54 +ti1 +dwv,121.65 +ti1 +dwv,114.59 +ti1 +dwv,109.30 +ti1 +dwv,106.39 +ti1 +dwv,104.71 +ti1 +ti1 +dwv,106.41 +ti1 +dwv,109.22 +ti1 +dwv,113.62 +ti1 +dwv,118.31 +ti1 +dwv,124.34 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,205.67 +ti1 +dwv,221.25 +ti1 +dwv,235.02 +ti1 +dwv,247.47 +ti1 +dwv,258.37 +ti1 +dwv,267.42 +ti1 +dwv,272.60 +ti1 +dwv,272.00 +ti1 +dwv,267.91 +ti1 +dwv,260.38 +ti1 +dwv,251.10 +ti1 +dwv,241.32 +ti1 +dwv,230.96 +ti1 +dwv,217.34 +ti1 +dwv,204.99 +ti1 +dwv,191.24 +ti1 +dwv,178.58 +ti1 +dwv,164.79 +ti1 +dwv,153.07 +ti1 +dwv,141.06 +ti1 +dwv,129.86 +ti1 +dwv,119.79 +ti1 +dwv,111.13 +ti1 +dwv,103.53 +ti1 +dwv,96.95 +ti1 +dwv,89.42 +ti1 +dwv,85.22 +ti1 +dwv,80.54 +ti1 +dwv,76.85 +ti1 +dwv,74.41 +ti1 +dwv,72.12 +ti1 +dwv,71.21 +ti1 +ti1 +ti1 +dwv,72.13 +ti1 +dwv,74.22 +ti1 +dwv,76.95 +ti1 +dwv,80.65 +ti1 +dwv,85.36 +ti1 +dwv,90.60 +ti1 +dwv,92.36 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,191.27 +ti1 +dwv,205.03 +ti1 +dwv,218.89 +ti1 +dwv,230.87 +ti1 +dwv,241.63 +ti1 +dwv,249.83 +ti1 +dwv,255.42 +ti1 +dwv,257.98 +ti1 +dwv,257.33 +ti1 +dwv,252.87 +ti1 +dwv,245.90 +ti1 +dwv,237.78 +ti1 +dwv,227.14 +ti1 +dwv,214.67 +ti1 +dwv,202.31 +ti1 +dwv,188.68 +ti1 +dwv,175.96 +ti1 +dwv,163.25 +ti1 +dwv,151.43 +ti1 +dwv,139.79 +ti1 +dwv,130.40 +ti1 +dwv,118.92 +ti1 +dwv,110.88 +ti1 +dwv,101.92 +ti1 +dwv,94.45 +ti1 +dwv,88.13 +ti1 +dwv,83.19 +ti1 +dwv,79.11 +ti1 +dwv,74.60 +ti1 +dwv,71.86 +ti1 +dwv,68.77 +ti1 +dwv,66.57 +ti1 +dwv,65.24 +ti1 +dwv,64.41 +ti1 +ti1 +dwv,64.92 +ti1 +dwv,66.62 +ti1 +dwv,68.93 +ti1 +dwv,72.77 +ti1 +dwv,77.76 +ti1 +dwv,83.41 +ti1 +dwv,89.19 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,182.68 +ti1 +dwv,199.88 +ti1 +dwv,214.62 +ti1 +dwv,227.29 +ti1 +dwv,238.62 +ti1 +dwv,249.01 +ti1 +dwv,256.68 +ti1 +dwv,262.71 +ti1 +dwv,263.44 +ti1 +dwv,259.87 +ti1 +dwv,254.66 +ti1 +dwv,248.11 +ti1 +dwv,240.01 +ti1 +dwv,229.30 +ti1 +dwv,216.52 +ti1 +dwv,205.15 +ti1 +dwv,192.49 +ti1 +dwv,179.70 +ti1 +dwv,167.51 +ti1 +dwv,156.31 +ti1 +dwv,145.97 +ti1 +dwv,135.93 +ti1 +dwv,128.06 +ti1 +dwv,119.45 +ti1 +dwv,113.01 +ti1 +dwv,108.31 +ti1 +dwv,103.79 +ti1 +dwv,100.92 +ti1 +dwv,98.90 +ti1 +dwv,98.28 +ti1 +ti1 +dwv,100.12 +ti1 +dwv,102.38 +ti1 +dwv,106.07 +ti1 +dwv,111.06 +ti1 +dwv,117.00 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,202.42 +ti1 +dwv,217.46 +ti1 +dwv,232.83 +ti1 +dwv,245.05 +ti1 +dwv,256.39 +ti1 +dwv,265.28 +ti1 +dwv,271.80 +ti1 +ti1 +dwv,268.63 +ti1 +dwv,261.21 +ti1 +dwv,253.57 +ti1 +dwv,244.41 +ti1 +dwv,233.79 +ti1 +dwv,220.80 +ti1 +dwv,209.24 +ti1 +dwv,196.54 +ti1 +dwv,183.38 +ti1 +dwv,170.14 +ti1 +dwv,157.79 +ti1 +dwv,144.31 +ti1 +dwv,131.53 +ti1 +dwv,122.20 +ti1 +dwv,113.46 +ti1 +dwv,106.57 +ti1 +dwv,100.93 +ti1 +dwv,96.80 +ti1 +dwv,92.10 +ti1 +dwv,88.77 +ti1 +dwv,86.07 +ti1 +dwv,83.75 +ti1 +dwv,82.40 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,84.82 +ti1 +dwv,88.34 +ti1 +dwv,92.06 +ti1 +dwv,98.22 +ti1 +dwv,103.08 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,196.25 +ti1 +dwv,210.62 +ti1 +dwv,223.53 +ti1 +dwv,235.01 +ti1 +dwv,245.30 +ti1 +dwv,253.56 +ti1 +dwv,259.86 +ti1 +dwv,261.87 +ti1 +ti1 +dwv,257.71 +ti1 +dwv,251.10 +ti1 +dwv,242.25 +ti1 +dwv,232.00 +ti1 +dwv,219.62 +ti1 +dwv,207.54 +ti1 +dwv,194.54 +ti1 +dwv,182.85 +ti1 +dwv,170.49 +ti1 +dwv,158.24 +ti1 +dwv,147.54 +ti1 +dwv,137.40 +ti1 +dwv,129.81 +ti1 +dwv,121.07 +ti1 +dwv,114.39 +ti1 +dwv,109.32 +ti1 +dwv,103.67 +ti1 +dwv,99.51 +ti1 +dwv,96.53 +ti1 +dwv,94.67 +ti1 +dwv,93.79 +ti1 +ti1 +dwv,95.31 +ti1 +dwv,98.43 +ti1 +dwv,102.95 +ti1 +dwv,109.01 +ti1 +dwv,115.86 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,209.63 +ti1 +dwv,224.03 +ti1 +dwv,236.93 +ti1 +dwv,249.17 +ti1 +dwv,259.34 +ti1 +dwv,267.41 +ti1 +dwv,271.07 +ti1 +dwv,270.51 +ti1 +dwv,263.93 +ti1 +dwv,255.80 +ti1 +dwv,246.03 +ti1 +dwv,235.96 +ti1 +dwv,223.79 +ti1 +dwv,209.68 +ti1 +dwv,196.98 +ti1 +dwv,184.70 +ti1 +dwv,171.16 +ti1 +dwv,157.06 +ti1 +dwv,145.05 +ti1 +dwv,133.80 +ti1 +dwv,123.45 +ti1 +dwv,114.06 +ti1 +dwv,106.78 +ti1 +dwv,98.12 +ti1 +dwv,91.19 +ti1 +dwv,84.78 +ti1 +dwv,80.10 +ti1 +dwv,74.95 +ti1 +dwv,71.88 +ti1 +dwv,68.51 +ti1 +dwv,66.13 +ti1 +dwv,64.64 +ti1 +dwv,63.65 +ti1 +dwv,63.06 +ti1 +ti1 +dwv,64.29 +ti1 +dwv,66.41 +ti1 +dwv,68.95 +ti1 +dwv,73.12 +ti1 +dwv,78.00 +ti1 +dwv,83.67 +ti1 +dwv,85.55 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,187.86 +ti1 +dwv,202.65 +ti1 +dwv,216.23 +ti1 +dwv,228.24 +ti1 +dwv,239.81 +ti1 +dwv,248.77 +ti1 +dwv,252.97 +ti1 +dwv,254.72 +ti1 +ti1 +dwv,253.22 +ti1 +dwv,247.80 +ti1 +dwv,239.99 +ti1 +dwv,229.87 +ti1 +dwv,218.26 +ti1 +dwv,205.99 +ti1 +dwv,193.09 +ti1 +dwv,180.59 +ti1 +dwv,167.42 +ti1 +dwv,154.33 +ti1 +dwv,142.32 +ti1 +dwv,131.88 +ti1 +dwv,122.32 +ti1 +dwv,112.84 +ti1 +dwv,104.07 +ti1 +dwv,96.62 +ti1 +dwv,90.02 +ti1 +dwv,84.43 +ti1 +dwv,79.90 +ti1 +dwv,74.59 +ti1 +dwv,71.27 +ti1 +dwv,67.37 +ti1 +dwv,64.97 +ti1 +dwv,62.82 +ti1 +dwv,61.60 +ti1 +ti1 +ti1 +dwv,62.99 +ti1 +dwv,64.80 +ti1 +dwv,68.51 +ti1 +dwv,72.70 +ti1 +dwv,77.97 +ti1 +dwv,84.10 +ti1 +dwv,88.07 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +ti1 +dwv,184.25 +ti1 +dwv,199.56 +ti1 +dwv,212.97 +ti1 +dwv,226.37 +ti1 +dwv,237.23 +ti1 +dwv,247.66 +ti1 +dwv,254.97 +ti1 +dwv,259.77 +ti1 +dwv,261.89 +ti1 +dwv,260.39 +ti1 +dwv,255.67 +ti1 +dwv,248.49 +ti1 +dwv,238.75 +ti1 +dwv,228.34 +ti1 +dwv,215.95 +ti1 +dwv,201.71 +ti1 +dwv,187.12 +ti1 +dwv,174.33 +ti1 +dwv,162.05 +ti1 +dwv,151.79 +ti1 +dwv,142.67 +ti1 +dwv,134.03 +ti1 +dwv,126.03 +ti1 +dwv,118.64 +ti1 +dwv,112.00 +ti1 +dwv,107.16 +ti1 +dwv,103.71 +ti1 +dwv,100.06 +ti1 +dwv,98.59 +ti1 +dwv,97.68 +ti1 +ti1 diff -urN gawk-3.1.1/test/rebuf.ok gawk-3.1.2/test/rebuf.ok --- gawk-3.1.1/test/rebuf.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rebuf.ok 2002-09-04 10:52:26.000000000 +0300 @@ -0,0 +1,1290 @@ +1 0 +2 214.59 +3 230.31 +4 242.64 +5 253.94 +6 264.33 +7 270.94 +8 273.52 +9 270.08 +10 263.19 +11 254.45 +12 244.91 +13 234.55 +14 222.49 +15 209.94 +16 197.17 +17 182.89 +18 169.76 +19 158.59 +20 145.37 +21 135.46 +22 124.77 +23 115.98 +24 108.77 +25 101.12 +26 94.45 +27 89.08 +28 84.63 +29 81.05 +30 78.93 +31 76.65 +32 75.59 +33 75.59 +34 75.59 +35 77.47 +36 80.17 +37 83.90 +38 88.56 +39 95.69 +40 97.48 +41 97.48 +42 97.48 +43 97.48 +44 97.48 +45 97.48 +46 97.48 +47 97.48 +48 203.08 +49 218.22 +50 229.37 +51 238.49 +52 247.43 +53 255.22 +54 261.31 +55 262.36 +56 260.66 +57 256.33 +58 249.34 +59 240.03 +60 228.55 +61 215.42 +62 203.37 +63 190.01 +64 177.81 +65 165.44 +66 152.92 +67 142.03 +68 132.91 +69 124.48 +70 116.45 +71 109.06 +72 103.27 +73 98.87 +74 94.95 +75 92.56 +76 90.47 +77 89.48 +78 89.48 +79 90.53 +80 93.07 +81 97.12 +82 101.82 +83 108.18 +84 109.73 +85 109.73 +86 109.73 +87 109.73 +88 109.73 +89 109.73 +90 109.73 +91 202.97 +92 217.38 +93 231.73 +94 243.11 +95 255.37 +96 264.12 +97 269.64 +98 270.98 +99 269.65 +100 264.55 +101 257.16 +102 246.01 +103 232.88 +104 219.85 +105 208.79 +106 197.00 +107 183.93 +108 172.00 +109 160.55 +110 150.59 +111 141.47 +112 133.02 +113 126.21 +114 120.64 +115 115.79 +116 111.62 +117 108.41 +118 106.41 +119 106.41 +120 106.41 +121 109.08 +122 113.23 +123 118.57 +124 122.57 +125 122.57 +126 122.57 +127 122.57 +128 122.57 +129 122.57 +130 122.57 +131 208.07 +132 224.14 +133 236.28 +134 248.12 +135 258.97 +136 267.74 +137 272.47 +138 271.52 +139 266.80 +140 258.61 +141 249.30 +142 239.19 +143 228.28 +144 215.79 +145 203.86 +146 190.08 +147 177.40 +148 163.81 +149 152.60 +150 141.33 +151 130.98 +152 121.98 +153 114.08 +154 106.61 +155 99.75 +156 93.10 +157 86.57 +158 80.62 +159 76.05 +160 71.52 +161 68.85 +162 67.46 +163 66.86 +164 67.51 +165 69.75 +166 72.85 +167 76.23 +168 82.85 +169 89.33 +170 93.39 +171 93.39 +172 93.39 +173 93.39 +174 93.39 +175 93.39 +176 93.39 +177 93.39 +178 188.37 +179 204.42 +180 217.16 +181 228.89 +182 238.83 +183 247.70 +184 253.59 +185 257.17 +186 257.17 +187 254.00 +188 248.24 +189 240.14 +190 229.42 +191 218.97 +192 205.09 +193 192.61 +194 179.74 +195 166.76 +196 155.36 +197 143.58 +198 131.40 +199 121.84 +200 112.46 +201 105.41 +202 97.15 +203 90.09 +204 84.79 +205 80.52 +206 75.58 +207 72.59 +208 69.39 +209 67.51 +210 66.42 +211 66.42 +212 66.42 +213 67.82 +214 69.76 +215 73.19 +216 77.35 +217 82.36 +218 87.82 +219 93.30 +220 93.30 +221 93.30 +222 93.30 +223 93.30 +224 93.30 +225 93.30 +226 93.30 +227 190.58 +228 203.43 +229 216.48 +230 228.89 +231 241.91 +232 251.60 +233 257.78 +234 262.18 +235 263.13 +236 260.91 +237 255.34 +238 247.17 +239 236.85 +240 225.24 +241 213.39 +242 201.46 +243 187.77 +244 175.31 +245 162.95 +246 152.55 +247 142.56 +248 132.94 +249 125.00 +250 117.69 +251 110.96 +252 105.02 +253 101.78 +254 98.48 +255 97.06 +256 96.50 +257 96.50 +258 98.48 +259 101.18 +260 104.56 +261 109.67 +262 115.86 +263 115.86 +264 115.86 +265 115.86 +266 115.86 +267 115.86 +268 115.86 +269 200.02 +270 217.51 +271 233.21 +272 245.72 +273 258.21 +274 267.24 +275 273.79 +276 273.20 +277 270.38 +278 260.76 +279 250.05 +280 241.32 +281 231.14 +282 219.83 +283 206.13 +284 193.24 +285 180.73 +286 167.82 +287 156.94 +288 144.13 +289 134.40 +290 125.23 +291 116.13 +292 107.34 +293 99.71 +294 94.11 +295 88.91 +296 84.51 +297 81.50 +298 78.66 +299 76.57 +300 75.82 +301 75.82 +302 76.88 +303 79.03 +304 82.12 +305 85.73 +306 91.05 +307 96.31 +308 96.31 +309 96.31 +310 96.31 +311 96.31 +312 96.31 +313 96.31 +314 96.31 +315 184.18 +316 201.10 +317 214.21 +318 226.18 +319 237.72 +320 247.57 +321 254.36 +322 258.34 +323 259.80 +324 257.76 +325 253.17 +326 246.51 +327 237.92 +328 227.09 +329 214.13 +330 202.20 +331 189.21 +332 177.65 +333 166.18 +334 154.03 +335 142.21 +336 131.51 +337 121.28 +338 111.80 +339 104.47 +340 98.80 +341 94.76 +342 91.81 +343 89.17 +344 88.00 +345 88.00 +346 88.00 +347 89.20 +348 91.17 +349 94.35 +350 99.00 +351 105.43 +352 109.34 +353 109.34 +354 109.34 +355 109.34 +356 109.34 +357 109.34 +358 109.34 +359 194.84 +360 212.05 +361 226.30 +362 239.03 +363 250.94 +364 259.73 +365 266.64 +366 269.67 +367 269.03 +368 265.03 +369 258.23 +370 249.32 +371 238.03 +372 226.20 +373 213.46 +374 200.53 +375 187.65 +376 174.89 +377 163.22 +378 152.47 +379 142.65 +380 133.97 +381 126.59 +382 120.52 +383 115.57 +384 111.49 +385 108.03 +386 106.01 +387 105.28 +388 105.28 +389 106.91 +390 109.73 +391 114.91 +392 120.66 +393 123.74 +394 123.74 +395 123.74 +396 123.74 +397 123.74 +398 123.74 +399 123.74 +400 211.57 +401 227.06 +402 240.57 +403 252.26 +404 262.67 +405 270.66 +406 273.40 +407 270.25 +408 263.76 +409 256.03 +410 246.87 +411 237.10 +412 225.11 +413 211.53 +414 197.77 +415 185.75 +416 173.00 +417 159.31 +418 147.18 +419 134.84 +420 125.07 +421 115.82 +422 107.33 +423 100.07 +424 93.55 +425 87.60 +426 81.75 +427 77.03 +428 73.39 +429 70.97 +430 67.94 +431 66.64 +432 65.80 +433 65.80 +434 66.85 +435 68.78 +436 71.47 +437 74.20 +438 78.68 +439 85.08 +440 87.47 +441 87.47 +442 87.47 +443 87.47 +444 87.47 +445 87.47 +446 87.47 +447 87.47 +448 185.81 +449 201.66 +450 215.07 +451 227.26 +452 238.00 +453 247.64 +454 255.03 +455 257.12 +456 256.17 +457 253.47 +458 248.93 +459 241.39 +460 231.45 +461 220.49 +462 208.48 +463 196.04 +464 182.73 +465 169.40 +466 157.24 +467 145.56 +468 133.54 +469 124.01 +470 114.55 +471 105.75 +472 98.32 +473 91.91 +474 86.08 +475 81.35 +476 77.78 +477 73.85 +478 71.12 +479 68.53 +480 67.09 +481 66.34 +482 66.34 +483 66.34 +484 67.92 +485 70.08 +486 73.78 +487 78.68 +488 84.33 +489 90.25 +490 90.25 +491 90.25 +492 90.25 +493 90.25 +494 90.25 +495 90.25 +496 90.25 +497 183.19 +498 198.96 +499 213.55 +500 225.91 +501 237.33 +502 246.66 +503 254.98 +504 259.46 +505 261.02 +506 260.02 +507 255.96 +508 249.08 +509 240.15 +510 229.51 +511 217.21 +512 205.06 +513 192.62 +514 177.43 +515 165.06 +516 152.36 +517 142.35 +518 134.58 +519 126.20 +520 119.86 +521 113.67 +522 108.20 +523 104.71 +524 100.83 +525 98.96 +526 98.38 +527 98.38 +528 100.29 +529 103.47 +530 107.73 +531 113.04 +532 118.90 +533 118.90 +534 118.90 +535 118.90 +536 118.90 +537 118.90 +538 118.90 +539 200.70 +540 217.77 +541 232.45 +542 244.28 +543 256.61 +544 265.93 +545 272.01 +546 272.01 +547 268.67 +548 260.53 +549 252.09 +550 243.72 +551 232.68 +552 220.49 +553 206.88 +554 193.98 +555 181.33 +556 168.61 +557 156.50 +558 145.54 +559 136.43 +560 125.95 +561 117.26 +562 109.81 +563 103.36 +564 97.15 +565 92.86 +566 89.02 +567 86.39 +568 84.44 +569 83.72 +570 83.72 +571 85.89 +572 88.39 +573 92.31 +574 96.00 +575 100.24 +576 102.55 +577 102.55 +578 102.55 +579 102.55 +580 102.55 +581 102.55 +582 102.55 +583 102.55 +584 197.15 +585 212.33 +586 225.48 +587 236.75 +588 247.52 +589 255.21 +590 260.74 +591 262.81 +592 262.09 +593 258.08 +594 250.83 +595 242.39 +596 230.86 +597 219.62 +598 206.80 +599 193.41 +600 180.60 +601 168.20 +602 157.77 +603 145.25 +604 136.23 +605 126.28 +606 118.10 +607 110.74 +608 105.29 +609 99.75 +610 95.61 +611 92.16 +612 89.93 +613 88.45 +614 88.45 +615 89.11 +616 90.87 +617 94.21 +618 98.16 +619 104.24 +620 108.98 +621 108.98 +622 108.98 +623 108.98 +624 108.98 +625 108.98 +626 108.98 +627 195.81 +628 211.95 +629 226.36 +630 240.61 +631 251.93 +632 259.13 +633 265.36 +634 269.71 +635 270.27 +636 266.44 +637 260.44 +638 251.94 +639 240.79 +640 228.95 +641 215.90 +642 203.25 +643 190.01 +644 177.92 +645 165.60 +646 155.49 +647 144.32 +648 136.07 +649 127.64 +650 120.28 +651 114.57 +652 109.99 +653 106.36 +654 104.49 +655 103.84 +656 103.84 +657 105.77 +658 107.83 +659 112.41 +660 117.71 +661 120.66 +662 120.66 +663 120.66 +664 120.66 +665 120.66 +666 120.66 +667 120.66 +668 210.13 +669 225.03 +670 238.76 +671 250.50 +672 261.18 +673 269.22 +674 274.18 +675 272.28 +676 266.66 +677 258.68 +678 249.88 +679 239.94 +680 227.14 +681 213.22 +682 197.58 +683 184.86 +684 172.52 +685 160.19 +686 149.20 +687 137.49 +688 127.86 +689 118.91 +690 110.49 +691 102.73 +692 96.33 +693 90.95 +694 86.38 +695 82.72 +696 79.65 +697 77.61 +698 75.70 +699 74.49 +700 74.49 +701 74.49 +702 76.48 +703 79.14 +704 82.84 +705 87.86 +706 92.69 +707 92.69 +708 92.69 +709 92.69 +710 92.69 +711 92.69 +712 92.69 +713 92.69 +714 181.33 +715 196.86 +716 210.98 +717 223.13 +718 233.90 +719 243.19 +720 250.57 +721 255.00 +722 256.36 +723 255.16 +724 250.15 +725 242.80 +726 233.82 +727 223.41 +728 210.81 +729 199.04 +730 187.39 +731 174.14 +732 162.62 +733 151.39 +734 139.59 +735 128.71 +736 119.17 +737 111.02 +738 103.91 +739 96.78 +740 91.56 +741 87.13 +742 83.22 +743 80.50 +744 76.83 +745 74.24 +746 70.80 +747 69.04 +748 67.12 +749 66.51 +750 66.51 +751 68.77 +752 72.19 +753 77.34 +754 84.04 +755 88.55 +756 88.55 +757 88.55 +758 88.55 +759 88.55 +760 88.55 +761 88.55 +762 88.55 +763 190.51 +764 207.14 +765 220.57 +766 232.51 +767 243.35 +768 252.41 +769 258.62 +770 262.18 +771 262.18 +772 259.10 +773 253.54 +774 245.44 +775 235.55 +776 223.43 +777 209.91 +778 197.52 +779 185.90 +780 172.13 +781 161.09 +782 150.58 +783 140.37 +784 130.27 +785 122.13 +786 114.99 +787 108.76 +788 104.67 +789 100.36 +790 97.61 +791 95.48 +792 94.83 +793 95.45 +794 97.15 +795 100.73 +796 105.10 +797 111.46 +798 118.27 +799 118.27 +800 118.27 +801 118.27 +802 118.27 +803 118.27 +804 118.27 +805 202.92 +806 220.25 +807 233.35 +808 243.48 +809 254.85 +810 265.75 +811 272.62 +812 272.62 +813 269.36 +814 261.82 +815 252.85 +816 244.08 +817 232.96 +818 219.59 +819 207.32 +820 193.87 +821 181.77 +822 168.60 +823 155.76 +824 144.03 +825 134.07 +826 123.46 +827 114.47 +828 107.64 +829 100.46 +830 94.53 +831 89.28 +832 84.59 +833 80.96 +834 78.54 +835 76.28 +836 75.51 +837 75.51 +838 76.55 +839 78.55 +840 81.57 +841 85.18 +842 90.61 +843 96.01 +844 96.01 +845 96.01 +846 96.01 +847 96.01 +848 96.01 +849 96.01 +850 96.01 +851 184.51 +852 201.57 +853 216.33 +854 228.69 +855 239.90 +856 250.41 +857 257.91 +858 262.29 +859 263.41 +860 261.70 +861 256.75 +862 246.82 +863 236.35 +864 225.17 +865 212.90 +866 201.61 +867 188.42 +868 175.92 +869 163.70 +870 153.18 +871 142.89 +872 132.95 +873 125.18 +874 117.61 +875 110.36 +876 104.56 +877 100.13 +878 96.64 +879 93.52 +880 91.91 +881 91.91 +882 91.91 +883 93.84 +884 97.13 +885 101.08 +886 107.19 +887 111.89 +888 111.89 +889 111.89 +890 111.89 +891 111.89 +892 111.89 +893 111.89 +894 195.89 +895 212.65 +896 226.60 +897 239.28 +898 251.28 +899 259.92 +900 266.03 +901 269.76 +902 269.76 +903 265.55 +904 258.92 +905 250.42 +906 240.04 +907 229.03 +908 216.69 +909 204.21 +910 191.25 +911 178.40 +912 168.31 +913 157.47 +914 148.62 +915 139.12 +916 129.54 +917 121.65 +918 114.59 +919 109.30 +920 106.39 +921 104.71 +922 104.71 +923 106.41 +924 109.22 +925 113.62 +926 118.31 +927 124.34 +928 124.34 +929 124.34 +930 124.34 +931 124.34 +932 124.34 +933 124.34 +934 205.67 +935 221.25 +936 235.02 +937 247.47 +938 258.37 +939 267.42 +940 272.60 +941 272.00 +942 267.91 +943 260.38 +944 251.10 +945 241.32 +946 230.96 +947 217.34 +948 204.99 +949 191.24 +950 178.58 +951 164.79 +952 153.07 +953 141.06 +954 129.86 +955 119.79 +956 111.13 +957 103.53 +958 96.95 +959 89.42 +960 85.22 +961 80.54 +962 76.85 +963 74.41 +964 72.12 +965 71.21 +966 71.21 +967 71.21 +968 72.13 +969 74.22 +970 76.95 +971 80.65 +972 85.36 +973 90.60 +974 92.36 +975 92.36 +976 92.36 +977 92.36 +978 92.36 +979 92.36 +980 92.36 +981 92.36 +982 191.27 +983 205.03 +984 218.89 +985 230.87 +986 241.63 +987 249.83 +988 255.42 +989 257.98 +990 257.33 +991 252.87 +992 245.90 +993 237.78 +994 227.14 +995 214.67 +996 202.31 +997 188.68 +998 175.96 +999 163.25 +1000 151.43 +1001 139.79 +1002 130.40 +1003 118.92 +1004 110.88 +1005 101.92 +1006 94.45 +1007 88.13 +1008 83.19 +1009 79.11 +1010 74.60 +1011 71.86 +1012 68.77 +1013 66.57 +1014 65.24 +1015 64.41 +1016 64.41 +1017 64.92 +1018 66.62 +1019 68.93 +1020 72.77 +1021 77.76 +1022 83.41 +1023 89.19 +1024 89.19 +1025 89.19 +1026 89.19 +1027 89.19 +1028 89.19 +1029 89.19 +1030 89.19 +1031 182.68 +1032 199.88 +1033 214.62 +1034 227.29 +1035 238.62 +1036 249.01 +1037 256.68 +1038 262.71 +1039 263.44 +1040 259.87 +1041 254.66 +1042 248.11 +1043 240.01 +1044 229.30 +1045 216.52 +1046 205.15 +1047 192.49 +1048 179.70 +1049 167.51 +1050 156.31 +1051 145.97 +1052 135.93 +1053 128.06 +1054 119.45 +1055 113.01 +1056 108.31 +1057 103.79 +1058 100.92 +1059 98.90 +1060 98.28 +1061 98.28 +1062 100.12 +1063 102.38 +1064 106.07 +1065 111.06 +1066 117.00 +1067 117.00 +1068 117.00 +1069 117.00 +1070 117.00 +1071 117.00 +1072 117.00 +1073 202.42 +1074 217.46 +1075 232.83 +1076 245.05 +1077 256.39 +1078 265.28 +1079 271.80 +1080 271.80 +1081 268.63 +1082 261.21 +1083 253.57 +1084 244.41 +1085 233.79 +1086 220.80 +1087 209.24 +1088 196.54 +1089 183.38 +1090 170.14 +1091 157.79 +1092 144.31 +1093 131.53 +1094 122.20 +1095 113.46 +1096 106.57 +1097 100.93 +1098 96.80 +1099 92.10 +1100 88.77 +1101 86.07 +1102 83.75 +1103 82.40 +1104 82.40 +1105 82.40 +1106 82.40 +1107 82.40 +1108 84.82 +1109 88.34 +1110 92.06 +1111 98.22 +1112 103.08 +1113 103.08 +1114 103.08 +1115 103.08 +1116 103.08 +1117 103.08 +1118 196.25 +1119 210.62 +1120 223.53 +1121 235.01 +1122 245.30 +1123 253.56 +1124 259.86 +1125 261.87 +1126 261.87 +1127 257.71 +1128 251.10 +1129 242.25 +1130 232.00 +1131 219.62 +1132 207.54 +1133 194.54 +1134 182.85 +1135 170.49 +1136 158.24 +1137 147.54 +1138 137.40 +1139 129.81 +1140 121.07 +1141 114.39 +1142 109.32 +1143 103.67 +1144 99.51 +1145 96.53 +1146 94.67 +1147 93.79 +1148 93.79 +1149 95.31 +1150 98.43 +1151 102.95 +1152 109.01 +1153 115.86 +1154 115.86 +1155 115.86 +1156 115.86 +1157 115.86 +1158 115.86 +1159 115.86 +1160 115.86 +1161 209.63 +1162 224.03 +1163 236.93 +1164 249.17 +1165 259.34 +1166 267.41 +1167 271.07 +1168 270.51 +1169 263.93 +1170 255.80 +1171 246.03 +1172 235.96 +1173 223.79 +1174 209.68 +1175 196.98 +1176 184.70 +1177 171.16 +1178 157.06 +1179 145.05 +1180 133.80 +1181 123.45 +1182 114.06 +1183 106.78 +1184 98.12 +1185 91.19 +1186 84.78 +1187 80.10 +1188 74.95 +1189 71.88 +1190 68.51 +1191 66.13 +1192 64.64 +1193 63.65 +1194 63.06 +1195 63.06 +1196 64.29 +1197 66.41 +1198 68.95 +1199 73.12 +1200 78.00 +1201 83.67 +1202 85.55 +1203 85.55 +1204 85.55 +1205 85.55 +1206 85.55 +1207 85.55 +1208 85.55 +1209 85.55 +1210 187.86 +1211 202.65 +1212 216.23 +1213 228.24 +1214 239.81 +1215 248.77 +1216 252.97 +1217 254.72 +1218 254.72 +1219 253.22 +1220 247.80 +1221 239.99 +1222 229.87 +1223 218.26 +1224 205.99 +1225 193.09 +1226 180.59 +1227 167.42 +1228 154.33 +1229 142.32 +1230 131.88 +1231 122.32 +1232 112.84 +1233 104.07 +1234 96.62 +1235 90.02 +1236 84.43 +1237 79.90 +1238 74.59 +1239 71.27 +1240 67.37 +1241 64.97 +1242 62.82 +1243 61.60 +1244 61.60 +1245 61.60 +1246 62.99 +1247 64.80 +1248 68.51 +1249 72.70 +1250 77.97 +1251 84.10 +1252 88.07 +1253 88.07 +1254 88.07 +1255 88.07 +1256 88.07 +1257 88.07 +1258 88.07 +1259 88.07 +1260 184.25 +1261 199.56 +1262 212.97 +1263 226.37 +1264 237.23 +1265 247.66 +1266 254.97 +1267 259.77 +1268 261.89 +1269 260.39 +1270 255.67 +1271 248.49 +1272 238.75 +1273 228.34 +1274 215.95 +1275 201.71 +1276 187.12 +1277 174.33 +1278 162.05 +1279 151.79 +1280 142.67 +1281 134.03 +1282 126.03 +1283 118.64 +1284 112.00 +1285 107.16 +1286 103.71 +1287 100.06 +1288 98.59 +1289 97.68 +1290 97.68 diff -urN gawk-3.1.1/test/resplit.awk gawk-3.1.2/test/resplit.awk --- gawk-3.1.1/test/resplit.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/resplit.awk 2002-11-03 15:06:55.000000000 +0200 @@ -0,0 +1 @@ +{ FS = ":"; $0 = $0; print $2 } diff -urN gawk-3.1.1/test/resplit.in gawk-3.1.2/test/resplit.in --- gawk-3.1.1/test/resplit.in 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/resplit.in 2002-11-03 15:06:28.000000000 +0200 @@ -0,0 +1 @@ +a:b:c d:e:f diff -urN gawk-3.1.1/test/rs.awk gawk-3.1.2/test/rs.awk --- gawk-3.1.1/test/rs.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rs.awk 2002-11-03 15:20:16.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { RS = "" } +{ print $1, $2 } diff -urN gawk-3.1.1/test/rstest1.awk gawk-3.1.2/test/rstest1.awk --- gawk-3.1.1/test/rstest1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rstest1.awk 2002-10-28 15:48:35.000000000 +0200 @@ -0,0 +1,7 @@ +BEGIN { + RS = "" + FS = ":" + s = "a:b\nc:d" + print split(s,a) + print length(a[2]) +} diff -urN gawk-3.1.1/test/rstest1.ok gawk-3.1.2/test/rstest1.ok --- gawk-3.1.1/test/rstest1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rstest1.ok 2002-10-28 16:00:28.000000000 +0200 @@ -0,0 +1,2 @@ +3 +3 diff -urN gawk-3.1.1/test/rstest2.awk gawk-3.1.2/test/rstest2.awk --- gawk-3.1.1/test/rstest2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rstest2.awk 2002-10-28 15:59:48.000000000 +0200 @@ -0,0 +1,6 @@ +BEGIN { + RS = "" + FS = "\\" + $0 = "a\\b" + print $1 +} diff -urN gawk-3.1.1/test/rstest2.ok gawk-3.1.2/test/rstest2.ok --- gawk-3.1.1/test/rstest2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/rstest2.ok 2002-10-28 16:00:31.000000000 +0200 @@ -0,0 +1 @@ +a diff -urN gawk-3.1.1/test/sclforin.ok gawk-3.1.2/test/sclforin.ok --- gawk-3.1.1/test/sclforin.ok 1998-07-14 05:50:33.000000000 +0300 +++ gawk-3.1.2/test/sclforin.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: sclforin.awk:1: fatal: attempt to use scalar `j' as array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/sclifin.ok gawk-3.1.2/test/sclifin.ok --- gawk-3.1.1/test/sclifin.ok 1997-12-13 21:24:23.000000000 +0200 +++ gawk-3.1.2/test/sclifin.ok 2002-10-28 11:18:30.000000000 +0200 @@ -1 +1,2 @@ gawk: sclifin.awk:7: fatal: attempt to use scalar `j' as array +EXIT CODE: 2 diff -urN gawk-3.1.1/test/space.ok gawk-3.1.2/test/space.ok --- gawk-3.1.1/test/space.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/space.ok 2002-12-10 14:43:09.000000000 +0200 @@ -0,0 +1,2 @@ +gawk: fatal: can't open source file ` ' for reading (No such file or directory) +EXIT CODE: 2 diff -urN gawk-3.1.1/test/splitarr.awk gawk-3.1.2/test/splitarr.awk --- gawk-3.1.1/test/splitarr.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/splitarr.awk 2003-01-30 15:31:43.000000000 +0200 @@ -0,0 +1,5 @@ +BEGIN { + a[1] = "elephantie" + a[2] = "e" + print split(a[1],a,a[2]), a[2], a[3], split(a[2],a,a[2]) +} diff -urN gawk-3.1.1/test/splitarr.ok gawk-3.1.2/test/splitarr.ok --- gawk-3.1.1/test/splitarr.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/splitarr.ok 2003-01-30 15:31:43.000000000 +0200 @@ -0,0 +1 @@ +4 l phanti 2 diff -urN gawk-3.1.1/test/strtod.awk gawk-3.1.2/test/strtod.awk --- gawk-3.1.1/test/strtod.awk 2000-09-06 15:07:31.000000000 +0300 +++ gawk-3.1.2/test/strtod.awk 2003-01-27 11:53:29.000000000 +0200 @@ -1 +1,5 @@ -{ x = "0x" $1 ; print x, x + 0 } +{ + x = "0x" $1 ; print x, x + 0 + for (i=1; i<=NF; i++) + if ($i) print $i, "is not zero" +} diff -urN gawk-3.1.1/test/strtod.in gawk-3.1.2/test/strtod.in --- gawk-3.1.1/test/strtod.in 2000-09-06 15:07:36.000000000 +0300 +++ gawk-3.1.2/test/strtod.in 2003-01-27 11:53:29.000000000 +0200 @@ -1 +1 @@ -345 +345 0 00 0e0 0E1 00E0 000e-5 .0e+0 diff -urN gawk-3.1.1/test/strtod.ok gawk-3.1.2/test/strtod.ok --- gawk-3.1.1/test/strtod.ok 2000-09-06 15:07:51.000000000 +0300 +++ gawk-3.1.2/test/strtod.ok 2003-01-27 11:53:29.000000000 +0200 @@ -1 +1,2 @@ 0x345 0 +345 is not zero diff -urN gawk-3.1.1/test/synerr1.awk gawk-3.1.2/test/synerr1.awk --- gawk-3.1.1/test/synerr1.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/synerr1.awk 2003-03-19 14:12:31.000000000 +0200 @@ -0,0 +1,4 @@ +# program to make sure we don't infinite +# syntax errors + +print "hi" diff -urN gawk-3.1.1/test/synerr1.ok gawk-3.1.2/test/synerr1.ok --- gawk-3.1.1/test/synerr1.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/synerr1.ok 2003-03-19 14:12:55.000000000 +0200 @@ -0,0 +1,3 @@ +gawk: synerr1.awk:4: print "hi" +gawk: synerr1.awk:4: ^ syntax error +EXIT CODE: 1 diff -urN gawk-3.1.1/test/uninit2.awk gawk-3.1.2/test/uninit2.awk --- gawk-3.1.1/test/uninit2.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/uninit2.awk 2002-11-03 14:35:54.000000000 +0200 @@ -0,0 +1,2 @@ +BEGIN { a = a + 1; x = a; print a} +BEGIN { ++b; x = b; print b} diff -urN gawk-3.1.1/test/uninit2.ok gawk-3.1.2/test/uninit2.ok --- gawk-3.1.1/test/uninit2.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/uninit2.ok 2002-11-03 14:36:17.000000000 +0200 @@ -0,0 +1,4 @@ +gawk: uninit2.awk:1: warning: reference to uninitialized variable `a' +1 +gawk: uninit2.awk:2: warning: reference to uninitialized variable `b' +1 diff -urN gawk-3.1.1/test/uninitialized.awk gawk-3.1.2/test/uninitialized.awk --- gawk-3.1.1/test/uninitialized.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/uninitialized.awk 2002-10-28 12:21:05.000000000 +0200 @@ -0,0 +1,3 @@ +BEGIN { + a += 2 +} diff -urN gawk-3.1.1/test/uninitialized.ok gawk-3.1.2/test/uninitialized.ok --- gawk-3.1.1/test/uninitialized.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/uninitialized.ok 2002-10-28 12:21:05.000000000 +0200 @@ -0,0 +1 @@ +gawk: uninitialized.awk:2: warning: reference to uninitialized variable `a' diff -urN gawk-3.1.1/test/zeroe0.awk gawk-3.1.2/test/zeroe0.awk --- gawk-3.1.1/test/zeroe0.awk 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/zeroe0.awk 2003-01-26 16:48:52.000000000 +0200 @@ -0,0 +1,40 @@ +# From sbohdjal@matrox.com Tue Dec 31 11:41:25 2002 +# Return-Path: +# X-From_: sbohdjal@matrox.com Mon Dec 30 17:34:41 2002 +# Message-Id: <4.3.1.1.20021230101824.00fc4bd8@mailbox.matrox.com> +# Date: Mon, 30 Dec 2002 10:33:10 -0500 +# To: bug-gawk@gnu.org +# From: Serge Bohdjalian +# Subject: GAWK 3.1.1 bug, DJGPP port +# +# When I run the following AWK file... +# +BEGIN { + $0 = "00E0"; + print $0 ", " ($0 && 1) ", " ($0 != ""); + $1 = "00E0"; + print $1 ", " ($1 && 1) ", " ($1 != ""); +} +# +# With the SimTel version of GAWK 3.1.1 for Windows (downloadable from +# ftp://ftp.cdrom.com/pub/simtelnet/gnu/djgpp/v2gnu/), I get the following +# output... +# +# 00E0, 0, 1 +# 00E0, 1, 1 +# +# With the Cygwin version of GAWK 3.1.1 for Windows, I get... +# +# 00E0, 1, 1 +# 00E0, 1, 1 +# +# As far as I know, if "$0" isn't blank, the value of "($0 && 1)" should be +# "1" (true). I get the same problem if I substitute "00E0" with "00E1" to +# "00E9". Other strings don't have have this problem (for example, "00EA"). +# The problem occurs whether I use file input or whether I manually assign +# "$0" (as above). +# +# The problem is also discussed in a comp.lang.awk posting ("Bug in GAWK +# 3.1.1?", Dec. 27, 2002). +# +# -Serge diff -urN gawk-3.1.1/test/zeroe0.ok gawk-3.1.2/test/zeroe0.ok --- gawk-3.1.1/test/zeroe0.ok 1970-01-01 02:00:00.000000000 +0200 +++ gawk-3.1.2/test/zeroe0.ok 2003-01-26 17:16:36.000000000 +0200 @@ -0,0 +1,2 @@ +00E0, 1, 1 +00E0, 1, 1 diff -urN gawk-3.1.1/unsupported/atari/ChangeLog gawk-3.1.2/unsupported/atari/ChangeLog --- gawk-3.1.1/unsupported/atari/ChangeLog 2002-05-01 16:42:16.000000000 +0300 +++ gawk-3.1.2/unsupported/atari/ChangeLog 2003-03-19 14:23:44.000000000 +0200 @@ -1,3 +1,10 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/unsupported/atari/gawkmisc.atr gawk-3.1.2/unsupported/atari/gawkmisc.atr --- gawk-3.1.1/unsupported/atari/gawkmisc.atr 2001-08-16 12:07:48.000000000 +0300 +++ gawk-3.1.2/unsupported/atari/gawkmisc.atr 2002-06-11 22:52:57.000000000 +0300 @@ -79,7 +79,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -urN gawk-3.1.1/unsupported/tandem/ChangeLog gawk-3.1.2/unsupported/tandem/ChangeLog --- gawk-3.1.1/unsupported/tandem/ChangeLog 2002-05-01 16:42:18.000000000 +0300 +++ gawk-3.1.2/unsupported/tandem/ChangeLog 2003-03-19 14:23:49.000000000 +0200 @@ -1,3 +1,10 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/unsupported/tandem/tmisc.c gawk-3.1.2/unsupported/tandem/tmisc.c --- gawk-3.1.1/unsupported/tandem/tmisc.c 2001-01-28 15:49:25.000000000 +0200 +++ gawk-3.1.2/unsupported/tandem/tmisc.c 2002-06-11 22:53:06.000000000 +0300 @@ -90,7 +90,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -urN gawk-3.1.1/version.c gawk-3.1.2/version.c --- gawk-3.1.1/version.c 2002-04-30 18:53:31.000000000 +0300 +++ gawk-3.1.2/version.c 2003-03-16 12:25:59.000000000 +0200 @@ -1,4 +1,7 @@ -char *version_string = "@(#)GNU Awk 3.1"; +#if ! defined(__STDC__) || __STDC__ < 1 +#define const +#endif +const char *version_string = "@(#)GNU Awk 3.1"; /* 1.02 fixed /= += *= etc to return the new Left Hand Side instead of the Right Hand Side */ diff -urN gawk-3.1.1/version.in gawk-3.1.2/version.in --- gawk-3.1.1/version.in 2001-05-15 19:47:21.000000000 +0300 +++ gawk-3.1.2/version.in 2003-03-04 10:39:45.000000000 +0200 @@ -1,4 +1,7 @@ -char *version_string = "@(#)GNU Awk X.Y"; +#if ! defined(__STDC__) || __STDC__ < 1 +#define const +#endif +const char *version_string = "@(#)GNU Awk X.Y"; /* 1.02 fixed /= += *= etc to return the new Left Hand Side instead of the Right Hand Side */ diff -urN gawk-3.1.1/vms/ChangeLog gawk-3.1.2/vms/ChangeLog --- gawk-3.1.1/vms/ChangeLog 2002-05-01 16:42:20.000000000 +0300 +++ gawk-3.1.2/vms/ChangeLog 2003-03-19 14:23:57.000000000 +0200 @@ -1,3 +1,55 @@ +Wed Mar 19 14:10:31 2003 Arnold D. Robbins + + This time for sure. + -- Bullwinkle + + * Release 3.1.2: Release tar file made. + +Thu Feb 27 17:54:33 2003 Pat Rankin + + * descrip.mms: Revert regex compilation to single file. + vmsbuild.com: Likewise. + +Thu Feb 20 18:06:54 2003 Pat Rankin + + * vms_gawk.c (vms_gawk): Don't check for `RUNUSED' status because + it gets a false match when gawk is invoked via fork+exec. + + * gawk.hlp: Limited updates to the release notes section. + +Tue Feb 4 14:28:06 2003 Arnold D. Robbins + + All relevant files: Copyright year updated to 2003. + +Mon Feb 3 20:37:09 2003 Pat Rankin + + * vms-conf.h (ssize_t): Define as int. + (TIME_T_UNSIGNED): New macro; used in strftime. + * vms_cli.c (Cli_Parse_Command): Increase command buffer size + from 2.5Kb to 8Kb. + + From Steve Pitcher: + * vms_gawk.c (vms_gawk): Don't report "missing required element" + for INSFPRM status unless invoked via a native DCL verb. + + From Jouk Jansen: + * vms-conf.h (CRTL_VER_V731): New macro. + * vms_misc.c (getpgrp): Use it. + +Mon Dec 23 16:53:42 2002 Pat Rankin + + * descrip.mms (AWKOBJ1, AWKOBJ2): Split AWKOBJS into pieces to + avoid line length overflow when creating gawk.opt. + (regcomp.obj, regexec.obj, regex_internal.obj): New targets. + * vmsbuild.com: Likewise. + +Thu Nov 21 19:45:08 2002 Pat Rankin + + * descrip.mms: Update to reflect regex changes; eliminate dfa. + + * vmstest.com (exit_code): Hack to add "EXIT CODE n" record to + output for tests that trigger gawk failure. + Wed May 1 16:41:32 2002 Arnold D. Robbins * Release 3.1.1: Release tar file made. diff -urN gawk-3.1.1/vms/descrip.mms gawk-3.1.2/vms/descrip.mms --- gawk-3.1.1/vms/descrip.mms 2002-04-16 13:59:46.000000000 +0300 +++ gawk-3.1.2/vms/descrip.mms 2003-02-28 10:57:15.000000000 +0200 @@ -88,10 +88,11 @@ NOOP = continue # object files -AWKOBJS = array.obj,awkgram.obj,builtin.obj,dfa.obj,ext.obj,\ +AWKOBJ1 = array.obj,awkgram.obj,builtin.obj,ext.obj,\ field.obj,gawkmisc.obj,getopt.obj,getopt1.obj,io.obj,main.obj,\ - msg.obj,node.obj,random.obj,re.obj,regex.obj,replace.obj,\ - version.obj,eval.obj,profile.obj + msg.obj,node.obj,random.obj,re.obj +AWKOBJ2 = regex.obj,replace.obj,version.obj,eval.obj,profile.obj +AWKOBJS = $(AWKOBJ1),$(AWKOBJ2) # VMSOBJS # VMS specific stuff @@ -101,11 +102,12 @@ VMSOBJS = $(VMSCODE),$(VMSCMD) # source and documentation files -AWKSRC = array.c,builtin.c,dfa.c,ext.c,eval.c,field.c,gawkmisc.c,\ +AWKSRC = array.c,builtin.c,ext.c,eval.c,field.c,gawkmisc.c,\ getopt.c,getopt1.c,io.c,main.c,msg.c,node.c,random.c,re.c,\ - random.c,regex.c,replace.c,version.c,eval.c,profile.c + random.c,regcomp.c,regex.c,regex_internal.c,regexec.c,\ + replace.c,version.c,eval.c,profile.c -ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,dfa.h,getopt.h,\ +ALLSRC = $(AWKSRC),awkgram.y,awk.h,custom.h,getopt.h,\ patchlev.h,protos.h,random.h VMSSRC = $(VMSDIR)gawkmisc.vms,$(VMSDIR)vms_misc.c,$(VMSDIR)vms_popen.c,\ @@ -137,7 +139,8 @@ gawk.opt : $(MAKEFILE) # create linker options file open/write opt gawk.opt ! ~ 'cat <gawk.opt' write opt "! GAWK -- GNU awk" - @ write opt "$(AWKOBJS)" + @ write opt "$(AWKOBJ1)" + @ write opt "$(AWKOBJ2)" @ write opt "$(VMSOBJS)" @ write opt "psect_attr=environ,noshr !extern [noshare] char **" @ write opt "stack=48 !preallocate more pages (default is 20)" @@ -156,11 +159,12 @@ gawkmisc.obj : gawkmisc.c $(VMSDIR)gawkmisc.vms -$(AWKOBJS) : awk.h dfa.h regex.h config.h $(VMSDIR)redirect.h +$(AWKOBJS) : awk.h regex.h config.h $(VMSDIR)redirect.h random.obj : random.h builtin.obj : random.h main.obj : patchlev.h awkgram.obj : awkgram.c awk.h +regex.obj : regex.c regcomp.c regex_internal.c regexec.c regex.h regex_internal.h # bison or yacc required awkgram.c : awkgram.y # foo.y :: yacc => y[_]tab.c, bison => foo_tab.c diff -urN gawk-3.1.1/vms/gawk.hlp gawk-3.1.2/vms/gawk.hlp --- gawk-3.1.1/vms/gawk.hlp 2000-08-08 07:55:48.000000000 +0300 +++ gawk-3.1.2/vms/gawk.hlp 2003-02-25 12:24:16.000000000 +0200 @@ -4,6 +4,7 @@ ! revised, Jul'92 ! revised, Jan'95 ! revised, Apr'97 +! revised, Jan'03 ! Online help for GAWK. ! 1 GAWK @@ -11,7 +12,7 @@ the awk programming language. awk is an interpretive language which can handle many data-reformatting jobs with just a few lines of code. It has powerful string manipulation and pattern matching capabilities - built in. This version should be compatible with POSIX 1003.2 awk. + built in. This version is compatible with POSIX 1003.2 awk. The VMS version of GAWK supports both the original UN*X-style command interface and a DCL interface. The only setup requirement for GAWK @@ -31,10 +32,8 @@ The options are case-sensitive. On VMS, the DCL command interpreter converts unquoted text into uppercase before passing it to the running program. However, GAWK is written in 'C' and the C Run-Time Library - (VAXCRTL) converts unquoted text into *lowercase*. Therefore, the - -Fval and -W options must be enclosed in quotes. - - Note: under VMS POSIX, the usual shell command line processing occurs. + (VAXCRTL or DECC$SHR) converts unquoted text into *lowercase*. + Therefore, the -Fval and -W options must be enclosed in quotes. 3 options -f file use the specified file as the awk program source; if more than one instance of -f is used, each file will be read @@ -67,7 +66,7 @@ (since awk's 'print' statement includes the trailing 'newline'). On VMS, to include a quote character inside of a quoted string, two - successive quotes ("") must be used. (Not necessary for VMS POSIX.) + successive quotes ("") must be used. 3 data_files After all dash-options are examined, and after the program text if there were no occurrences of the -f option, remaining (space separated) @@ -104,10 +103,6 @@ >>$vfile incorrect; would be interpreted as file "$vfile" in stream-lf format rather than as file "vfile" in RMS 'text' format | error; command line pipes not supported - - Note: under VMS POSIX these features are implemented by the shell - rather than inside GAWK, so consult the shell documentation for - specific details. 3 wildcard_expansion The command parsing in the VMS implementation of GAWK does some emulation of a UN*X-style shell, where certain characters on the @@ -127,11 +122,6 @@ found, those filenames are put into the command line in place of the original pattern. If no matching files are found, the original pattern is left in place. - - Note: under VMS POSIX wildcard expansion, or "file globbing", is - performed by the shell rather than inside GAWK, so consult the shell - documentation for details. In particular, the last sentence of the - previous paragraph does not apply. 2 DCL_syntax GAWK's DCL-style interface is more or less a standard DCL command, with one required parameter. Multiple values--when present--are separated @@ -143,8 +133,6 @@ Usage: GAWK /COMMANDS="awk program text" data_file[,data_file,...] or GAWK /INPUT=awk_file data_file[,"Var=value",data_file,...] ( or GAWK /INPUT=(awk_file1,awk_file2,...) data_file[,...] ) - - Not applicable under VMS POSIX. 3 Parameter data_file[,datafile,...] (data_file data_file ...) data_file[,"Var=value",...,data_file,...] (data_file Var=value &c) @@ -1110,6 +1098,13 @@ incorporated into the official GNU distribution of version 2.13 in Spring 1991. (Version 2.12 was never publically released.) 2 release_notes + GAWK 3.1.2 handles parsing of the command line differently than + earlier versions for the case where there is a single token, which + often yielded a "missing required element" error in earlier versions. + + [Note for 3.1.x: these release notes haven't been updated in quite + some time. Most of the information is still applicable though.] + GAWK 3.0.3 tested under VAX/VMS V6.2 and Alpha/VMS V6.2, April, 1997; should be compatible with VMS versions V4.6 and later. Current source code is compatible with DEC's DEC C v5.x or VAX C v3.2; also compiles @@ -1121,24 +1116,9 @@ look in the current default directory, then if the file wasn't found it will look in the directory specified by the translation of logical name "AWK_LIBRARY". - - Not applicable under VMS POSIX. 3 known_problems There are several known problems with GAWK running on VMS. Some can - be ignored, others require work-arounds. Note: GAWK in the VMS POSIX - environment does not have these problems. -4 command_line_parsing - The command - gawk "program text" - will pass the first phase of DCL parsing (the single required - parameter is present), then it will give an error that a required - element (either /input=awk_file or /commands="program text") is - missing. If what was intended (as is most likely) is to pass the - program text to the UN*X-style command interface, the following - variation is required - gawk -- "program text" - The presence of "--", which is normally optional, will inhibit the - attempt to use DCL parsing (as will any '-' option or redirection). + be ignored, others require work-arounds. 4 file_formats If a file having the RMS attribute "Fortran carriage control" is read as input, it will generate an empty first record if the first @@ -1199,7 +1179,8 @@ VMS status value, so 0 indicates success and non-zero indicates failure. The final exit status will be 1 (VMS success) if 0 is used, or even (VMS non-success) if non-zero is used. -3 changes +!3 changes +3 prior_changes Changes between version 3.0.6 and 2.15.6 General @@ -1211,8 +1192,6 @@ VMS-specific Switched to build with DEC C by default - -3 prior_changes Changes between version 2.15.6 and 2.14 General diff -urN gawk-3.1.1/vms/gawkmisc.vms gawk-3.1.2/vms/gawkmisc.vms --- gawk-3.1.1/vms/gawkmisc.vms 2001-01-28 15:49:25.000000000 +0200 +++ gawk-3.1.2/vms/gawkmisc.vms 2003-02-04 14:26:59.000000000 +0200 @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 1986, 1988, 1989, 1991-1996 the Free Software Foundation, Inc. + * Copyright (C) 1986, 1988, 1989, 1991-1996, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Progamming Language. @@ -70,7 +70,7 @@ /* optimal_bufsize --- determine optimal buffer size */ -int +size_t optimal_bufsize(fd, stb) int fd; struct stat *stb; diff -urN gawk-3.1.1/vms/vms-conf.h gawk-3.1.2/vms/vms-conf.h --- gawk-3.1.1/vms/vms-conf.h 2002-04-16 14:59:47.000000000 +0300 +++ gawk-3.1.2/vms/vms-conf.h 2003-02-04 12:35:39.000000000 +0200 @@ -3,11 +3,11 @@ /* * config.h -- configuration definitions for gawk. * - * For VMS (assumes V4.6 or later; tested on V5.5-2) + * For VMS (assumes V4.6 or later; tested on V5.5-2 and V7.1) */ /* - * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002 the Free Software Foundation, Inc. + * Copyright (C) 1991-1992, 1995-1996, 1999, 2001, 2002, 2003 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. @@ -144,7 +144,7 @@ #undef HAVE_PORTALS /* don't have portals on /p on this system */ #undef DYNAMIC /* don't allow dynamic addition of builtins */ #define STRTOD_NOT_C89 1 /* strtod doesn't have C89 semantics */ -/* #undef ssize_t */ /* signed version of size_t */ +#define ssize_t int /* signed version of size_t */ /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT @@ -330,6 +330,9 @@ /* Define as 1 if you have catgets and don't want to use GNU gettext. */ #undef HAVE_CATGETS +/* Whether `time_t' is an unsigned type. */ +#define TIME_T_UNSIGNED 1 + #if 0 #include /* overrides for stuff autoconf can't deal with */ #else @@ -397,10 +400,13 @@ # define __VMS_VER 60100000 #endif #if __CRTL_VER >= 60200000 +# if __CRTL_VER >= 70301000 +# define CRTL_VER_V731 +# endif # undef __CRTL_VER # define __CRTL_VER 60100000 #endif -#endif +#endif /* __DECC */ /* * GNU C diff -urN gawk-3.1.1/vms/vms_args.c gawk-3.1.2/vms/vms_args.c --- gawk-3.1.1/vms/vms_args.c 1997-06-04 19:38:27.000000000 +0300 +++ gawk-3.1.2/vms/vms_args.c 2002-07-25 07:28:01.000000000 +0300 @@ -23,7 +23,7 @@ * expansion. Should be called immediately upon image startup. * * Pat Rankin, Nov'89 - * rankin@eql.Caltech.EDU + * rankin@pactechdata.com * * nfile - create 'nfile' as 'stdout' (stream-lf format) diff -urN gawk-3.1.1/vms/vms_cli.c gawk-3.1.2/vms/vms_cli.c --- gawk-3.1.1/vms/vms_cli.c 1996-12-13 05:58:06.000000000 +0200 +++ gawk-3.1.2/vms/vms_cli.c 2003-02-04 12:35:40.000000000 +0200 @@ -60,7 +60,7 @@ Dsc rdesc; unsigned :32; unsigned :32; unsigned :32; } cmd; U_Long sts; int ltmp; - char longbuf[2600]; + char longbuf[8200]; (void)lib$establish(lib$sig_to_ret); memset(&cmd, 0, sizeof cmd); diff -urN gawk-3.1.1/vms/vms_gawk.c gawk-3.1.2/vms/vms_gawk.c --- gawk-3.1.1/vms/vms_gawk.c 1997-06-04 19:38:28.000000000 +0300 +++ gawk-3.1.2/vms/vms_gawk.c 2003-02-25 12:24:15.000000000 +0200 @@ -1,6 +1,6 @@ /* vms_gawk.c -- parse GAWK command line using DCL syntax - Copyright (C) 1991-1993, 1996 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996, 2003 the Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -65,10 +65,12 @@ union arg_w_prefix buf; char misc_args[10], *misc_argp; int argc, W_cnt; + int native_dcl = 1; /* assume true until we know otherwise */ /* check "GAWK_P1"--it's required; its presence will tip us off */ sts = Cli_Present("GAWK_P1"); if (CondVal(sts) == CondVal(CLI$_SYNTAX)) { + native_dcl = 0; /* not invoked via a native command verb */ /* syntax error indicates that we weren't invoked as a native DCL command, so we'll now attempt to generate a command from the foreign command string and parse that. @@ -80,18 +82,20 @@ if (vmswork(sts)) /* command parsed successfully */ v_add_arg(argc = 0, COMMAND_NAME); /* save "GAWK" as argv[0] */ else if (CondVal(sts) == CondVal(CLI$_INSFPRM)) - return vms_usage(USAGE_FILE_RQRD); /* insufficient parameters */ + return native_dcl ? vms_usage(USAGE_FILE_RQRD) : 0; /* insufficient parameters */ else if (CondVal(sts) == CondVal(CLI$_CONFLICT)) return vms_usage(USAGE_BAD_COMBO); /* conflicting qualifiers (/input+/command) */ +#if 0 /* 3.1.2: removed since this can't distinguish RUN vs fork+exec */ else if (CondVal(sts) == CondVal(CLI$_RUNUSED)) return vms_usage(USAGE_RUN_CMD); /* RUN GAWK won't work (no command line) */ +#endif else return 0; /* forced to rely on original parsing */ if (Present("USAGE")) /* give usage message and quit */ return vms_usage(0); else if (! (Present("PROGRAM") || Present("PROGFILE")) ) - return vms_usage(USAGE_PROG_RQRD); /* missing required option */ + return native_dcl ? vms_usage(USAGE_PROG_RQRD) : 0; /* missing required option */ misc_argp = misc_args; *misc_argp++ = '-'; /* now points at &misc_args[1] */ @@ -172,7 +176,7 @@ } /* vms_usage() - display one or more messages and then terminate */ -static int /* note: doesn't return anything; allows 'return vms_usage()' */ +static int /* note: usually doesn't return */ vms_usage( int complaint ) { static const char diff -urN gawk-3.1.1/vms/vms_misc.c gawk-3.1.2/vms/vms_misc.c --- gawk-3.1.1/vms/vms_misc.c 2002-04-16 15:00:56.000000000 +0300 +++ gawk-3.1.2/vms/vms_misc.c 2003-02-04 12:35:40.000000000 +0200 @@ -1,6 +1,6 @@ /* vms_misc.c -- sustitute code for missing/different run-time library routines. - Copyright (C) 1991-1993, 1996-1997, 2001 the Free Software Foundation, Inc. + Copyright (C) 1991-1993, 1996-1997, 2001, 2003 the Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -222,6 +222,7 @@ #endif /*VMS_V7*/ +#ifndef CRTL_VER_V731 /* getpgrp() -- there's no such thing as process group under VMS; * job tree might be close enough to be useful though. */ @@ -229,6 +230,7 @@ { return 0; } +#endif #ifndef __GNUC__ void vms_bcopy( const char *src, char *dst, int len ) diff -urN gawk-3.1.1/vms/vmstest.com gawk-3.1.2/vms/vmstest.com --- gawk-3.1.1/vms/vmstest.com 2002-04-22 14:22:27.000000000 +0300 +++ gawk-3.1.2/vms/vmstest.com 2002-11-24 18:46:35.000000000 +0200 @@ -338,6 +338,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f arrayparm.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp arrayparm.ok tmp. $ if $status then rm tmp.; @@ -347,6 +348,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f paramdup.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 1 $ set On $ cmp paramdup.ok tmp. $ if $status then rm tmp.; @@ -365,6 +367,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk --lint -f defref.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp defref.ok tmp. $ if $status then rm tmp.; @@ -430,6 +433,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f prmarscl.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp prmarscl.ok tmp. $ if $status then rm tmp.; @@ -439,6 +443,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f sclforin.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp sclforin.ok tmp. $ if $status then rm tmp.; @@ -448,6 +453,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f sclifin.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp sclifin.ok tmp. $ if $status then rm tmp.; @@ -584,6 +590,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f fnarray.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnarray.ok tmp. $ if $status then rm tmp.; @@ -705,6 +712,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f noparms.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 1 $ set On $ cmp noparms.ok tmp. $ if $status then rm tmp.; @@ -804,6 +812,7 @@ $funsmnam: echo "funsmnam" $ set noOn $ gawk -f funsmnam.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp funsmnam.ok tmp. $ if $status then rm tmp.; @@ -812,6 +821,7 @@ $fnamedat: echo "fnamedat" $ set noOn $ gawk -f fnamedat.awk < fnamedat.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnamedat.ok tmp. $ if $status then rm tmp.; @@ -820,6 +830,7 @@ $numindex: echo "numindex" $ set noOn $ gawk -f numindex.awk < numindex.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp numindex.ok tmp. $ if $status then rm tmp.; @@ -828,6 +839,7 @@ $subslash: echo "subslash" $ set noOn $ gawk -f subslash.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp subslash.ok tmp. $ if $status then rm tmp.; @@ -836,6 +848,7 @@ $opasnslf: echo "opasnslf" $ set noOn $ gawk -f opasnslf.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp opasnslf.ok tmp. $ if $status then rm tmp.; @@ -844,6 +857,7 @@ $opasnidx: echo "opasnidx" $ set noOn $ gawk -f opasnidx.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp opasnidx.ok tmp. $ if $status then rm tmp.; @@ -936,6 +950,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f parseme.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp parseme.ok tmp. $ if $status then rm tmp.; @@ -951,6 +966,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f fnaryscl.awk >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnaryscl.ok tmp. $ if $status then rm tmp.; @@ -960,6 +976,7 @@ $ set noOn $ AWKPATH_srcdir $ gawk -f fnasgnm.awk < fnasgnm.in >tmp. 2>&1 +$ if .not.$status then call exit_code 2 $ set On $ cmp fnasgnm.ok tmp. $ if $status then rm tmp.; @@ -1241,5 +1258,14 @@ $ endif $ endsubroutine !fixup_LRL $ +$! add a fake "EXIT CODE" record to the end of the temporary output file +$! to simulate the ``|| echo EXIT CODE $$? >>_$@'' shell script usage +$exit_code: subroutine +$ if f$trnlnm("FTMP").nes."" then close/noLog ftmp +$ open/Append ftmp tmp. +$ write ftmp "EXIT CODE: ",p1 +$ close ftmp +$ endsubroutine !exit_code +$ $!NOTREACHED $ exit diff -urN gawk-3.1.1/ylwrap gawk-3.1.2/ylwrap --- gawk-3.1.1/ylwrap 2002-02-19 18:17:37.000000000 +0200 +++ gawk-3.1.2/ylwrap 2003-03-06 11:11:50.000000000 +0200 @@ -1,6 +1,9 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -# Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002 Free Software +# Foundation, Inc. +# # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -44,14 +47,6 @@ ;; esac -# The directory holding the input. -input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` -# Quote $INPUT_DIR so we can use it in a regexp. -# FIXME: really we should care about more than `.' and `\'. -input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'` - -echo "got $input_rx" - pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then @@ -79,7 +74,10 @@ cd $dirname -$prog ${1+"$@"} "$input" +case $# in + 0) $prog "$input" ;; + *) $prog "$@" "$input" ;; +esac status=$? if test $status -eq 0; then @@ -94,6 +92,12 @@ y_tab_nodot="yes" fi + # The directory holding the input. + input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` + # Quote $INPUT_DIR so we can use it in a regexp. + # FIXME: really we should care about more than `.' and `\'. + input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` + while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS @@ -114,11 +118,24 @@ *) target="../$2";; esac - # Edit out `#line' or `#' directives. We don't want the - # resulting debug information to point at an absolute srcdir; - # it is better for it to just mention the .y file with no - # path. - sed -e "/^#/ s,$input_rx,," "$from" > "$target" || status=$? + # Edit out `#line' or `#' directives. + # + # We don't want the resulting debug information to point at + # an absolute srcdir; it is better for it to just mention the + # .y file with no path. + # + # We want to use the real output file name, not yy.lex.c for + # instance. + # + # We want the include guards to be adjusted too. + FROM=`echo "$from" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + TARGET=`echo "$2" | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` + sed "/^#/{s,$input_rx,,;s,$from,$2,;s,$FORM,$TO,;}" "$from" >"$target" || + status=$? else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d EOF # cleanup chmod +x test/Gentests chmod +x configure mkinstalldirs echo Sleeping and touching files to update timestamps. touch test/noloop1.ok test/noloop2.ok sleep 2 touch aclocal.m4 configh.in test/Makefile.in touch awklib/Makefile.in doc/Makefile.in Makefile.in sleep 2 touch configure version.c echo Remove any .orig or "'~'" files that may remain. echo Use '"configure && make"' to rebuild any dependent files. echo Use "'make distclean'" to clean up.